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 Paulo Soares

 Back
Can you post hihi.pdf?

Paulo


__ ____ ____ ____ ____ ____ ____

  From: itext-questions-bounces@(protected)
[mailto:itext-questions-bounces@(protected)] On Behalf Of
Gerold Krommer
  Sent: Friday, September 07, 2007 9:17 AM
  To: itext-questions@(protected)
  Subject: [iText-questions] Is a flattened form special?
 
 

 

  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.

 



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.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" 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"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16525" name=GENERATOR><o:SmartTagType
name="country-region"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o
:SmartTagType
name="City"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o
:SmartTagType
name="place"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><!--
[if !mso]>
<STYLE>st1\:* {
  BEHAVIOR: url(#default#ieooui)
}
</STYLE>
<![endif]-->
<STYLE>@(protected) {
  font-family: Wingdings;
}
@(protected) Section1 {size: 595.3pt 841.9pt; margin: 70.85pt 70.85pt 2.0cm 70.85pt; }
P.MsoNormal {
  FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
  FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
  FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
  COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
  COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
  COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
  COLOR: purple; TEXT-DECORATION: underline
}
SPAN.E-MailFormatvorlage17 {
  COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
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 vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=582535614-07092007><FONT face="Courier New"
color=#0000ff>Can you post hihi.pdf?</FONT></SPAN></DIV>
<DIV><SPAN class=582535614-07092007><FONT face="Courier New"
color=#0000ff></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=582535614-07092007><FONT face="Courier New"
color=#0000ff>Paulo</FONT></SPAN></DIV>
<DIV dir=ltr align=left><BR></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid;
MARGIN-RIGHT: 0px">
 <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
 <HR tabIndex=-1>
 <FONT face=Tahoma size=2><B>From:</B>
 itext-questions-bounces@(protected)
 [mailto:itext-questions-bounces@(protected)] <B>On Behalf Of
 </B>Gerold Krommer<BR><B>Sent:</B> Friday, September 07, 2007 9:17
 AM<BR><B>To:</B> itext-questions@(protected)<BR><B>Subject:</B>
 [iText-questions] Is a flattened form special?<BR></FONT><BR></DIV>
 <DIV></DIV>
 <DIV class=Section1>
 <P class=MsoNormal><FONT face=Arial size=2><SPAN
 style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT><
/P>
 <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; 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 face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; 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 face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; 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 face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT><
/P>
 <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; 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 face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT><
/P>
 <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">PdfReader pdfCoverReader = new
 PdfReader("C:\\hihi.pdf");&nbsp;&nbsp; </SPAN></FONT><FONT face=Wingdings
 size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; FONT-FAMILY: Wingdings">&szlig;</SPAN></FONT><FONT
 face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> this is the flattened
 form<o:p></o:p></SPAN></FONT></P>
 <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; 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 face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </SPAN></FONT><FONT face=Arial size=2><SPAN lang=FR
 style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Image foo =
 Image.getInstance(pip);<o:p></o:p></SPAN></FONT></P>
 <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 _pdfDocument.add(foo);<o:p></o:p></SPAN></FONT></P>
 <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 _pdfDocument.newPage();<o:p></o:p></SPAN></FONT></P>
 <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT><
/P>
 <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; 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 face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT><
/P>
 <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">/DI Gerold
 Krommer</SPAN></FONT><SPAN lang=EN-GB><o:p></o:p></SPAN></P>
 <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Manager Pre- und
 Postsales</SPAN></FONT><SPAN lang=EN-GB><o:p></o:p></SPAN></P>
 <P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; 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 face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; 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 face=Arial size=2><SPAN lang=EN-GB
 style="FONT-SIZE: 10pt; 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 face="Times New Roman" size=3><SPAN lang=EN-GB
 style="FONT-SIZE: 12pt">&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
 face=Arial size=1><SPAN lang=EN-GB
 style="FONT-WEIGHT: bold; FONT-SIZE: 7.5pt; FONT-STYLE: italic; FONT-FAMILY:
Arial">CONFIDENTIAL
 NOTICE</SPAN></FONT></I></B><I><FONT face=Arial size=1><SPAN lang=EN-GB
 style="FONT-SIZE: 7.5pt; FONT-STYLE: italic; FONT-FAMILY: Arial">: 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 face=Arial size=1><SPAN
 lang=DE-AT
 style="FONT-SIZE: 7.5pt; FONT-STYLE: italic; FONT-FAMILY: Arial">Thank
 you.</SPAN></FONT></I><FONT size=1><SPAN
 style="FONT-SIZE: 8pt"><o:p></o:p></SPAN></FONT></P>
 <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
 style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P></DIV></BLOCKQUOTE>
<DIV><P><HR>
Aviso Legal:<BR>
Esta mensagem &eacute; destinada exclusivamente ao destinat&aacute;rio. Pode
conter informa&ccedil;&atilde;o confidencial ou legalmente protegida. A
incorrecta transmiss&atilde;o desta mensagem n&atilde;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. &Eacute;
proibido a qualquer pessoa que n&atilde;o o destinat&aacute;rio de usar,
revelar ou distribuir qualquer parte desta mensagem. <BR>
<BR>
Disclaimer:<BR>
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.<BR>

</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.