  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | -none- | -none- 2007-10-01 - By Jamie Badman
Back Yes. The single PDF page is generated fine - the image displays etc - but regen+flatten loses the image unfortunately. The image is base-64 (See http://ase-64.ora-code.com) encoded in the dataset and is bound to an image field in the document using LiveCycle Designer. I'm trying to use iText to perform the concatenation of a series of generated pages but it looks like the images get lost during the flatten process somehow.
Jamie.
-- ---- ---- ---- ---- ---- ---- ---- ------ Jamie Badman Deutsche Bank Information Enterprise Services Cross Platform Engineering
Office: +44 207 5457280
itext-questions-bounces@(protected) wrote on 01/10/2007 10:50:05:
> You have an image in the dataset? > > Paulo > > > -- --Original Message-- -- > > From: itext-questions-bounces@(protected) > > [mailto:itext-questions-bounces@(protected)] On > > Behalf Of Jamie Badman > > Sent: Monday, October 01, 2007 10:14 AM > > To: Post all your questions about iText here > > Subject: Re: [iText-questions] Concatenating Form Based V8 Documents > > > > > > This works perfectly now - for the text fields - but fields > > containing images still don't show. Nearly there though - any > > ideas on what might be causing the images to stay hidden? > > > > Cheers, > > > > Jamie. > > > > itext-questions-bounces@(protected) wrote on > > 28/09/2007 17:56:18: > > > > > I suspect that the XML binding is not creating the > > appearances. You'll > > > have to call AcroFields.regenerateField() for each field to > > recreate the > > > appearances. > > > > > > Paulo > > > > > > > -- --Original Message-- -- > > > > From: itext-questions-bounces@(protected) > > > > [mailto:itext-questions-bounces@(protected)] On > > > > Behalf Of Jamie Badman > > > > Sent: Friday, September 28, 2007 5:43 PM > > > > To: Post all your questions about iText here > > > > Subject: Re: [iText-questions] Concatenating Form Based > > V8 Documents > > > > > > > > > > > > Cheers Paulo - here's what I'm trying now: > > > > > > > > try{ > > > > // Now flatten the PDF > > > > flattenedDest = "flat_" + destination; > > > > PdfReader reader = new PdfReader(pdfDir + > > > > "/" + destination); > > > > PdfStamper stamper = new > > > > PdfStamper(reader, new FileOutputStream(pdfDir + "/" + > > > > flattenedDest)); > > > > stamper.setFormFlattening(true); > > > > stamper.close(); > > > > } catch (Exception e){ > > > > System.out.println("Error flattening PDF"); > > > > } > > > > > > > > But this doesn't seem to do the trick - do I need to do more > > > > than call setFormFlattening(true) ? > > > > > > > > Thanks, > > > > > > > > Jamie. > > > > > > > > -- ---- ---- ---- ---- ---- ---- ---- ------ > > > > Jamie Badman > > > > Deutsche Bank > > > > Information Enterprise Services > > > > Cross Platform Engineering > > > > > > > > Office: +44 207 5457280 > > > > > > > > itext-questions-bounces@(protected) wrote on > > > > 28/09/2007 17:05:26: > > > > > > > > > Use PdfStamper first to flatten the docs, this will remove > > > > the fields, > > > > > leaving the field appearances, and will also remove the > > > > XFA. Then, use > > > > > PdfCopy to concatenate the PDFs. > > > > > > > > > > Paulo > > > > > > > > > > > -- --Original Message-- -- > > > > > > From: itext-questions-bounces@(protected) > > > > > > [mailto:itext-questions-bounces@(protected)] On > > > > > > Behalf Of Jamie Badman > > > > > > Sent: Friday, September 28, 2007 4:57 PM > > > > > > To: itext-questions@(protected) > > > > > > Subject: [iText-questions] Concatenating Form Based > > V8 Documents > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > Wonder if someone can help... > > > > > > > > > > > > I'm generating some individual PDF pages using Adobe > > > > > > LiveCycle DS by creating template PDF files using LiveCycle > > > > > > Designer and then binding an XML dataset to the document to > > > > > > create a data-populated PDF. > > > > > > > > > > > > I then want to concatenate the pages together - but when I > > > > > > try to do this using iText, only static text shows on each > > > > > > page, except for the final page. > > > > > > > > > > > > I try merging the pages by hand using Acrobat and I get an > > > > > > error that says "Adobe XML Forms Cannot be Merged". When I > > > > > > use Acrobat to assemble the files into a PDF package, > > > > it's all good. > > > > > > > > > > > > So I'm guessing that iText is having the same problem - that > > > > > > it's trying to do a basic merging of the files but in fact I > > > > > > need it to assemble a package... > > > > > > > > > > > > Can iText do this? > > > > > > > > > > > > I'm currently using pdfCopyFields to merge the files. > > > > > > > > > > > > Incidentally, when I look at the version of the resulting PDF > > > > > > file that iText creates, it's PDF Version 1.4 (Acrobat V5). > > > > > > The source files are PDF Version 1.7 (Acrobat V8). I tried > > > > > > using the 'Version' parameter with pdfCopyFields, setting it > > > > > > to '8' but it gets ignored - guess I'm doing that wrong! > > > > > > > > > > > > Is it possible to somehow 'flatten' the individual PDF files > > > > > > so that they are no longer form-based PDF's? I really don't > > > > > > need them to be, once they have the data inside. If I could > > > > > > do this, I think the problem is solved. > > > > > > > > > > > > Anyway, to summarize... is iText able to accomplish the > > > > > > concatenation I'm attempting? If so, how... if not then does > > > > > > anyone have any thoughts on what other product I might try? > > > > > > > > > > > > Thanks for your time and patience ;-) > > > > > > > > > > > > Cheers, > > > > > > > > > > > > Jamie. > > > 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: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > __ ____ ____ ____ ____ ____ ____ ____ ____ ____ > iText-questions mailing list > iText-questions@(protected) > https://lists.sourceforge.net/lists/listinfo/itext-questions > Buy the iText book: http://itext.ugent.be/itext-in-action/
---
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden .
Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
<br><font size=2 face="sans-serif">Yes. The single PDF page is generated fine - the image displays etc - but regen+flatten loses the image unfortunately. The image is base-64 (See http://ase-64.ora-code.com) encoded in the dataset and is bound to an image field in the document using LiveCycle Designer. I'm trying to use iText to perform the concatenation of a series of generated pages but it looks like the images get lost during the flatten process somehow.</font> <br> <br><font size=2 face="sans-serif">Jamie.</font> <br><font size=2 face="sans-serif"><br> -- ---- ---- ---- ---- ---- ---- ---- ------<br> Jamie Badman<br> Deutsche Bank<br> Information Enterprise Services<br> Cross Platform Engineering<br> <br> Office: +44 207 5457280</font> <br> <br><tt><font size=2>itext-questions-bounces@(protected) wrote on 01/10/2007 10:50:05:<br> <br> > You have an image in the dataset?<br> > <br> > Paulo <br> > <br> > > -- --Original Message-- --<br> > > From: itext-questions-bounces@(protected) <br> > > [mailto:itext-questions-bounces@(protected)] On <br> > > Behalf Of Jamie Badman<br> > > Sent: Monday, October 01, 2007 10:14 AM<br> > > To: Post all your questions about iText here<br> > > Subject: Re: [iText-questions] Concatenating Form Based V8 Documents <br> > > <br> > > <br> > > This works perfectly now - for the text fields - but fields <br> > > containing images still don't show. Nearly there though - any <br> > > ideas on what might be causing the images to stay hidden? <br> > > <br> > > Cheers, <br> > > <br> > > Jamie. <br> > > <br> > > itext-questions-bounces@(protected) wrote on <br> > > 28/09/2007 17:56:18:<br> > > <br> > > > I suspect that the XML binding is not creating the <br> > > appearances. You'll<br> > > > have to call AcroFields.regenerateField() for each field to <br> > > recreate the<br> > > > appearances.<br> > > > <br> > > > Paulo <br> > > > <br> > > > > -- --Original Message-- --<br> > > > > From: itext-questions-bounces@(protected) <br> > > > > [mailto:itext-questions-bounces@(protected)] On <br> > > > > Behalf Of Jamie Badman<br> > > > > Sent: Friday, September 28, 2007 5:43 PM<br> > > > > To: Post all your questions about iText here<br> > > > > Subject: Re: [iText-questions] Concatenating Form Based <br> > > V8 Documents<br> > > > > <br> > > > > <br> > > > > Cheers Paulo - here's what I'm trying now: <br> > > > > <br> > > > > try{ <br> > > > > // Now flatten the PDF <br> > > > > flattenedDest = "flat_" + destination; <br> > > > > PdfReader reader = new PdfReader(pdfDir + <br> > > > > "/" + destination); <br> > > > > PdfStamper stamper = new <br> > > > > PdfStamper(reader, new FileOutputStream(pdfDir + "/ " + <br> > > > > flattenedDest)); <br> > > > > stamper.setFormFlattening(true); <br> > > > > stamper.close(); <br> > > > > } catch (Exception e){ <br> > > > > System.out.println("Error flattening PDF"); <br> > > > > } <br> > > > > <br> > > > > But this doesn't seem to do the trick - do I need to do more <br> > > > > than call setFormFlattening(true) ? <br> > > > > <br> > > > > Thanks, <br> > > > > <br> > > > > Jamie. <br> > > > > <br> > > > > -- ---- ---- ---- ---- ---- ---- ---- ------<br> > > > > Jamie Badman<br> > > > > Deutsche Bank<br> > > > > Information Enterprise Services<br> > > > > Cross Platform Engineering<br> > > > > <br> > > > > Office: +44 207 5457280 <br> > > > > <br> > > > > itext-questions-bounces@(protected) wrote on <br> > > > > 28/09/2007 17:05:26:<br> > > > > <br> > > > > > Use PdfStamper first to flatten the docs, this will remove <br> > > > > the fields,<br> > > > > > leaving the field appearances, and will also remove the <br> > > > > XFA. Then, use<br> > > > > > PdfCopy to concatenate the PDFs.<br> > > > > > <br> > > > > > Paulo <br> > > > > > <br> > > > > > > -- --Original Message-- --<br> > > > > > > From: itext-questions-bounces@(protected) .net <br> > > > > > > [mailto:itext-questions-bounces@(protected) .net] On <br> > > > > > > Behalf Of Jamie Badman<br> > > > > > > Sent: Friday, September 28, 2007 4:57 PM<br> > > > > > > To: itext-questions@(protected)<br> > > > > > > Subject: [iText-questions] Concatenating Form Based <br> > > V8 Documents<br> > > > > > > <br> > > > > > > <br> > > > > > > Hi, <br> > > > > > > <br> > > > > > > Wonder if someone can help... <br> > > > > > > <br> > > > > > > I'm generating some individual PDF pages using Adobe <br> > > > > > > LiveCycle DS by creating template PDF files using LiveCycle <br> > > > > > > Designer and then binding an XML dataset to the document to <br> > > > > > > create a data-populated PDF. <br> > > > > > > <br> > > > > > > I then want to concatenate the pages together - but when I <br> > > > > > > try to do this using iText, only static text shows on each <br> > > > > > > page, except for the final page. <br> > > > > > > <br> > > > > > > I try merging the pages by hand using Acrobat and I get an <br> > > > > > > error that says "Adobe XML Forms Cannot be Merged". When I <br> > > > > > > use Acrobat to assemble the files into a PDF package, <br> > > > > it's all good. <br> > > > > > > <br> > > > > > > So I'm guessing that iText is having the same problem - that <br> > > > > > > it's trying to do a basic merging of the files but in fact I <br> > > > > > > need it to assemble a package... <br> > > > > > > <br> > > > > > > Can iText do this? <br> > > > > > > <br> > > > > > > I'm currently using pdfCopyFields to merge the files. <br> > > > > > > <br> > > > > > > Incidentally, when I look at the version of the resulting PDF <br> > > > > > > file that iText creates, it's PDF Version 1.4 (Acrobat V5). <br> > > > > > > The source files are PDF Version 1.7 (Acrobat V8). I tried <br> > > > > > > using the 'Version' parameter with pdfCopyFields, setting it <br> > > > > > > to '8' but it gets ignored - guess I'm doing that wrong! <br> > > > > > > <br> > > > > > > Is it possible to somehow 'flatten' the individual PDF files <br> > > > > > > so that they are no longer form-based PDF's? I really don't <br> > > > > > > need them to be, once they have the data inside. If I could <br> > > > > > > do this, I think the problem is solved. <br> > > > > > > <br> > > > > > > Anyway, to summarize... is iText able to accomplish the <br> > > > > > > concatenation I'm attempting? If so, how... if not then does <br> > > > > > > anyone have any thoughts on what other product I might try? <br> > > > > > > <br> > > > > > > Thanks for your time and patience ;-) <br> > > > > > > <br> > > > > > > Cheers, <br> > > > > > > <br> > > > > > > Jamie. <br> > <br> > <br> > Aviso Legal:<br> > <br> > Esta mensagem ? destinada exclusivamente ao destinat?rio. Pode <br> > conter informa??o confidencial ou legalmente protegida. A incorrecta<br> > transmiss?o desta mensagem n?o significa a perca de <br> > confidencialidade. Se esta mensagem for recebida por engano, por <br> > favor envie-a de volta para o remetente e apague-a do seu sistema de<br> > imediato. ? proibido a qualquer pessoa que n?o o destinat?rio de <br> > usar, revelar ou distribuir qualquer parte desta mensagem. <br> > <br> > <br> > <br> > Disclaimer:<br> > <br> > This message is destined exclusively to the intended receiver. It <br> > may contain confidential or legally protected information. The <br> > incorrect transmission of this message does not mean the loss of its<br> > confidentiality. If this message is received by mistake, please send<br> > it back to the sender and delete it from your system immediately. It<br> > is forbidden to any person who is not the intended receiver to use, <br> > distribute or copy any part of this message.<br> > <br> > <br> > <br> > -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- <br> > This SF.net email is sponsored by: Microsoft<br> > Defy all challenges. Microsoft(R) Visual Studio 2005.<br> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/<br> > __ ____ ____ ____ ____ ____ ____ ____ ____ ____<br> > iText-questions mailing list<br> > iText-questions@(protected)<br> > https://lists.sourceforge.net/lists/listinfo/itext-questions<br> > Buy the iText book: http://itext.ugent.be/itext-in-action/<br> </font></tt> <br> <span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">- --<br> <br> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden .<br> <br> Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.</span><br> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ __ ____ ____ ____ ____ ____ ____ ____ ____ ____ iText-questions mailing list iText-questions@(protected) https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
|
|
 |