Just my two cents on this...

If you reference the dll and use code-behind, you will mitigate these
issues that you're having because don't have to remember all the methods
and properties that you would normally have to in dealing with the aspx
page directly.  Also, in the code behind, when you import the dll (using
in c#, Imports in vb.net), you will notice that there is no com.lowagie
namespace, it starts with iTextSharp.text.pdf...unless you're not using
the iTextSharp dll...and thus am stuck with mixing and matching
different languages.  If you're going to use .Net, use the .Net dll.

Currently, I'm utilizing iText to read in acroforms, allow my users to
populate them, submit them back to the server as an xfdf, process the
information and serve it back to them with no problems.

However, what you're asking for below is a VB problem which spending $30
on a good VB.Net book will suffice.

Again, my two cents...

Jay

-----Original Message-----
From: j...@msdlg.com [mailto:j...@msdlg.com] 
Sent: Friday, May 28, 2010 3:59 PM
To: 'Post all your questions about iText here'
Subject: Re: [iText-questions] How to implement in Visual Studio

Problem is that I'm just starting out with this, and I'm looking for
possibilities for creating .PDFs. This is the first one I've seriously
considered, but I want to get something useful done with it before I
spend
any money on it.

I believe the book is $34.99 to $59.99, depending on the version you
get.
Not sure that I want to spend that sort of money only to find out that
this
won't do what I won't, or that it will be extremely difficult to do.
Also,
not sure what "MEAP" is, or what format the "ebook" is in.  I'd be happy
with an electronic version, but preferably something in .PDF format.

Jesse

-----Original Message-----
From: William K. Goodbody [mailto:bill.goodb...@comcast.net] 
Sent: Friday, May 28, 2010 3:18 PM
To: 'Post all your questions about iText here'
Subject: Re: [iText-questions] How to implement in Visual Studio

1. I highly recommend the book 2nd Edition) although written in Java it
is a
close cousin to C# and not too hard (for some) to translate into VB
2. To Translate C# to VB: http://www.codechanger.com/ has worked for me.
3. If you get the Trust error (we ran into it in a shared hosting
environment) is to modify the original source code in AssemblyInfo.cs as
follows and recompile the DLL
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security; // Added 5/17 due to Trust Problem

//
// General Information about an assembly is controlled through the
following

