This can be done using the Barcode and PdfStamper
classes.  In general, you should probably:

-create a PdfReader to read your source PDF and obtain
its page count
-create a PdfStamper to write the stamped output
-create your Barcode subclass instance (eg Barcode39)
-get a PdfTemplate from your bar code's
getTemplateWithBarcode() method.  You may be able to
use the PdfContentByte returned from your PdfStamper's
getOverContent(1).
-for each page in the stamper:
    call
stamper.getOverContent(pageNum).addTemplate(barcodeTemplate,
...translation matrix stuff...)

That's what I pieced together fairly quickly from the
API... Paulo may fill in some blanks later but that
may be enough for a start.

hth,
Matt

--- "Verboom, Rob" <[EMAIL PROTECTED]>
wrote:
> 
> 
> I have a quick question. I currently have a bunch of
> PDFs generated by an external process, I am
> wondering if it is possible to insert an image onto
> the pdf's using Itext. I already have a small
> program to concatenate multiple PDF files into a
> large PDF with bookmarks, but I have a requirement
> to add a barcode image to every page.
> 
> First is this possible at all? Secondly could
> someone point me to a good starting spot to find out
> how it is done.
> 
> Thanks in advance
> 
> Rob Verboom 
> Senior Java Developer
> Cartier Partners Financial Group inc.      
> www.cartierpartners.ca
> (519) 488-2025 ext 7407
> 
> 
> 
>
-------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback
> Program.
> Does SourceForge.net help you be more productive? 
> Does it
> help you create better code?  SHARE THE LOVE, and
> help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
>
https://lists.sourceforge.net/lists/listinfo/itext-questions



__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to