Re: [iText-questions] Getting a PdfTemplate from a PdfReader

2010-05-26 Thread Thomas Hauk
On May 26, 2010, at 9:38 PM, 1T3XT info wrote: > Why would you want to create a PdfTemplate without a writer? > That's like creating a single page PDF. I am actually creating a single page PDF, by arranging 2 existing PDF files in a pattern on the page. (4 alternating rows of PDF A, PDF B, PDF

[iText-questions] (no subject)

2010-05-26 Thread Pradeep Bhosale
Hi, I m using itext version 5.0.2 . I have written the code to add header i.e Document.addHeader(“name” ,“content”); But this is not working. I have created the object of header Class also but where can I use it? Plz do the needful Thanks in advance Thanks & regards, Pradeep --

Re: [iText-questions] Getting a PdfTemplate from a PdfReader

2010-05-26 Thread 1T3XT info
Thomas Hauk wrote: > So, what would a method look like that takes a PdfReader object and an > int for the page number, and returns back a PdfTemplate object? PdfTemplate can't store the resources. > Or is that not possible since a PdfTemplate needs a PdfWriter object? > (In which case, is that

Re: [iText-questions] Getting a PdfTemplate from a PdfReader

2010-05-26 Thread Thomas Hauk
On May 26, 2010, at 8:55 PM, 1T3XT info wrote: > That's explained in the book. > > A page = a page content stream + resources > > When you get a PdfTemplate (containing the content stream), > the resources are already copied to the writer. > The PdfTemplate only keeps a reference to those resources

Re: [iText-questions] How to set the pdf's name dynamically

2010-05-26 Thread 1T3XT info
Zhu, Yunpu wrote: > That's a good approach to set up the name in web.xml. It's no problem to > link to a pdf extension name, but how can we set the filename > automatically, not the constant name? Why would there be a constant name? You create a name in your link... (Do you understand the conc

Re: [iText-questions] Getting a PdfTemplate from a PdfReader

2010-05-26 Thread 1T3XT info
Thomas Hauk wrote: > Let's say I have a PdfReader object and I want to get a PdfTemplate > object from it for the first page. > > Is the only way to do this through a PdfWriter object? > > pdfTemplate = writer.getImportedPage(pdfReader, 1); > > If not, what is the better way? > > If so,

Re: [iText-questions] Blank PDF after it is transfered through SMTP

2010-05-26 Thread Jiangang Song
Michael, Your points are well-taken. Michael wrote: >This means that your quoted-printable encoder does not do a thorough job, >either because it is buggy or because you have not told it that the data to >encode is not text where a single carriage return, a single line feed, and a >carriage retur

Re: [iText-questions] How to set the pdf's name dynamically

2010-05-26 Thread Zhu, Yunpu
Yes. Response.AddHeader("Content-Disposition", string.Format("attachment; filename=\"{0}\"", fileName)); If I set disposition as in-line not attachment, I can not get the fileName which we decided here. Thanks Erik Pfingsten wrote: > Setting the Content-Disposition Header will work if you

Re: [iText-questions] How to set the pdf's name dynamically

2010-05-26 Thread Zhu, Yunpu
That's a good approach to set up the name in web.xml. It's no problem to link to a pdf extension name, but how can we set the filename automatically, not the constant name? Thanks 1T3XT info wrote: > Brian Lovett wrote: > >> So I would recommend Googling "Apache http handler". ;) I hope

[iText-questions] Getting a PdfTemplate from a PdfReader

2010-05-26 Thread Thomas Hauk
Let's say I have a PdfReader object and I want to get a PdfTemplate object from it for the first page. Is the only way to do this through a PdfWriter object? pdfTemplate = writer.getImportedPage(pdfReader, 1); If not, what is the better way? If so, why do I have to create a *writer* o

Re: [iText-questions] iText-questions Digest, Vol 48, Issue 87

2010-05-26 Thread Brian Lovett
Thanks, Brian Lovett IS - Dev Corporate Systems Phone: (817) 722-7390 GameStop, Inc. Power To The Players 625 Westport Parkway Grapevine, TX 76051 THE INFORMATION IN THIS E-MAIL IS INTENDED FOR THE NAMED RECIPIENT (S) ONLY. IT MAY CONTAIN PRIVILEGED AND CONFIDENTIAL INFORMATION. IF YOU HAVE RE

Re: [iText-questions] How to set the pdf's name dynamically

2010-05-26 Thread Brian Lovett
I apologize for the double send. I have fat fingers today. I am not sure what the difference is then, but using the content disposition header absolutely would not work for me - unless I was using it in a save/open dialog directly from the browser. I spent a full day trying to make it work.

Re: [iText-questions] Open an existing PDF instead of creating blank

