[iText-questions] bug in PdfStamper?
I'm getting an exception in the following program that has me baffled. Any help would be greatly appreciated. The stack trace is: -- java.lang.ClassCastException at com.lowagie.text.pdf.PdfReader.getPageContent(PdfReader.java:865) at com.lowagie.text.pdf.PdfStamperImp.alterContents(PdfStamperImp.java:207) at com.lowagie.text.pdf.PdfStamperImp.close(PdfStamperImp.java:100) at com.lowagie.text.pdf.PdfStamper.close(PdfStamper.java:117) at StampErr.main(StampErr.java:20) -- The input PDF form, OSR-1.pdf, is available from: http://www.northwestern.edu/orsp/docs/OSR-1.pdf import java.io.*; import com.lowagie.text.*; import com.lowagie.text.pdf.*; public class StampErr { public static void main(String[] args) { try { PdfReader reader = new PdfReader(C:\\OSR-1.pdf); PdfStamper stamp = new PdfStamper(reader, new FileOutputStream(c:\\aaa.pdf)); stamp.setFormFlattening(true); stamp.close(); } catch(Exception e) { e.printStackTrace(); } } } Thanks. Sam Quiring --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
Re: [iText-questions] Pdf 1.7 and merging XFA data
Sorry for my ignorance, but what do you mean by the phrase XFA-native APIs? Since you use the plural, can you list two such APIs? -Sam - Original Message - From: Leonard Rosenthol To: Post all your questions about iText here Sent: Saturday, November 10, 2007 9:07 AM Subject: Re: [iText-questions] Pdf 1.7 and merging XFA data Acrobat 8.1 (and equivalent version of LiveCycle Designer) NO LONGER SUPPORTS the mirroring of XFA fields into AcroFields in dynamic documents - which is why you can no longer use the method you've chosen on dynamic documents. You need to switch to using the XFA-native APIs. Leonard On Nov 10, 2007, at 12:23 AM, Scott Dunbar wrote: Paulo, Thanks for your help. Rather than clog the mailboxes of every iText mailing list user I put a sample at http://www.xigole.com/scott/itext/pdf1.7issue.zip to download (1.4Mb). This file contains roughly the source I'm using and shows that only Acrobat 8 dynamic files have a problem but Acrobat 7 static and dynamic and Acrobat 8 static work. The file contains a sample XDP (my source data), 4 PDF's (7 and 8 static and dynamic), the source code (single Java file) and a build file. Once built run either the batch or shell script to generate 4 different PDF's from the source PDF's. If there is anything I can do to assist this effort I would be happy to do so. I am reading the generated PDF with Adobe Acrobat 8.1.1 Professional. Thanks again for any help. Paulo Soares wrote: I don't have Acrobat 8, so I can't know what's going on there. Plaese post your pdf in version 7 and version 8 so that I can see the differences. Paulo -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Dunbar Sent: Wednesday, November 07, 2007 5:49 PM To: Post all your questions about iText here Subject: [iText-questions] Pdf 1.7 and merging XFA data Hello, I've got a version 1.7 PDF that I'm trying to get the AcroFields out of, merge XFA data into it, and save it. If I save the PDF as an Acrobat 7 (static or dynamic) PDF in LiveCycle Designer 8.0 I can merge fine. If I save it as an Acrobat 8 PDF the result from PdfStamper.getAcroFields() seems to be empty and my resulting PDF does not have the any of the fields filled in. Is this an existing limitation of iText and PDF version 1.7 or should the code look different? Thanks very much for any help. The code: // inputDataElement is the xfa:data element from an existing XDP file PdfReader inputReader = new PdfReader( input.pdf ); File tempPdfFile = File.createTempFile( sd, .pdf ); FileOutputStream tempPdfOutputStream = new FileOutputStream( tempPdfFile ); PdfStamper pdfStamper = new PdfStamper( inputReader, tempPdfOutputStream ); AcroFields fields = pdfStamper.getAcroFields(); fields.mergeXfaData( inputDataElement ); pdfStamper.close(); tempPdfOutputStream.close(); Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. --- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/--___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/___ iText-questions mailing list
[iText-questions] How to change a PDF but preserve the rights
I have a PDF containing an XFA form; isXfaPresent() == true. The PDF was authored so that it can be opened in Adobe Reader, fields in the form can be filled, and the form can be saved by Reader to the file system. Using iText I have read in the PDF, obtained the XfaForm, changed values in the XML Document, and written a new PDF to the file system. The PDF I write out contains the values I put into the XML, but the rights to save the PDF from Reader have been lost. Is this expected? Other features of the original PDF are also lost in the newly-written PDF. I wrote the changed PDF to a new file. If this is the reason the save rights were lost, is there a way I can modify the existing PDF in place so that the rights to save the file from Adobe Reader are maintained? -Sam- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
[iText-questions] Invalid signature file digest for Manifest main attributes (2.0.7)
I have a small test program that uses iText. It's been working fine for weeks. Today I downloaded itext-2.0.7.jar and replaced itext-2.0.6.jar. I rebuilt - no problems. When I tried to execute, I received this stack dump shown below. Any ideas? I should probably mention that my build.xml file builds a single .jar from my simple test program and the itext-2.0.7.jar. To do this it unzips all the .jar files my code depends on (only itext-2.0.7.jar in this case) and then jars everything up into one big .jar with my main class called out in the manifest. I invoke my test program like this:java -jar test.jar Exception in thread main java.lang.SecurityException: Invalid signature file digest for Manifest main attributes at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source) at sun.security.util.SignatureFileVerifier.process(Unknown Source) at java.util.jar.JarVerifier.processEntry(Unknown Source) at java.util.jar.JarVerifier.update(Unknown Source) at java.util.jar.JarFile.initializeVerifier(Unknown Source) at java.util.jar.JarFile.getInputStream(Unknown Source) at sun.misc.URLClassPath$JarLoader$1.getInputStream(Unknown Source) at sun.misc.Resource.cachedInputStream(Unknown Source) at sun.misc.Resource.getByteBuffer(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source)- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] Invalid signature file digest for Manifest main attributes (2.0.7)
Xavier, Thanks. That is what I expected. Too bad. I really like packaging my app up as a single .jar file. What could be easier than one file and no classpaths? -Sam -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Xavier Le Vourch Sent: Saturday, December 08, 2007 1:51 PM To: Post all your questions about iText here Subject: Re: [iText-questions] Invalid signature file digest for Manifest main attributes (2.0.7) -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Samuel B. Quiring wrote: I have a small test program that uses iText. It's been working fine for weeks. Today I downloaded itext-2.0.7.jar and replaced itext-2.0.6.jar. I rebuilt - no problems. When I tried to execute, I received this stack dump shown below. Any ideas? Starting with 2.0.7, the official iText jar file is now signed by Bruno. It seems that your problem comes from the repackaging of parts of the official jar file done during your build process. As a first step, you could try to run you application using your own classes and the official jar file to see if it works in that situation. If that works then, you'll need to have a closer look at how you're repackaging the classes. It's probably best to keep the official jar as is and just add it as a dependency in the manifest file for your test.jar file. Xavier I should probably mention that my build.xml file builds a single .jar from my simple test program and the itext-2.0.7.jar. To do this it unzips all the .jar files my code depends on (only itext-2.0.7.jar in this case) and then jars everything up into one big .jar with my main class called out in the manifest. I invoke my test program like this:java -jar test.jar Exception in thread main java.lang.SecurityException: Invalid signature file digest for Manifest main attributes at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source) at sun.security.util.SignatureFileVerifier.process(Unknown Source) at java.util.jar.JarVerifier.processEntry(Unknown Source) at java.util.jar.JarVerifier.update(Unknown Source) at java.util.jar.JarFile.initializeVerifier(Unknown Source) at java.util.jar.JarFile.getInputStream(Unknown Source) at sun.misc.URLClassPath$JarLoader$1.getInputStream(Unknown Source) at sun.misc.Resource.cachedInputStream(Unknown Source) at sun.misc.Resource.getByteBuffer(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) - -- Xavier Le Vourch Brittany Software, Inc. [EMAIL PROTECTED] PGP Key (ID 0x896C5947): http://brittanysoftware.com/gpg_key.asc Key fingerprint: 73B3 6370 B8C5 4325 F2D8 4115 0372 5805 896C 5947 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHWxGkA3JYBYlsWUcRAtgQAJ9DEgLXDTIyBGkOuNyKGbq9pUxECACgjMOZ MYSIoVCwskqCPc7hA7IWX3M= =AtIK -END PGP SIGNATURE- - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] How to change a PDF but preserve the rights
Leonard, Are you sure? I have tried a few variations and I have not been able to get anything to work. I now have a simple identity() routine that changes nothing. The incoming PDF has rights that lets Reader save filled-in data. The resulting PDF has the rights removed. As far as I can tell, I changed nothing. What did I do wrong? Here is the code: public static void identity() { PdfReader reader = new PdfReader(C:/tmp/niceForm.pdf); reader.setAppendable(true); XfaForm xfaForm = new XfaForm(reader); FileOutputStream pdfOutput = new FileOutputStream(C:/tmp/newFormOut.pdf); PdfStamper stamper = new PdfStamper(reader, pdfOutput); xfaForm.setXfa(stamper.getWriter()); stamper.close(); pdfOutput.close(); reader.close(); } -Sam - Original Message - From: Leonard Rosenthol To: Post all your questions about iText here Sent: Monday, December 03, 2007 4:20 AM Subject: Re: [iText-questions] How to change a PDF but preserve the rights It _IS_ possible to fill in a PDF that has been Reader Enabled w/o violating the rights - but it MUST be done in a very specific fashion using append mode on the source PDF AND only modifying a limited number of objects in the PDF. So yes, if you are going to create a whole new PDF - you'll break the Reader Enabling. If you're careful about what you do, and how you do it, you CAN accomplish your goal. Leonard On Dec 3, 2007, at 2:05 AM, Samuel B. Quiring wrote: I have a PDF containing an XFA form; isXfaPresent() == true. The PDF was authored so that it can be opened in Adobe Reader, fields in the form can be filled, and the form can be saved by Reader to the file system. Using iText I have read in the PDF, obtained the XfaForm, changed values in the XML Document, and written a new PDF to the file system. The PDF I write out contains the values I put into the XML, but the rights to save the PDF from Reader have been lost. Is this expected? Other features of the original PDF are also lost in the newly-written PDF. I wrote the changed PDF to a new file. If this is the reason the save rights were lost, is there a way I can modify the existing PDF in place so that the rights to save the file from Adobe Reader are maintained? -Sam - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ -- - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] How to change a PDF but preserve the rights
I don't get it. How should this code be rewritten so that the resulting PDF still has the rights? Do you know for a fact that it can be done? -Sam _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Leonard Rosenthol Sent: Tuesday, February 05, 2008 6:09 AM To: Post all your questions about iText here Subject: Re: [iText-questions] How to change a PDF but preserve the rights You rewrote the PDF - therefore you changed it. Leonard On Feb 4, 2008, at 10:32 PM, Samuel B. Quiring wrote: Leonard, Are you sure? I have tried a few variations and I have not been able to get anything to work. I now have a simple identity() routine that changes nothing. The incoming PDF has rights that lets Reader save filled-in data. The resulting PDF has the rights removed. As far as I can tell, I changed nothing. What did I do wrong? Here is the code: public static void identity() { PdfReader reader = new PdfReader(C:/tmp/niceForm.pdf); reader.setAppendable(true); XfaForm xfaForm = new XfaForm(reader); FileOutputStream pdfOutput = new FileOutputStream(C:/tmp/newFormOut.pdf); PdfStamper stamper = new PdfStamper(reader, pdfOutput); xfaForm.setXfa(stamper.getWriter()); stamper.close(); pdfOutput.close(); reader.close(); } -Sam - Original Message - From: Leonard mailto:[EMAIL PROTECTED] Rosenthol To: Post all your questions mailto:itext-questions@lists.sourceforge.net about iText here Sent: Monday, December 03, 2007 4:20 AM Subject: Re: [iText-questions] How to change a PDF but preserve the rights It _IS_ possible to fill in a PDF that has been Reader Enabled w/o violating the rights - but it MUST be done in a very specific fashion using append mode on the source PDF AND only modifying a limited number of objects in the PDF. So yes, if you are going to create a whole new PDF - you'll break the Reader Enabling. If you're careful about what you do, and how you do it, you CAN accomplish your goal. Leonard On Dec 3, 2007, at 2:05 AM, Samuel B. Quiring wrote: I have a PDF containing an XFA form; isXfaPresent() == true. The PDF was authored so that it can be opened in Adobe Reader, fields in the form can be filled, and the form can be saved by Reader to the file system. Using iText I have read in the PDF, obtained the XfaForm, changed values in the XML Document, and written a new PDF to the file system. The PDF I write out contains the values I put into the XML, but the rights to save the PDF from Reader have been lost. Is this expected? Other features of the original PDF are also lost in the newly-written PDF. I wrote the changed PDF to a new file. If this is the reason the save rights were lost, is there a way I can modify the existing PDF in place so that the rights to save the file from Adobe Reader are maintained? -Sam - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ _ - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] How to change a PDF but preserve the rights
So what did you mean in your earlier mail, quoted below, when you said It _IS_ possible to fill in a PDF that has been Reader Enabled w/o violating the rights? -Sam _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Leonard Rosenthol Sent: Tuesday, February 05, 2008 6:25 AM To: Post all your questions about iText here Subject: Re: [iText-questions] How to change a PDF but preserve the rights It can't. If you make ANY changes to the PDF you will break the rights. It's specifically designed this way to detect tampering. The only choice you have, if you wish to distribute a file with Reader Enablement is to purchase Adobe LiveCycle ES and have it process your document AFTER you do whatever dynamic functionality you wish. Leonard On Feb 5, 2008, at 6:20 AM, Samuel B. Quiring wrote: I don't get it. How should this code be rewritten so that the resulting PDF still has the rights? Do you know for a fact that it can be done? -Sam _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Leonard Rosenthol Sent: Tuesday, February 05, 2008 6:09 AM To: Post all your questions about iText here Subject: Re: [iText-questions] How to change a PDF but preserve the rights You rewrote the PDF - therefore you changed it. Leonard On Feb 4, 2008, at 10:32 PM, Samuel B. Quiring wrote: Leonard, Are you sure? I have tried a few variations and I have not been able to get anything to work. I now have a simple identity() routine that changes nothing. The incoming PDF has rights that lets Reader save filled-in data. The resulting PDF has the rights removed. As far as I can tell, I changed nothing. What did I do wrong? Here is the code: public static void identity() { PdfReader reader = new PdfReader(C:/tmp/niceForm.pdf); reader.setAppendable(true); XfaForm xfaForm = new XfaForm(reader); FileOutputStream pdfOutput = new FileOutputStream(C:/tmp/newFormOut.pdf); PdfStamper stamper = new PdfStamper(reader, pdfOutput); xfaForm.setXfa(stamper.getWriter()); stamper.close(); pdfOutput.close(); reader.close(); } -Sam - Original Message - From: Leonard mailto:[EMAIL PROTECTED] Rosenthol To: Post all your mailto:itext-questions@lists.sourceforge.net questions about iText here Sent: Monday, December 03, 2007 4:20 AM Subject: Re: [iText-questions] How to change a PDF but preserve the rights It _IS_ possible to fill in a PDF that has been Reader Enabled w/o violating the rights - but it MUST be done in a very specific fashion using append mode on the source PDF AND only modifying a limited number of objects in the PDF. So yes, if you are going to create a whole new PDF - you'll break the Reader Enabling. If you're careful about what you do, and how you do it, you CAN accomplish your goal. Leonard On Dec 3, 2007, at 2:05 AM, Samuel B. Quiring wrote: I have a PDF containing an XFA form; isXfaPresent() == true. The PDF was authored so that it can be opened in Adobe Reader, fields in the form can be filled, and the form can be saved by Reader to the file system. Using iText I have read in the PDF, obtained the XfaForm, changed values in the XML Document, and written a new PDF to the file system. The PDF I write out contains the values I put into the XML, but the rights to save the PDF from Reader have been lost. Is this expected? Other features of the original PDF are also lost in the newly-written PDF. I wrote the changed PDF to a new file. If this is the reason the save rights were lost, is there a way I can modify the existing PDF in place so that the rights to save the file from Adobe Reader are maintained? -Sam - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ _ - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01
[iText-questions] Can iText add an attachment to an XFA-style PDF?
Greetings, I have a PDF that contains Javascript with this pattern: var oDoc = event.target; oDoc.importDataObject(localAttachmentName); The importDataObject method adds an attachment to the PDF file. The other related pattern is: var oDoc = event.target; var oAttachments = oDoc.dataObjects; . . . for(var i = 0; i oAttachments.length; i++) { var attMent = oAttachments[i]; recordAttachment(attMent.name, attMent.path); } Is there any way in iText to add an attachment to a PDF file like importDataObject() does? In particular I need the attachment to appear on the dataObjects list. -Sam - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
[iText-questions] Need help Flattening an XFA PDF
I need help flattening a PDF file where isXfaPresent() is true. I am trying to use the following routine. It works fine for older PDF forms. When isXfaPresent() is true this routine creates the new file without error, but Adobe Reader claims I need a newer version of Adobe Reader to read the result. function void flattener(String filename) { PdfReader reader = new PdfReader(filename); FileOutputStream pdfOutput; String outputFile = filename.replace(.pdf, _flat.pdf); pdfOutput = new FileOutputStream(outputFile); PdfStamper stamper = new PdfStamper(reader, pdfOutput); stamper.setFormFlattening(true); stamper.close(); pdfOutput.close(); reader.close(); } - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/