// set of attributes. Change these attribute values to modify the
information
// associated with an assembly.
//
[assembly: AssemblyTitle("iTextSharp")]
[assembly: AssemblyDescription("A free PDF library ported from Java
iText.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("Copyright (C) 1999-2010 by Bruno Lowagie
and
Paulo Soares. All Rights Reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Added 5/17/2010 to allow Partial Trust users in hosted deployment
//At Same time added using System.Security required by this function
[assembly: AllowPartiallyTrustedCallers()]        

//
// Version information for an assembly consists of the following four
values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and
Build
Numbers 
// by using the '*' as shown below:

[assembly: AssemblyVersion("5.0.2")]

4.  Assuming you don't have header footers, then should be ok.

- Bill

-----Original Message-----
From: j...@msdlg.com [mailto:j...@msdlg.com] 
Sent: Friday, May 28, 2010 2:25 PM
To: 'Post all your questions about iText here'
Subject: Re: [iText-questions] How to implement in Visual Studio

Are there examples somewhere that I should be looking at otherwise?  My
primary goal here is to be able to be able to output name badges and
labels
directly in the browser for my users.

Jesse

-----Original Message-----
From: William K. Goodbody [mailto:bill.goodb...@comcast.net] 
Sent: Friday, May 28, 2010 1:57 PM
To: 'Post all your questions about iText here'
Subject: Re: [iText-questions] How to implement in Visual Studio

Beware that those sample are not fully compatible with the 5.0.2 code.

Certainly the header/footer stuff is not. I think the big changes was in
5.

Also the DLL will not work without full trust. I posted a Bug report and
the
fix on sourceforge

- Bill

-----Original Message-----
From: j...@msdlg.com [mailto:j...@msdlg.com] 
Sent: Friday, May 28, 2010 1:06 PM
To: 'Post all your questions about iText here'
Subject: Re: [iText-questions] How to implement in Visual Studio

Thanks for the reply.  I've always hand-coded my sites, but I'm slowly
switching to VS, and so I'm not familiar with how to do a lot of things
in
VS.  I did right-click the project and selected Add Reference.  I then
switched to the browse tab and found the .DLL. As you said, it did copy
the
file to the bin folder in my project.  I am working with the first
example
on the site http://www.ujihara.jp/iTextdotNET/en/examplesvb.html, I do
not
use code behind, so I've modified the page as follows:

<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

<%@ Import Namespace="System" %>
<%@ Import Namespace="com.lowagie.text" %>
<%@ Import Namespace="com.lowagie.text.pdf" %>
<%@ Import Namespace="System.IO" %>

<script runat="server">
   Sub Page_Load()
      Console.WriteLine("Chapter 1 example 1: Hello World")

      ' step 1: creation of a document-object
      Dim document As New Document()

      ' step 2:
      ' we create a writer that listens to the document
      ' and directs a PDF-stream to a file

      PdfWriter.getInstance(document, New FileStream("Chap0101.pdf",
FileMode.Create))

      ' step 3: we open the document
      document.open()

      ' step 4: we add a paragraph to the document
      document.add(New Paragraph("Hello World"))

      ' step 5: we close the document
      document.close()
   End Sub
</script>

HTML code continues from her down.

When I try to build the page, I get the error, "Namespace or type
specified
in the Imports 'com.lowagie.text' doesn't contain any public member or
cannot be found. Make sure the namespace or the type is defined and
contains
at least one public member. Make sure the imported element name doesn't
use
any aliases."  I have a feeling it's not defined, but I have no idea how
to
define a name space??

How do I resolve this issue?  I will probably find a VB forum as well to
post my question to, but I appreciate any help you can offer.

Jesse

-----Original Message-----
From: Brian Lovett [mailto:brianlov...@gamestop.com] 
Sent: Friday, May 28, 2010 11:00 AM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] How to implement in Visual Studio

Hi Jesse,

It's a little off topic for this list (more of a VS question dealing
with
references), but since I am replying I'll go ahead answer your question.

You just need to add a reference to the project (browse to the DLL) and
add
a using statement to the file.  That second part is optional if you
don't
mind fully quailifying it with its namespace.  VS should then copy the
DLL
to your bin folder automatically.  HTH.

Brian

-----Original Message-----

Message: 6
Date: Fri, 28 May 2010 10:34:21 -0400
From: <j...@msdlg.com>
Subject: [iText-questions] How to implement in Visual Studio
To: <itext-questions@lists.sourceforge.net>
Message-ID: <005b01cafe72$dcc1b690$964523...@com>
Content-Type: text/plain; charset="us-ascii"

I've downloaded iText and want to use it in Visual Studio.  I've found a
page with lots of good examples, but no instructions that I can find in
installing this and getting it running.  I've copied the itextsharp.dll
file
into my bin folder, and I'm assuming that I need to put something int
the
web.config file to make it accessible to the rest of the app, then the
examples I found may work, however, I have no idea what to put in the
web.config file.  Can someone help me out?

 

Thanks,

Jesse

 

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------
----
--



------------------------------

_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


End of iText-questions Digest, Vol 48, Issue 100
************************************************

------------------------------------------------------------------------
----
--

_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list:
http://1t3xt.info/tutorials/keywords/



------------------------------------------------------------------------
----
--

_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list:
http://1t3xt.info/tutorials/keywords/


------------------------------------------------------------------------
----
--

_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list:
http://1t3xt.info/tutorials/keywords/



------------------------------------------------------------------------
----
--

_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list:
http://1t3xt.info/tutorials/keywords/


------------------------------------------------------------------------
----
--

_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list:
http://1t3xt.info/tutorials/keywords/



------------------------------------------------------------------------
------

_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list:
http://1t3xt.info/tutorials/keywords/

------------------------------------------------------------------------------

_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to