Hi,
Here is a small program which is giving error "Illegal
operation 'BT' inside a text object". Can somebody
please point me what I am missing?
// Get a from from a reader
PdfReader reader = new
PdfReader(TEST_INPUT_PDF);
PdfStamper stamp = new PdfStamper(reader,
new FileOutputStream(TEST_OUTPUT_PDF) );
PdfContentByte cb =
stamp.getUnderContent(1);
BaseFont bf =
BaseFont.createFont(BaseFont.HELVETICA,
BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
cb.beginText();
cb.beginText();
cb.setFontAndSize(bf, 12);
cb.setTextMatrix(10, 10);
cb.showText("Hello World");
cb.endText();
stamp.close();
Thanks
Praveen
--- Praveen Sharma <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am a new user of iText library. Currently I am
> going
> through the available samples and API document to
> familiarize myself with library usage. The number of
> APIs is overwhelming and seem very rich in
> functionality. Is there any other document other
> than
> API which can expedite my learning?
>
> Currently I am trying to come up with a command line
> program that can stamp existing PDF documents with
> text and image. I am trying to use PdfStamper for
> that
> purpose but didn't get much success so far. I'll
> appreciate if someone can provide me sample programs
> for PdfStamper used for adding text and images.
>
> Thanks
> Praveen
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for
> 25�
> http://photos.yahoo.com/ph/print_splash
>
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�
http://photos.yahoo.com/ph/print_splash
-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions