Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » iText »

[iText-questions] document text blurred after adding a text
 watermark using onStartPage event

Lu, Albert - Eagan, MN - Contractor

2007-07-11

Replies:

document text blurred after adding a text watermark using onStartPage event

Hi,

After applying a text watermark using onStartPage event onto my document, my document text is blurred. Here are the snapshots to show that:

The original form without watermark: http://albert.t.lu.googlepages.com/form_wo_text_wm.TIF

After adding the watermark: http://albert.t.lu.googlepages.com/blurred_text_wm.TIF

My program flow is:

Create a pdf document,

Adding a page event to the document. onStartPage, it is to add text watermark on every new page.

Open the document

   Copy another document (TIFF,PDF,GIF) into this using PdfContentByte and PdfImportedPage

Close the document

The event onStartPage has:

PdfContentByte cb = writer.getDirectContentUnder()

CreateFont(HELVETICA,CP1252, NOT_EMBEDDE)

Cb.beginText()

Cb.setCollorFill(100,100,100);

Cb.showTextAligned()

Cb.endText()


If I add text watermark without using the event approach then I didnt have this blurring problem. But then it has its own limit that if I have a long table spanning several pages, I can not control/tell when the table spans to the next page for me to add the watermark on each page.

Any ideas? Suggestions?

Thanks,

Albert

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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.