Java Mailing List Archive

http://www.junlu.com/

Google
Google
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
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
-none-

-none-

2007-10-01       - By Jamie Badman

 Back
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">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?</font>
<br>
<br><font size=2 face="sans-serif">Cheers,</font>
<br>
<br><font size=2 face="sans-serif">Jamie.</font>
<br>
<br><tt><font size=2>itext-questions-bounces@(protected) wrote
on 28/09/2007 17:56:18:<br>
<br>
&gt; I suspect that the XML binding is not creating the appearances. You'll<br>
&gt; have to call AcroFields.regenerateField() for each field to recreate
the<br>
&gt; appearances.<br>
&gt; <br>
&gt; Paulo <br>
&gt; <br>
&gt; &gt; -- --Original Message-- --<br>
&gt; &gt; From: itext-questions-bounces@(protected) <br>
&gt; &gt; [mailto:itext-questions-bounces@(protected)] On <br>
&gt; &gt; Behalf Of Jamie Badman<br>
&gt; &gt; Sent: Friday, September 28, 2007 5:43 PM<br>
&gt; &gt; To: Post all your questions about iText here<br>
&gt; &gt; Subject: Re: [iText-questions] Concatenating Form Based V8 Documents
<br>
&gt; &gt; <br>
&gt; &gt; <br>
&gt; &gt; Cheers Paulo - here's what I'm trying now: <br>
&gt; &gt; <br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; try{ <br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; // Now flatten the PDF <br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; flattenedDest = &quot;flat_&quot; + destination; <br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; PdfReader reader = new PdfReader(pdfDir + <br>
&gt; &gt; &quot;/&quot; + destination); <br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; PdfStamper stamper = new <br>
&gt; &gt; PdfStamper(reader, new FileOutputStream(pdfDir + &quot;/&quot;
+ <br>
&gt; &gt; flattenedDest)); <br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; stamper.setFormFlattening(true); <br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; stamper.close(); <br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; } catch (Exception e){ <br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out
.println(&quot;Error
flattening PDF&quot;); <br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; } <br>
&gt; &gt; <br>
&gt; &gt; But this doesn't seem to do the trick - do I need to do more
<br>
&gt; &gt; than call setFormFlattening(true) ? <br>
&gt; &gt; <br>
&gt; &gt; Thanks, <br>
&gt; &gt; <br>
&gt; &gt; Jamie. <br>
&gt; &gt; <br>
&gt; &gt; -- ---- ---- ---- ---- ---- ---- ---- ------<br>
&gt; &gt; Jamie Badman<br>
&gt; &gt; Deutsche Bank<br>
&gt; &gt; Information Enterprise Services<br>
&gt; &gt; Cross Platform Engineering<br>
&gt; &gt; <br>
&gt; &gt; Office: +44 207 5457280 <br>
&gt; &gt; <br>
&gt; &gt; itext-questions-bounces@(protected) wrote on <br>
&gt; &gt; 28/09/2007 17:05:26:<br>
&gt; &gt; <br>
&gt; &gt; &gt; Use PdfStamper first to flatten the docs, this will remove
<br>
&gt; &gt; the fields,<br>
&gt; &gt; &gt; leaving the field appearances, and will also remove the
<br>
&gt; &gt; XFA. Then, use<br>
&gt; &gt; &gt; PdfCopy to concatenate the PDFs.<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; Paulo <br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; -- --Original Message-- --<br>
&gt; &gt; &gt; &gt; From: itext-questions-bounces@(protected)
<br>
&gt; &gt; &gt; &gt; [mailto:itext-questions-bounces@(protected)]
On <br>
&gt; &gt; &gt; &gt; Behalf Of Jamie Badman<br>
&gt; &gt; &gt; &gt; Sent: Friday, September 28, 2007 4:57 PM<br>
&gt; &gt; &gt; &gt; To: itext-questions@(protected)<br>
&gt; &gt; &gt; &gt; Subject: [iText-questions] Concatenating Form Based
V8 Documents<br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; Hi, <br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; Wonder if someone can help... <br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; I'm generating some individual PDF pages using Adobe
<br>
&gt; &gt; &gt; &gt; LiveCycle DS by creating template PDF files using LiveCycle
<br>
&gt; &gt; &gt; &gt; Designer and then binding an XML dataset to the document
to <br>
&gt; &gt; &gt; &gt; create a data-populated PDF. <br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; I then want to concatenate the pages together - but
when I <br>
&gt; &gt; &gt; &gt; try to do this using iText, only static text shows
on each <br>
&gt; &gt; &gt; &gt; page, except for the final page. <br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; I try merging the pages by hand using Acrobat and I
get an <br>
&gt; &gt; &gt; &gt; error that says &quot;Adobe XML Forms Cannot be Merged&quot
;.
When I <br>
&gt; &gt; &gt; &gt; use Acrobat to assemble the files into a PDF package,
<br>
&gt; &gt; it's all good. <br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; So I'm guessing that iText is having the same problem
- that <br>
&gt; &gt; &gt; &gt; it's trying to do a basic merging of the files but
in fact I <br>
&gt; &gt; &gt; &gt; need it to assemble a package... <br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; Can iText do this? <br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; I'm currently using pdfCopyFields to merge the files.
<br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; Incidentally, when I look at the version of the resulting
PDF <br>
&gt; &gt; &gt; &gt; file that iText creates, it's PDF Version 1.4 (Acrobat
V5). <br>
&gt; &gt; &gt; &gt; The source files are PDF Version 1.7 (Acrobat V8).
I tried <br>
&gt; &gt; &gt; &gt; using the 'Version' parameter with pdfCopyFields, setting
it <br>
&gt; &gt; &gt; &gt; to '8' but it gets ignored - guess I'm doing that wrong!
<br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; Is it possible to somehow 'flatten' the individual
PDF files <br>
&gt; &gt; &gt; &gt; so that they are no longer form-based PDF's? I really
don't <br>
&gt; &gt; &gt; &gt; need them to be, once they have the data inside. If
I could <br>
&gt; &gt; &gt; &gt; do this, I think the problem is solved. <br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; Anyway, to summarize... is iText able to accomplish
the <br>
&gt; &gt; &gt; &gt; concatenation I'm attempting? If so, how... if not
then does <br>
&gt; &gt; &gt; &gt; anyone have any thoughts on what other product I might
try? <br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; Thanks for your time and patience ;-) <br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; Cheers, <br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; Jamie. <br>
&gt; <br>
&gt; <br>
&gt; Aviso Legal:<br>
&gt; <br>
&gt; Esta mensagem ? destinada exclusivamente ao destinat?rio. Pode <br>
&gt; conter informa??o confidencial ou legalmente protegida. A incorrecta<br>
&gt; transmiss?o desta mensagem n?o significa a perca de <br>
&gt; confidencialidade. Se esta mensagem for recebida por engano, por <br>
&gt; favor envie-a de volta para o remetente e apague-a do seu sistema
de<br>
&gt; imediato. ? proibido a qualquer pessoa que n?o o destinat?rio de <br>
&gt; usar, revelar ou distribuir qualquer parte desta mensagem. <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; Disclaimer:<br>
&gt; <br>
&gt; This message is destined exclusively to the intended receiver. It
<br>
&gt; may contain confidential or legally protected information. The <br>
&gt; incorrect transmission of this message does not mean the loss of its<br>
&gt; confidentiality. If this message is received by mistake, please send<br>
&gt; it back to the sender and delete it from your system immediately.
It<br>
&gt; is forbidden to any person who is not the intended receiver to use,
<br>
&gt; distribute or copy any part of this message.<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
<br>
&gt; This SF.net email is sponsored by: Microsoft<br>
&gt; Defy all challenges. Microsoft(R) Visual Studio 2005.<br>
&gt; http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/<br>
&gt; __ ____ ____ ____ ____ ____ ____ ____ ____ ____<br>
&gt; iText-questions mailing list<br>
&gt; iText-questions@(protected)<br>
&gt; https://lists.sourceforge.net/lists/listinfo/itext-questions<br>
&gt; 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/

©2008 junlu.com - Jax Systems, LLC, U.S.A.