2010-05-26 Thread QuietRiot
Im doing it in java (it's a jsp page actually). but I lost you here.. Create the PDF in a memory stream first. -- View this message in context: http://itext-general.2136553.n4.nabble.com/Open-an-existing-PDF-instead-of-creating-blank-tp2231939p2232134.html Sent from the iText - General mail

Re: [iText-questions] Open an existing PDF instead of creating blank

2010-05-26 Thread Paulo Soares
GetBuffer() will always return garbage at the end of the PDF. Adding the content length will also help. Paulo - Original Message - From: Glen Hamel To: 'Post all your questions about iText here' Sent: Wednesday, May 26, 2010 6:34 PM Subject: Re: [iText-questions] Open an exis

Re: [iText-questions] Open an existing PDF instead of creating blank

2010-05-26 Thread Glen Hamel
Interesting.. But I think I originally tried that and it didn't work.. I know what I posted does work as that's live right now.. Glen Hamel Auric Networks Canada, Inc. 570 Orwell Street, Unit 1 Mississauga, Ontario L5A 3V7 Phone : 905.361.7621 x 204 Fax : 905.274.3912 Email : glen.ha...@auric

Re: [iText-questions] Open an existing PDF instead of creating blank

2010-05-26 Thread Paulo Soares
mStream.ToArray() instead of mStream.GetBuffer(). Paulo - Original Message - From: Glen Hamel To: 'Post all your questions about iText here' Sent: Wednesday, May 26, 2010 5:32 PM Subject: Re: [iText-questions] Open an existing PDF instead of creating blank Technically this

Re: [iText-questions] Question about converting HTML to PDF

2010-05-26 Thread Cameron Laird
On Wed, May 26, 2010 at 11:27 AM, Mike Marchywka wrote: > > > > > > > > > > > > > Date: Wed, 26 May 2010 18:30:42 +0300 > > From: dhryvas...@serena.com > > To: itext-questions@lists.sourceforge.net > > Subject: [iText-questions] Question about converting HTML to PD

Re: [iText-questions] Open an existing PDF instead of creating blank

2010-05-26 Thread Glen Hamel
Technically this is not an iText issue but as I had the time to actually respond this time, here it is.. You're doing that all wrong... Create the PDF in a memory stream first. Then use the following: (do bear in mind that this is VB code but does lend to conversion to any other language as I'

Re: [iText-questions] Question about converting HTML to PDF

2010-05-26 Thread Mike Marchywka
> Date: Wed, 26 May 2010 18:30:42 +0300 > From: dhryvas...@serena.com > To: itext-questions@lists.sourceforge.net > Subject: [iText-questions] Question about converting HTML to PDF > > Hi all - > > I am using iText and I try to convert HTML to PDF using th

[iText-questions] Open an existing PDF instead of creating blank

2010-05-26 Thread QuietRiot
This should be easy but I'm having a hard time with it. I'm currently doing the following: // START OF DOCUMENT response.setContentType("application/pdf"); Document document = new Document(); try{ ByteArrayOutputStream buffer = new ByteArrayOutputStream(); PdfWriter writer = PdfWriter.getInsta

[iText-questions] Question about converting HTML to PDF

2010-05-26 Thread Denys Hryvastov
Hi all - I am using iText and I try to convert HTML to PDF using this library. It works well for me with simple HTML. The question that I have is: does iText support converting HTML which includes css references and JavaScript to PDF? If I have JavaScript embedded in my HTML will it work in the ge

Re: [iText-questions] How to set the pdf's name dynamically

2010-05-26 Thread Erik Pfingsten
Setting the Content-Disposition Header will work if you are opening the file in Adobe Reader first also (ie it will pre-fill the filename in the Save As box, but the end user can then change the name). That's what I do. In C#: String fileName = "whatever.pdf"; Response.AddHeader("Content-Disp

Re: [iText-questions] How to set the pdf's name dynamically

2010-05-26 Thread 1T3XT info
Brian Lovett wrote: > So I would recommend Googling "Apache http handler". ;) I hope this helps! Good suggestion. I believe the OP is using Servlets and JSP. A more elegant solution would be to drop JSP (it's NEVER a good idea to create ANY binary file using JSP, IMHO creating PDF from JSP is

Re: [iText-questions] How to set the pdf's name dynamically

2010-05-26 Thread Brian Lovett
>From my experience, the "Content-Disposition" header works when you are saving >directly to disk. If you open it in a reader first, then it is up to that >reader how it saves. Based on the info presented, he is probably running in >an Apache environment, so I am not sure how what I am about t

Re: [iText-questions] Create a PDF from submission of a web form?

2010-05-26 Thread Brandon Kaminsky
Thank you and everyone else for their input. I'm impressed with responsiveness of the iText community. -Original Message- From: 1T3XT info [mailto:i...@1t3xt.info] Sent: Wednesday, May 26, 2010 2:48 AM To: Post all your questions about iText here Subject: Re: [iText-questions] Create a

Re: [iText-questions] iText 5.0.1 for Maven

2010-05-26 Thread 1T3XT info
fhomasp wrote: > I added the itext repo and the dependency, yet I get this: > > Unable to get resource 'com.itextpdf:itextpdf:jar:5.0.2' from repository > itextpdf.com (http://maven.itextpdf.com): Error retrieving checksum file for > com/itextpdf/itextpdf/5.0.2/itextpdf-5.0.2.jar I'm not a Maven

Re: [iText-questions] iText - nameddest over specified content

2010-05-26 Thread noemie
Thank you for your answer. As I create my pdf from an rtf, I hava found a way to convert bkmk into named destinations. Thanks again for your help Noémie. On Sat, May 22, 2010 at 5:32 PM, 1T3XT info [via iText - General] < ml-node+2227235-1017862020-268...@n4.nabble.com > wrote: > On 05/22/2010 0

Re: [iText-questions] iText 5.0.1 for Maven

2010-05-26 Thread fhomasp
I added the itext repo and the dependency, yet I get this: Unable to get resource 'com.itextpdf:itextpdf:jar:5.0.2' from repository itextpdf.com (http://maven.itextpdf.com): Error retrieving checksum file for com/itextpdf/itextpdf/5.0.2/itextpdf-5.0.2.jar I was thinking about getting 2.1.7 --

Re: [iText-questions] Blank PDF after it is transfered through SMTP

2010-05-26 Thread mkl
Jiangang Song, Jiangang Song wrote: > Comparing the pdf file generated directly and the one transferred through > SMTP using "content-transfer-encoding: quoted-printable", all 0A is > inflated to 0D 0A and all 0D is also inflated to 0D 0A. This means that your quoted-printable encoder does not