Re: [iText-questions] Importing a PDF as an Image object

2009-09-29 Thread Y Fang
Alright, I think I understand now. I had assumed the PdfImportedPage obtained via the line "tmpWriter.GetImportedPage(new PdfReader("test.pdf"), 1);" would be completely 'self-contained' Thanks for this explanation. And I will have a look into getting your book. > Date: Wed, 30 Sep 2009 08:

Re: [iText-questions] Importing a PDF as an Image object

2009-09-29 Thread 1T3XT info
Y Fang wrote: > In other words, it is rather unclear (and still is) why the Image > produced by the following method: [1] > PdfImportedPage page = tmpWriter.GetImportedPage(new > PdfReader("test.pdf"), 1); > Image image = Image.GetInstance(page); > is somehow different to the Image produced by t

Re: [iText-questions] Importing a PDF as an Image object

2009-09-29 Thread Y Fang
> Please explain what's hard to understand in this fragment: > > A content stream normally contains references to external objects, > images, and fonts. For example, you can find a reference to a font named > /F1 in listing 2.2. This font is stored elsewhere in the PDF file. > ... > you should

Re: [iText-questions] modifying existing acroforms toenable MULTILINE option on text field

2009-09-29 Thread Mark Storer
It sounds like you're building In your FDF, you just need to add /SetFf 4096 to the individual fields' dictionaries. <> Nothin' to it. --Mark Storer Senior Software Engineer Cardiff.com #include typedef std::Disclaimer DisCard; -Original Message- From: Giles, Bear [mai

Re: [iText-questions] Embeded CRL not recognize by Adobe

2009-09-29 Thread java-chris
Still got a problems !! The size of : exc.put(PdfName.CONTENTS, new Integer(115010)); varies depend of the signature and the document contents ... here we got 115010 .. .but this number change when the document change ... and sometimes it not work on the current documents !!! There is many wa

Re: [iText-questions] modifying existing acroforms to enable MULTILINE option on text field

2009-09-29 Thread Giles, Bear
Is there a less simple way? :) We're under a deadline so digging into the PDF reference would be awkward. Thanks, Bear From: Mark Storer [mailto:msto...@autonomy.com] Sent: Tuesday, September 29, 2009 11:47 AM To: Post all your questions about iText here Subject: Re: [iText-questions] modifyin

Re: [iText-questions] Embeded CRL not recognize by Adobe

2009-09-29 Thread java-chris
Solve my problems by put the value dic.put(PdfName.FILTER, new PdfName("Adobe.PPKLite")); To Remplace dic.put(PdfName.FILTER, new PdfName("SAFE.PPKSF")); And now this is woking great !!! Think I got it !! Thx for your patience ;) java-chris wrote: > > Hi Paulo , > The arrayIndexOutOfB

Re: [iText-questions] Thumbnail image of PDF

2009-09-29 Thread Davis Ford
Hi Andrea, I don't know if it is the *best* route, but I can accomplish what I'm looking for in about 10 lines of code. Thanks for the tips on those other projects. I'll take a look at them. Regards, Davis On Tue, Sep 29, 2009 at 1:33 PM, Andrea Vacondio wrote: > > > Davis Ford-2 wrote: >> >>

Re: [iText-questions] modifying existing acroforms to enable MULTILINE option on text field

2009-09-29 Thread Mark Storer
There's a much easier way. FDFs have a number of ways to twiddle flagss in existing PDFs. It's all spelled out in section 8.6.6 of the PDF reference. In particular, you want to set the "SetFf" to PdfFormField.FF_MULTILINE == (1 << 12) == 4096. FdfWriter doesn't support it (or any of the oth

Re: [iText-questions] Thumbnail image of PDF

2009-09-29 Thread Andrea Vacondio
Davis Ford-2 wrote: > > Is JPedal the best route? Can it be done easily with JAI ? > I suggest you JPodRenderer, in my experience it's better then JPedal... now there's also ICEpdf that has been open sourced sometime ago. -- View this message in context: http://www.nabble.com/Thumbnail-imag

