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
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
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-09-07       - By Gerold Krommer

 Back


I am using iText 2.0.4 to create a single document out of many document
contained in a DMS repository. This works flawlessly. Some of the
documents in the DMS are already PDF and inclusion of them is no
problem.

To separate the documents I insert a cover sheet with some information
about the following document (date created, owner , whathaveyou) and use
a static PDF form (created in LC Designer 7) to fill in the fields.

Then I flatten the single page form and want to include it in my output
stream. The same code that works with other PDFs gives me an empty page
and absolutely no error.



This is the absolutely trivial code snippet which I basically copied
from 'iText in Action' which I'm a proud owner of.



PdfReader pdfCoverReader = new PdfReader("C:\\hihi.pdf");   <-- this is
the flattened form

     PdfImportedPage pip = _pdfWriter.getImportedPage(pdfCoverReader,
1);

     Image foo = Image.getInstance(pip);

     _pdfDocument.add(foo);

     _pdfDocument.newPage();



Since this works in other places, this makes me wonder if there is
something special about the flattened forms.



/DI Gerold Krommer

Manager Pre- und Postsales

ASTRON Business Services  G.m.b.H., Vienna, Austria

Tel.: +43 1 585 31 90-22

Fax: +43 1 585 31 90-15



CONFIDENTIAL NOTICE: The contents of this message, including any
attachments, are confidential and are intended solely for the use of the
person or entity to whom the message was addressed. If you are not the
intended recipient of this message, please be advised that any
dissemination, distribution, or use of the contents of this message is
strictly prohibited. If you received this message in error, please
notify the sender. Please also permanently delete all copies of the
original message and any attached documentation. Thank you.




<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft
-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1=
"urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC
-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@(protected)
  {font-family:Wingdings;
  panose-1 (See http://ose-1.ora-code.com):5 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
  {margin:0cm;
  margin-bottom:.0001pt;
  font-size:12.0pt;
  font-family:"Times New Roman";}
a:link, span.MsoHyperlink
  {color:blue;
  text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
  {color:purple;
  text-decoration:underline;}
span.E-MailFormatvorlage17
  {mso-style-type:personal-compose;
  font-family:Arial;
  color:windowtext;}
@(protected) Section1
  {size:595.3pt 841.9pt;
  margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
  {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
 <o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>

<body lang=DE link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>I am using iText 2.0.4 to create a single document
out of many document contained in a DMS repository. This works flawlessly. Some
of the documents in the DMS are already PDF and inclusion of them is no
problem.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>To separate the documents I insert a cover sheet with
some information about the following document (date created, owner ,
whathaveyou) and use a static PDF form (created in LC Designer 7) to fill in
the fields.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Then I flatten the single page form and want to
include it in my output stream. The same code that works with other PDFs gives
me an empty page and absolutely no error.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>This is the absolutely trivial code snippet which I
basically
copied from &#8216;iText in Action&#8217; which I&#8217;m a proud owner of.<o:p
></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>PdfReader pdfCoverReader = new
PdfReader(&quot;C:\\hihi.pdf&quot;);&nbsp;&nbsp; </span></font><font size=2
face=Wingdings><span lang=EN-GB style='font-size:10.0pt;font-family:Wingdings'>
&szlig;</span></font><font
size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial'>
this is the flattened form<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PdfImportedPage pip =
_pdfWriter.getImportedPage(pdfCoverReader, 1);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><font
size=2 face=Arial><span lang=FR style='font-size:10.0pt;font-family:Arial'>Image
foo = Image.getInstance(pip);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _pdfDocument.add(foo);
<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
_pdfDocument.newPage();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Since this works in other places, this makes me
wonder if there is something special about the flattened forms.<o:p></o:p><
/span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>/DI Gerold Krommer</span></font><span lang=EN-GB><o:p
></o:p></span></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Manager Pre- und Postsales</span></font><span
lang=EN-GB><o:p></o:p></span></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>ASTRON Business Services&nbsp; G.m.b.H., <st1:place
w:st="on"><st1:City w:st="on">Vienna</st1:City>, <st1:country-region w:st="on"
>Austria</st1:country-region></st1:place></span></font><span
lang=EN-GB><o:p></o:p></span></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Tel.: +43 1 585 31 90-22</span></font><span
lang=EN-GB><o:p></o:p></span></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Fax: +43 1 585 31 90-15</span></font><span
lang=EN-GB><o:p></o:p></span></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>
<b><i><font
size=1 face=Arial><span lang=EN-GB style='font-size:7.5pt;font-family:Arial;
font-weight:bold;font-style:italic'>CONFIDENTIAL NOTICE</span></font></i></b><i
><font
size=1 face=Arial><span lang=EN-GB style='font-size:7.5pt;font-family:Arial;
font-style:italic'>: The contents of this message, including any attachments,
are confidential and are intended solely for the use of the person or entity to
whom the message was addressed. If you are not the intended recipient of this
message, please be advised that any dissemination, distribution, or use of the
contents of this message is strictly prohibited. If you received this message
in error, please notify the sender. Please also permanently delete all copies
of the original message and any attached documentation.</span></font></i><i>
<span
lang=EN-GB style='font-style:italic'> </span></i><i><font size=1 face=Arial>
<span
lang=DE-AT style='font-size:7.5pt;font-family:Arial;font-style:italic'>Thank
you.</span></font></i><font size=1><span style='font-size:8.0pt'><o:p></o:p><
/span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
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@(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.