From: [EMAIL PROTECTED]
Reply-To: itext-questions@lists.sourceforge.net
To: itext-questions@lists.sourceforge.net
Subject: iText-questions digest, Vol 1 #3675 - 14 msgs
Date: Fri, 24 Feb 2006 02:23:02 -0800
Send iText-questions mailing list submissions to
itext-questions@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/itext-questions
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of iText-questions digest..."
Today's Topics:
1. Re: Pixel values of a PDF page (Bruno Lowagie)
2. Re: highlights (Bruno Lowagie)
3. Re: Writing an XMP Xpacket (Bruno Lowagie)
4. Re: Re: StackOverflowException PdfGraphics2D.drawString (Mac OS X
only) (Paulo Soares)
5. Re: How to Add HyperLink Image (Bruno Lowagie)
6. RE: Pixel values of a PDF page (kalper)
7. iTex compatibale version with JDK 1.3 (Manjith Gunatilaka)
8. RE: PDF compression ([EMAIL PROTECTED])
9. non printable watermark (Manoj Talreja)
10. Re: iTex compatibale version with JDK 1.3 (Bruno Lowagie)
11. Re: non printable watermark (Bruno Lowagie)
12. load afm fonts with fontfactory (=?ISO-8859-15?Q?Thomas_K=FCbler?=)
13. RE: load afm fonts with fontfactory (Paulo Soares)
14. Re: createGraphics and Tomcat problem
([EMAIL PROTECTED])
--__--__--
Message: 1
Date: Fri, 24 Feb 2006 08:45:57 +0100
From: Bruno Lowagie <[EMAIL PROTECTED]>
To: kalper <[EMAIL PROTECTED]>
CC: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] Pixel values of a PDF page
kalper wrote:
>Do you know any library(especially Java and open source) that can take
the
>pixel values of a pdf page?
>
I have no idea why you are looking for such functionality
because the question is really absurd.
One of the assets of PDF is that it doesn't have a resolution,
so it doesn't have any pixels. Also Leonard explained about
the color spaces. What's the origin of your question?
br,
Bruno
--__--__--
Message: 2
Date: Fri, 24 Feb 2006 08:50:31 +0100
From: Bruno Lowagie <[EMAIL PROTECTED]>
To: "Yefimov, Sergey" <[EMAIL PROTECTED]>
CC: "'itext-questions@lists.sourceforge.net'"
<itext-questions@lists.sourceforge.net>
Subject: Re: [iText-questions] highlights
Yefimov, Sergey wrote:
> Thank you very much for your answer.
>
> I have another question according to the text highlighting. In acrobat
> you can open for example this url
> http://www.adobe.com/a.pdf#xml=www.adobe.com/a.txt
>
(http://partners.adobe.com/public/developer/en/pdf/HighlightFileFormat.pdf
> ) with highlights. Is there any functionality in itext library to
> open file with highlights?
>
>
>
>
>
Not yet,
br,
Bruno
--__--__--
Message: 3
Date: Fri, 24 Feb 2006 08:58:04 +0100
From: Bruno Lowagie <[EMAIL PROTECTED]>
To: "Segev, Eli" <[EMAIL PROTECTED]>
CC: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] Writing an XMP Xpacket
Segev, Eli wrote:
> How can I retrieve the id from this xpacket?
>
By parsing the XML?
> Is there a standard way of writing the xpacket headers using iText?=20
> What I mean by header is the lines that I included above.
>
http://partners.adobe.com/public/developer/en/xmp/sdk/xmpspecification.pd=
f
> BTW, I do know how to set the type to =91METADATA=92 and the subtype to=
=20
> =91XML=92, but not how to write the xpacket header.
>
http://itextdocs.lowagie.com/docs/com/lowagie/text/xml/xmp/package-summar=
y.html
br,
Bruno
--__--__--
Message: 4
From: "Paulo Soares" <[EMAIL PROTECTED]>
To: <itext-questions@lists.sourceforge.net>,
<[EMAIL PROTECTED]>
Subject: Re: [iText-questions] Re: StackOverflowException
PdfGraphics2D.drawString (Mac OS X only)
Date: Fri, 24 Feb 2006 07:55:45 -0000
That's fixed now in the CVS.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <itext-questions@lists.sourceforge.net>
Sent: Thursday, February 23, 2006 8:54 PM
Subject: [iText-questions] Re: StackOverflowException
PdfGraphics2D.drawString (Mac OS X only)
> Does anyone know if this has been entered into the bug system for itext?
> It doesn't appear to be fixed yet.
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language
> that extends applications into web and mobile media. Attend the live
> webcast
> and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
--__--__--
Message: 5
Date: Fri, 24 Feb 2006 09:00:51 +0100
From: Bruno Lowagie <[EMAIL PROTECTED]>
To: GigiJK <[EMAIL PROTECTED]>
CC: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] How to Add HyperLink Image
GigiJK wrote:
> Hello,
> Can anyone show me how to add a hyperlink image on the upper lefthand
> corner of a pdf file using iText?
>
Create the image:
Image gif = Image.getInstance("../../chapter10/resources/iTextLogo.gif");
Add the hyperlink:
gif.setAnnotation(new Annotation(0, 0, 0, 0,
"http://www.lowagie.com/iText"));
Set the coordinates:
gif.setAbsolutePosition(30f, 750f);
Add the image:
document.add(gif);
br,
Bruno
--__--__--
Message: 6
Date: Thu, 23 Feb 2006 13:43:45 -0800 (PST)
From: kalper <[EMAIL PROTECTED]>
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] RE: Pixel values of a PDF page
I just want to obtain RGB and CMYK value for each pixel of a PDF page. I do
not need to preview the page or convert it to an image. A library
(especially java and open source) which takes a PDF page and give the
resulting byte or integer array of the RGB and CMYK values for each pixel
is
enough for me.
--
View this message in context:
http://www.nabble.com/Pixel-values-of-a-PDF-page-t1174363.html#a3098239
Sent from the iText - General forum at Nabble.com.
--__--__--
Message: 7
Date: Fri, 24 Feb 2006 12:07:38 +1100
From: Manjith Gunatilaka <[EMAIL PROTECTED]>
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] iTex compatibale version with JDK 1.3
Hi ,
I am looking for a iText older version. Other than 1.3
I tried to compile iTex version 1.3 with JDK 1.3 and encountered some
compilation error.
Could you please send me an URL or jar file compatible for JDK 1.3
Cheers
Manjith
--__--__--
Message: 8
To: itext-questions@lists.sourceforge.net
Cc: [EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Date: Thu, 23 Feb 2006 16:15:00 +0530
Subject: [iText-questions] RE: PDF compression
This is a multipart message in MIME format.
--=_alternative 003B5E9E6525711E_=
Content-Type: text/plain; charset="US-ASCII"
Hi,
I would like to have PDF compression using ITEXT. How do i achieve this?
itried using setFullCompression() method.. however it didn't workout.. is
there anyother way i can achieve this?? is linearization and fast web view
also available in itext?
looking for a quick and positive reply from you...
thanks & regards,
harshii
Notice: The information contained in this e-mail message and/or attachments
to it may contain confidential or privileged information. If you are not
the intended recipient, any dissemination, use, review, distribution,
printing or copying of the information contained in this e-mail message
and/or attachments to it are strictly prohibited. If you have received
this communication in error, please notify us by reply e-mail or telephone
and immediately and permanently delete the message and any attachments.
Thank you
--=_alternative 003B5E9E6525711E_=
Content-Type: text/html; charset="US-ASCII"
<br><font size=2 face="sans-serif">Hi,</font>
<br><font size=2 face="sans-serif">I would like to have PDF compression
using ITEXT. How do i achieve this? itried using </font><font size=2
face="Courier New">setFullCompression()
method.. however it didn't workout.. is there anyother way i can
achieve this?? is linearization and fast web view also available in
itext?</font>
<br><font size=2 face="Courier New">looking for a quick and positive reply
from you...</font>
<br>
<br><font size=2 face="Courier New">thanks & regards,</font>
<br><font size=2 face="Courier New">harshii</font>
<br><font size=2 face="sans-serif"><br>
</font>
<table><tr><td bgcolor=#ffffff><font color=#000000>Notice: The information
contained in this e-mail message and/or attachments to it may contain
confidential or privileged information. If you are not the intended
recipient, any dissemination, use, review, distribution, printing or
copying of the information contained in this e-mail message and/or
attachments to it are strictly prohibited. If you have received this
communication in error, please notify us by reply e-mail or telephone and
immediately and permanently delete the message and any attachments. Thank
you<br>
</font></td></tr></table>
--=_alternative 003B5E9E6525711E_=--
--__--__--
Message: 9
Date: Fri, 24 Feb 2006 12:25:47 +0530
From: "Manoj Talreja" <[EMAIL PROTECTED]>
To: <itext-questions@lists.sourceforge.net>
Subject: [iText-questions] non printable watermark
This is a multi-part message in MIME format.
------_=_NextPart_001_01C6390F.5993D668
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi,
=20
How can I make watermark or image non printable? There is one suggestion
to add the non printable data inside button, but I was wondering if
there is any way I can add watermark image inside button to make it
non-printable. Thanks in advance.
=20
Regards,
Manoj Talreja
------_=_NextPart_001_01C6390F.5993D668
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
{font-family:"[EMAIL PROTECTED] Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
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.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Hi,<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>How can I make watermark or image non printable? =
There is
one suggestion to add the non printable data inside button, but I was =
wondering
if there is any way I can add watermark image inside button to make it
non-printable. Thanks in advance.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Regards,<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Manoj Talreja<o:p></o:p></span></font></p>
</div>
</body>
</html>
------_=_NextPart_001_01C6390F.5993D668--
--__--__--
Message: 10
Date: Fri, 24 Feb 2006 09:15:58 +0100
From: Bruno Lowagie <[EMAIL PROTECTED]>
To: Manjith Gunatilaka <[EMAIL PROTECTED]>
CC: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] iTex compatibale version with JDK 1.3
Manjith Gunatilaka wrote:
> Hi ,
> I am looking for a iText older version. Other than 1.3
>
> I tried to compile iTex version 1.3 with JDK 1.3 and encountered some
> compilation error.
>
> Could you please send me an URL or jar file compatible for JDK 1.3
No,
but if you tell us about the compilation error,
we can work around it in the next iText version.
br,
Bruno
--__--__--
Message: 11
Date: Fri, 24 Feb 2006 09:18:30 +0100
From: Bruno Lowagie <[EMAIL PROTECTED]>
To: Manoj Talreja <[EMAIL PROTECTED]>
CC: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] non printable watermark
Manoj Talreja wrote:
> Hi,
>
>
>
> How can I make watermark or image non printable? There is one
> suggestion to add the non printable data inside button, but I was
> wondering if there is any way I can add watermark image inside button
> to make it non-printable. Thanks in advance.
>
>
>
I don't understand your explanation,
but I would add the image and watermark
in an Optional Content layer with the option
set in a way that the image/watermark is
visible on screen, but not printed.
http://itextdocs.lowagie.com/tutorial/directcontent/optionalcontent/
br,
Bruno
--__--__--
Message: 12
Date: Fri, 24 Feb 2006 11:14:20 +0100
From: =?ISO-8859-15?Q?Thomas_K=FCbler?= <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] load afm fonts with fontfactory
Hello,
I still have the problem to load and work with type 1 afm fonts.
First i load the afm files with:
FontFileFilter filefilter =3D new FontFileFilter(fontextension);
File[] fontfilelist =3D new File(directoryname).listFiles(filefil=
ter);
cat.debug("fontdir: " + directoryname + " count: " +=20
fontfilelist.length);
for (int i =3D 0 ; i < fontfilelist.length; i++) {
String fontname =3D=20
fontfilelist[i].getName().substring(0,fontfilelist[i].getName().length()-=
4);
FontFactory.register(fontfilelist[i].toString());
cat.debug("postcriptfontname... " +=20
FontFactory.getFont(fontfilelist[i].toString()).getBaseFont().getPostscri=
ptFontName()=20
+ " path: " + fontfilelist[i].toString()); =20
}
after this, i print out all registered fonts with:
TreeSet families =3D new TreeSet(FontFactory.getRegisteredFamilie=
s());
fontcount =3D families.size();
for (Iterator i =3D families.iterator(); i.hasNext();) {
String name =3D (String) i.next();
cat.debug("FONTfactory: " + name);
}
but i only see the standard fonts:
DEBUG FONTfactory: Courier
DEBUG FONTfactory: Helvetica
DEBUG FONTfactory: Symbol
DEBUG FONTfactory: Times
DEBUG FONTfactory: Times-Roman
DEBUG FONTfactory: ZapfDingbats
what is wrong?
with regards
thomas k=FCbler
--=20
Mit freundlichen Gr=FC=DFen
Thomas K=FCbler
--------------------------------
Dynamic Document Solution variex
Alt-Marienfelde 25
12277 Berlin
t. + 49 30 723 23 183
f. + 49 30 723 23 185
mailto:[EMAIL PROTECTED]
www.variex.de
--__--__--
Message: 13
Subject: RE: [iText-questions] load afm fonts with fontfactory
Date: Fri, 24 Feb 2006 10:18:54 -0000
From: "Paulo Soares" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>,
<itext-questions@lists.sourceforge.net>
It would be interesting to see the debug output of the first part of =
your code.=20
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On=20
> Behalf Of Thomas K=FCbler
> Sent: Friday, February 24, 2006 10:14 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] load afm fonts with fontfactory
>=20
> Hello,
>=20
> I still have the problem to load and work with type 1 afm fonts.
> First i load the afm files with:
>=20
> FontFileFilter filefilter =3D new =
FontFileFilter(fontextension);
> File[] fontfilelist =3D new=20
> File(directoryname).listFiles(filefilter);
> cat.debug("fontdir: " + directoryname + " count: " +=20
> fontfilelist.length);
> for (int i =3D 0 ; i < fontfilelist.length; i++) {
> String fontname =3D=20
> fontfilelist[i].getName().substring(0,fontfilelist[i].getName(
> ).length()-4);
> FontFactory.register(fontfilelist[i].toString());
> cat.debug("postcriptfontname... " +=20
> FontFactory.getFont(fontfilelist[i].toString()).getBaseFont().
> getPostscriptFontName()=20
> + " path: " + fontfilelist[i].toString()); =20
> }
>=20
> after this, i print out all registered fonts with:
>=20
> TreeSet families =3D new=20
> TreeSet(FontFactory.getRegisteredFamilies());
> fontcount =3D families.size();
> for (Iterator i =3D families.iterator(); i.hasNext();) {
> String name =3D (String) i.next();
> cat.debug("FONTfactory: " + name);
> }
>=20
> but i only see the standard fonts:
>=20
> DEBUG FONTfactory: Courier
> DEBUG FONTfactory: Helvetica
> DEBUG FONTfactory: Symbol
> DEBUG FONTfactory: Times
> DEBUG FONTfactory: Times-Roman
> DEBUG FONTfactory: ZapfDingbats
>=20
> what is wrong?
>=20
> with regards
>=20
> thomas k=FCbler
>=20
> --=20
> Mit freundlichen Gr=FC=DFen
>=20
> Thomas K=FCbler
>=20
> --------------------------------
>=20
> Dynamic Document Solution variex
> Alt-Marienfelde 25
> 12277 Berlin
>=20
> t. + 49 30 723 23 183
> f. + 49 30 723 23 185
>=20
> mailto:[EMAIL PROTECTED]
> www.variex.de
>=20
>=20
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking=20
> scripting language
> that extends applications into web and mobile media. Attend=20
> the live webcast
> and join the prime developer group breaking into this new=20
> coding territory!
> http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=110944&bid$1720&dat=121642
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>=20
--__--__--
Message: 14
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] createGraphics and Tomcat problem
From: [EMAIL PROTECTED]
Date: Fri, 24 Feb 2006 11:21:55 +0100
This is a multipart message in MIME format.
--=_alternative 00390594C125711F_=
Content-Type: text/plain; charset="US-ASCII"
What do you mean that I forgot the X Server? Does that mean that I need
the X Server to run to use the createGraphics function? The problem is
that I have no easy access to the Tomcat machine...
If the XServer is running is that enough, and the function will work fine?
If not, is there a workaround...?
Thanks a lot in advance!
cierech
> Is it possible that while running on tomcat the iText has a problem
> creating Graphics
>
Maybe your JVM can't create Graphics on your (UNIX? Linux?) system
because you forgot the X Server.
br,
Bruno
Hi!
I have a following problem. I have a stamping application to place a stamp
in the PDF document. While everything in Windows works great, when I
upload it to a machine running Tomcat (to stamp the documents generated
on-the-fly), I get an error... Here it is:
type Exception report
message
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
com.sfs.filter.CacheControlFilter.doFilter(CacheControlFilter.java:47)
root cause
java.lang.NoClassDefFoundError
com.lowagie.text.pdf.PdfGraphics2D.<init>(Unknown Source)
com.lowagie.text.pdf.PdfContentByte.createGraphics(Unknown
Source)
com.sfs.pdf.writer.pdf.ITextPdfWriter.newFile(ITextPdfWriter.java:83)
com.sfs.pdf.aerodromes.ADListCreator.createNewPDFWriter(ADListCreator.java:197)
com.sfs.pdf.aerodromes.ADListCreator.createDocumentWidthSingleChapter(ADListCreator.java:410)
com.sfs.servlet.ADListCreatorServlet.createAndSendPdfDocument(ADListCreatorServlet.java:330)
com.sfs.servlet.ADListCreatorServlet.createAerodromeADList(ADListCreatorServlet.java:224)
com.sfs.servlet.ADListCreatorServlet.processGet(ADListCreatorServlet.java:168)
com.sfs.servlet.AbstractServlet.doGet(AbstractServlet.java:129)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.sfs.filter.CacheControlFilter.doFilter(CacheControlFilter.java:47)
The bolded line points to this function:
public boolean newFile(OutputStream outputStream, float height,
float width, String author, String title, String subject) {
coord=new PDFCoordinates(width, height);
document = new Document();
try {
writer = PdfWriter.getInstance(document,
outputStream);
document.addAuthor(author);
document.addSubject(subject);
document.addTitle(title);
pageWidth = width;
pageHeight = height;
document.open();
pdfContentByte = writer.getDirectContent();
pdfTemplate =
pdfContentByte.createTemplate(pageWidth, pageHeight);
g2D = pdfTemplate.createGraphics(pageWidth,
pageHeight);
} catch (DocumentException e) {
System.out.println(e.getMessage());
return false;
}
return true;
}
Is it possible that while running on tomcat the iText has a problem
creatingGraphics and returning an object Graphics2D... or is the problem
two lines before, getting the DirectContent? Either way is there a
workaround, how would i go about fixing this....
Thanks!
cierech
--=_alternative 00390594C125711F_=
Content-Type: text/html; charset="US-ASCII"
<br><font size=2 face="sans-serif">What do you mean that I forgot the X
Server? Does that mean that I need the X Server to run to use the
createGraphics
function? The problem is that I have no easy access to the Tomcat
machine...</font>
<br><font size=2 face="sans-serif">If the XServer is running is that
enough,
and the function will work fine? If not, is there a workaround...?</font>
<br>
<br><font size=2 face="sans-serif">Thanks a lot in advance!</font>
<br>
<br><font size=2 face="sans-serif">cierech</font>
<br>
<br>
<br>
<br><font size=2><tt>> Is it possible that while running on tomcat the
iText has a problem <br>
> creating Graphics<br>
><br>
Maybe your JVM can't create Graphics on your (UNIX? Linux?) system<br>
because you forgot the X Server.<br>
br,<br>
Bruno</tt></font>
<br>
<br><font size=2 face="sans-serif">Hi!</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I have a following problem. I have a stamping application to place a stamp
in the PDF document. While everything in Windows works great, when I upload
it to a machine running Tomcat (to stamp the documents generated
on-the-fly),
I get an error... Here it is:</font><font size=3> <br>
<b><br>
type</b> Exception report </font>
<p><font size=3><b>message</b> </font>
<p><font size=3><b>description</b> <u>The server encountered an internal
error () that prevented it from fulfilling this request.</u> </font>
<p><font size=3><b>exception</b> </font>
<p><font size=3><tt>javax.servlet.ServletException: Servlet execution threw
an exception<br>
com.sfs.filter.CacheControlFilter.doFilter(CacheControlFilter.java:47)</tt></font>
<p><font size=3><b>root cause</b> </font>
<p><font size=3><tt>java.lang.NoClassDefFoundError<br>
com.lowagie.text.pdf.PdfGraphics2D.<init>(Unknown
Source)<br>
<b>com.lowagie.text.pdf.PdfContentByte.createGraphics(Unknown
Source)</b><br>
com.sfs.pdf.writer.pdf.ITextPdfWriter.newFile(ITextPdfWriter.java:83)<br>
com.sfs.pdf.aerodromes.ADListCreator.createNewPDFWriter(ADListCreator.java:197)<br>
com.sfs.pdf.aerodromes.ADListCreator.createDocumentWidthSingleChapter(ADListCreator.java:410)<br>
com.sfs.servlet.ADListCreatorServlet.createAndSendPdfDocument(ADListCreatorServlet.java:330)<br>
com.sfs.servlet.ADListCreatorServlet.createAerodromeADList(ADListCreatorServlet.java:224)<br>
com.sfs.servlet.ADListCreatorServlet.processGet(ADListCreatorServlet.java:168)<br>
com.sfs.servlet.AbstractServlet.doGet(AbstractServlet.java:129)<br>
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)<br>
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)<br>
com.sfs.filter.CacheControlFilter.doFilter(CacheControlFilter.java:47)</tt></font>
<p><font size=2 face="sans-serif">The bolded line points to this
function:</font><font size=3>
</font><font size=2 face="sans-serif"><br>
public boolean newFile(OutputStream
outputStream,
float height, float width, String author, String title, String subject)
{</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
coord=new
PDFCoordinates(width,
height);</font><font size=3> </font><font size=2 face="sans-serif"><br>
document = new
Document();</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
try {</font><font
size=3>
</font><font size=2 face="sans-serif"><br>
writer = PdfWriter.getInstance(document,
outputStream);</font><font size=3>
</font><font size=2 face="sans-serif"><br>
<br>
document.addAuthor(author);</font><font size=3> </font><font
size=2 face="sans-serif"><br>
document.addSubject(subject);</font><font size=3> </font><font
size=2 face="sans-serif"><br>
document.addTitle(title);</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
pageWidth = width;</font><font size=3> </font><font size=2
face="sans-serif"><br>
pageHeight = height;</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
document.open();</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
pdfContentByte = writer.getDirectContent();</font><font
size=3>
</font><font size=2 face="sans-serif"><br>
pdfTemplate = pdfContentByte.createTemplate(pageWidth,
pageHeight);</font><font size=3>
</font><font size=2 face="sans-serif"><br>
<b>g2D = pdfTemplate.createGraphics(pageWidth,
pageHeight);</b></font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
} catch
(DocumentException
e) {</font><font size=3> </font><font size=2 face="sans-serif"><br>
System.out.println(e.getMessage());</font><font size=3>
</font><font size=2 face="sans-serif"><br>
return false;</font><font size=3> </font><font size=2
face="sans-serif"><br>
}</font><font
size=3>
<br>
</font><font size=2 face="sans-serif"><br>
return
true;</font><font size=3>
</font><font size=2 face="sans-serif"><br>
}</font><font size=3> </font>
<p><font size=2 face="sans-serif">Is it possible that while running on
tomcat the iText has a problem creatingGraphics and returning an object
Graphics2D... or is the problem two lines before, getting the
DirectContent?
Either way is there a workaround, how would i go about fixing
this....</font><font size=3>
</font>
<p><font size=2 face="sans-serif">Thanks!</font><font size=3> </font>
<p><font size=2 face="sans-serif">cierech</font>
--=_alternative 00390594C125711F_=--
--__--__--
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
End of iText-questions Digest