Re: [iText-questions] Embeded CRL not recognize by Adobe

2009-09-29 Thread java-chris
Hi Paulo , The arrayIndexOutOfBOunds was solve by changing the value of the out[] variable to sg.length. byte sg[] = pk7.getEncodedPKCS7(hash, cal); byte out[] = new byte[sg.length]; Now I've got this Exception in thread "main" java.lang.IllegalArgumentException: The key /Contents is too big

[iText-questions] modifying existing acroforms to enable MULTILINE option on text field

2009-09-29 Thread Giles, Bear
I'm sure I've seen an answer to this in the last few months but can't find it in "iText in Action" or a quick google search. I have an existing form that I'm populating with FDF with a bit of pre- and post-processing. (E.g., many of the forms have default content in blue and I change the font

Re: [iText-questions] Thumbnail image of PDF

2009-09-29 Thread Davis Ford
FYI: Jpedal is doing a nice job for me. I downloaded the demo jar, and use a modified version of this chap's example: http://threebit.net/mail-archive/itext-questions/msg01415.html I've got PDFs with TIFF images and some with JPG images, and I'm able to generate nice small JPG thumbs of the firs

Re: [iText-questions] Embeded CRL not recognize by Adobe

2009-09-29 Thread Paulo Soares
What's the stack trace? Paulo > -Original Message- > From: java-chris [mailto:christian.lecl...@sphere3solutions.com] > Sent: Tuesday, September 29, 2009 4:38 PM > To: itext-questions@lists.sourceforge.net > Subject: Re: [iText-questions] Embeded CRL not recognize by Adobe > > > > Hi

Re: [iText-questions] Embeded CRL not recognize by Adobe

2009-09-29 Thread java-chris
Hi Paulo , the signature works fine before I put the CRL on the constructor of the PdfPKCS7 When i put my array of CRLS ... got and ArrayIndexOutOfBound Exception . Here the code : public void signPdfTest(IDigitalIdentity id) throws NoSuchAlgorithmException, KeyStoreException, CertificateExc

Re: [iText-questions] Thumbnail image of PDF

2009-09-29 Thread Ian Rashkin
Hi Davis, iText doesn't do this, unless I'm mistaken, but other programs do. I have been using PDFTron's PDF2Image (http://www.pdftron.com/pdf2image/index.html) and have been quite pleased with the results. I am not affiliated with them, just a happy customer. They have been very helpful even in cu

Re: [iText-questions] Save as JPG/PNG

2009-09-29 Thread Ian Rashkin
Hi Harry, iText doesn't do this, but other programs do. I have been using PDFTron's PDF2Image (http://www.pdftron.com/pdf2image/index.html) and have been quite pleased with the results. I am not affiliated with them, just a happy customer. They have been very helpful even in customizing their produ

Re: [iText-questions] [patch-itextsharp] Fixes to attachment handling

2009-09-29 Thread Leonard Rosenthol
OK - got it. It's not the Unicode name itself - that's valid. HOWEVER, when you add the second one, it's not properly ordered according to the rules for a Names tree and thus you've created an invalid PDF. Changing the name just avoids the real, underlying cause. Leonard -Original Messag

Re: [iText-questions] Concatenating pdf while preserving annotations

2009-09-29 Thread Leonard Rosenthol
Given that the iText APIs aren't going to give you full access to every feature possible in an Annotation dictionary, not to mention support for private data that could be present, this method is doomed to failure. -Original Message- From: Fabrizio Arosio [mailto:devlst-it...@yahoo.it]

Re: [iText-questions] [patch-itextsharp] Fixes to attachment handling

2009-09-29 Thread Paulo Soares
Yes, the ordering is done as text but the PDF expects the ordering to be done byte by byte irrespective of the encoding. It's an iText bug. Paulo > -Original Message- > From: Leonard Rosenthol [mailto:lrose...@adobe.com] > Sent: Tuesday, September 29, 2009 3:55 PM > To: Post all your q

[iText-questions] Thumbnail image of PDF

2009-09-29 Thread Davis Ford
Hi, I was scanning the archives for a solution to this -- there seem to be various solutions like using JPedal. I would like to generate a png/jpg/gif thumbnail image of the first page of a PDF that I create with iText. Is JPedal the best route? Can it be done easily with JAI ? Thanks in advanc

Re: [iText-questions] Embeded CRL not recognize by Adobe

2009-09-29 Thread Paulo Soares
You'll have to increase the array size depending on the signature size, 128 for 1024 bit, 256 for 2048 and so on. I'm guessing on what the might be but there's no limit in iText for the signature size. Paulo > -Original Message- > From: java-chris [mailto:christian.lecl...@sphere3soluti

Re: [iText-questions] [patch-itextsharp] Fixes to attachment handling

2009-09-29 Thread Vesa Jääskeläinen
Hi All, Ok. I have updated the file on the web: http://nokkau.net/~chaac/files/itextsharp/itextsharp-attachment-problem.zip Now if you open source_with_add_me_added_svn.pdf with Adobe Reader (9.1.3). Attachments pane will be visible and two attachments shown. Now if you select add_me.txt and the

Re: [iText-questions] Embeded CRL not recognize by Adobe

2009-09-29 Thread java-chris
Iv'e got the certificate of the trusted root, The signature is fine, its realy the CRL that is not embeded. Like Paulo Soares said, I have to add the crl has Signature Attributes. But the problems is , I can't add the signature via external signature dictionary because I use Entrust and the hash

Re: [iText-questions] [patch-itextsharp] Fixes to attachment handling

2009-09-29 Thread Vesa Jääskeläinen
Hi, Hmm... It requires that you add that attachment with iTextSharp. But let me undo some local changes that affects generation and also make one example file with current SVN version. Thanks, Vesa Jääskeläinen Leonard Rosenthol wrote: > I looked at both files in that archive and see no proble

Re: [iText-questions] Embeded CRL not recognize by Adobe

2009-09-29 Thread Leonard Rosenthol
Signature looks fine - but since it's not chained to a trusted root, I get unknown validity. -Original Message- From: java-chris [mailto:christian.lecl...@sphere3solutions.com] Sent: Tuesday, September 29, 2009 9:48 AM To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questio

Re: [iText-questions] Embeded CRL not recognize by Adobe

2009-09-29 Thread Paulo Soares
See http://itextpdf.sourceforge.net/howtosign.html#signextdicattrib. Paulo > -Original Message- > From: java-chris [mailto:christian.lecl...@sphere3solutions.com] > Sent: Tuesday, September 29, 2009 2:48 PM > To: itext-questions@lists.sourceforge.net > Subject: Re: [iText-questions] Emb

Re: [iText-questions] Embeded CRL not recognize by Adobe

2009-09-29 Thread java-chris
Thanks for your quick answers ! Here my concerns : CRLs must be added as a signed attribute. Ok , any clue of how I can do this, im pretty new with itext and signatures field ? By the way I use Adobe Reader 9 Windows Xp Pro Put the document here : http://chris.sphere3solutions.com/test_

Re: [iText-questions] Concatenating pdf while preserving annotations

2009-09-29 Thread Fabrizio Arosio
Many thanks for your response. My approach is to manually build PdfAnnotation objects starting from imported pages' annotation dictionaries. I would then add these PdfAnnotation objects to the PdfWriter. Even if it is not the most appropriate way, do you think it is sufficient to perform the task

Re: [iText-questions] Importing a PDF as an Image object

2009-09-29 Thread 1T3XT info
Y Fang wrote: > Okay...I didn't know I could get chapters of this book for free. Thanks > for the reference, I've read the sections 2.2.4 till 2.2.8 > > However it still does not answer my question, of why the Images I'm > producing seem to be 'attached' to the writer object and can't be passed

Re: [iText-questions] Concatenating pdf while preserving annotations

2009-09-29 Thread Leonard Rosenthol
There are other ways, but they require low level manipulation of the PDF data structures and content stream... -Original Message- From: Fabrizio Arosio [mailto:devlst-it...@yahoo.it] Sent: Tuesday, September 29, 2009 4:27 AM To: itext-questions@lists.sourceforge.net Subject: [iText-quest

Re: [iText-questions] Importing a PDF as an Image object

2009-09-29 Thread Y Fang
Okay...I didn't know I could get chapters of this book for free. Thanks for the reference, I've read the sections 2.2.4 till 2.2.8 However it still does not answer my question, of why the Images I'm producing seem to be 'attached' to the writer object and can't be passed around and used in any

Re: [iText-questions] [patch-itextsharp] Fixes to attachment handling

2009-09-29 Thread Paulo Soares
That't Acrobat 7 not 5. Paulo > -Original Message- > From: Paulo Soares [mailto:psoa...@glintt.com] > Sent: Tuesday, September 29, 2009 10:23 AM > To: Post all your questions about iText here > Subject: Re: [iText-questions] [patch-itextsharp] Fixes to > attachment handling > > It wor

Re: [iText-questions] [patch-itextsharp] Fixes to attachment handling

2009-09-29 Thread Paulo Soares
It works for me in Acrobat 5 and Reader 9. Paulo > -Original Message- > From: Vesa Jääskeläinen [mailto:ch...@nic.fi] > Sent: Monday, September 28, 2009 6:48 PM > To: Post all your questions about iText here > Subject: Re: [iText-questions] [patch-itextsharp] Fixes to > attachment hand

Re: [iText-questions] Embeded CRL not recognize by Adobe

2009-09-29 Thread Paulo Soares
CRLs must be added as a signed attribute. Paulo > -Original Message- > From: java-chris [mailto:christian.lecl...@sphere3solutions.com] > Sent: Monday, September 28, 2009 8:32 PM > To: itext-questions@lists.sourceforge.net > Subject: [iText-questions] Embeded CRL not recognize by Adobe

Re: [iText-questions] iText-questions Digest, Vol 40, Issue 84

2009-09-29 Thread Klas Lindbäck
I would separate the form into a template consisting of two pages. The first page has the stuff that goes above the table. Then I would import the first page to my pdf, add the table and then import the second page. I've never used form fields, but if I understand correctly there may be some a

Re: [iText-questions] Importing a PDF as an Image object

2009-09-29 Thread 1T3XT info
Y Fang wrote: > What am I doing wrong here? You didn't read p60 of "iText in Action". That page is in chapter 2, and chapter 2 is available for free here: http://itextsoftware.com/chap2ebook.shtml > Why is the image returned by method1 not > valid? For obvious reasons explained in the book. --

[iText-questions] Problem with PdfStamper

2009-09-29 Thread Giovanni Virdis
Hi, Thsi is my problem: I have create a pdf my adobe livecycle and I put it in a specific folder. I have build the function "copiaFileParam(String nomeFile,String pathSorge,String pathDest,String new_nomeFile, String cordX,String cordY)" That create a copy of my pdf setting a value fie

[iText-questions] Concatenating pdf while preserving annotations

2009-09-29 Thread Fabrizio Arosio
Hello to all. I need to concatenate a number of pdf files into a single pdf. Every page of source pdfs have to be resized and centered into the output page (actual resizing, i.e. not changing page boundaries). The problem is that the interactive features of source page have to be kept (at least

[iText-questions] Importing a PDF as an Image object

2009-09-29 Thread Y Fang
Hey, I'm working on a project that uses iTextSharp to output a PDF. As part of the project, I'd like to be able to import existing PDFs and turn the pages into images. I can then manipulate these pages as Image objects (e.g. resize them, rotate, etc.) and then add them to the output PDF. >F