Hi ,
I am reading the existing PDF file(Not Creating new document) using the
"Advanced: reading PDF" information as mentioned in the link
http://www.lowagie.com/iText/examples/Chap0112.java. tutorial. Once after reading
I am writing the information from html browser to the PDF file. This part is
working fine because I am reading only one page of pdf file. The problem is
suppose if I am having the PDF file with two pages then the information what I am
writing from html browser to PDF file which is also writing into the second page.
Basically I am filling the customer information in first page and second page is
my instruction page and I don't want to write anything in the second page. If I am
writing anything in first page which is also happening in the second page. Can you
suggest me how can I avoid writing into the second page. Also I tried with
"PdfTemplate template = cb.createTemplate(500, 200);" which I could not able to
succeed. Thanks in advance
Here is my sample code.
PdfReader reader = new
PdfReader("c:/tomcat/jakarta/webapps/ROOT/claims/claim.pdf");
int n = reader.getNumberOfPages();
Rectangle psize = reader.getPageSize(1);
float width = psize.width();
float height = psize.height();
Document document = new Document(psize, 50, 50, 50, 50);
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
PdfWriter writer = PdfWriter.getInstance( document, buffer );
document.open();
PdfContentByte cb = writer.getDirectContent();
int i = 0;
while (i < n)
{
document.newPage();
i++;
PdfImportedPage page1 = writer.getImportedPage(reader, i);
cb.addTemplate(page1, 0,0);
BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252,
BaseFont.NOT_EMBEDDED); cb.beginText();
cb.setFontAndSize(bf, 10);
----
>From here I am using the setTextMatrix, showText, ShowTextAlignement combination
---
document.close();
Thanks & Regards,
Mahaboob Pasha
[EMAIL PROTECTED] wrote:
> Send iText-questions mailing list submissions to
> [EMAIL PROTECTED]
>
> 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: iText-questions digest, Vol 1 #691 - 3 msgs (John Hardy)
> 2. Re: Re: iText-questions digest, Vol 1 #691 - 3 msgs (Paulo Soares)
>
> --__--__--
>
> Message: 1
> From: "John Hardy" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Date: Sun, 11 Aug 2002 10:39:28 +1000
> Subject: [iText-questions] Re: iText-questions digest, Vol 1 #691 - 3 msgs
>
> Tracking is the uniform addition or subtraction of letter space to/from all
> the characters in a font. Tracking generally is used to increase letter
> spacing as type gets smaller and decrease it as type gets larger.
>
> : In October or November ColumnText will support kerning, several ways of
> : spacing for justified text and full features right-to-left text with
> arabic
> : shaping. Until then you are on your own. By the way, what's tracking,
> : typographically speaking?
> :
> : Best Regards,
> : Paulo Soares
> :
> : ----- Original Message -----
> : From: "Shahzad Latif" <[EMAIL PROTECTED]>
> : To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> : Sent: Saturday, August 10, 2002 14:52
> : Subject: Re: [iText-questions] leading, tracking, kerning
> :
> :
> : > Hi:
> : >
> : > Just a correction. Leading is working great. My bad.
> : >
> : > Could someone suggest something for tracking, kerning, space between
> : > words
> : > issues in columntext. I would really appreciate that.
> : >
> : > Regards,
> : >
> : > Shahzad
>
> --__--__--
>
> Message: 2
> From: "Paulo Soares" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: Re: [iText-questions] Re: iText-questions digest, Vol 1 #691 - 3 msgs
> Date: Sun, 11 Aug 2002 11:00:54 +0100
>
> Thank you. That's what I'm doing now (and must not do for script-like
> fonts).
>
> Best Regards,
> Paulo Soares
>
> ----- Original Message -----
> From: "John Hardy" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, August 11, 2002 1:39
> Subject: [iText-questions] Re: iText-questions digest, Vol 1 #691 - 3 msgs
>
> > Tracking is the uniform addition or subtraction of letter space to/from
> > all
> > the characters in a font. Tracking generally is used to increase letter
> > spacing as type gets smaller and decrease it as type gets larger.
> >
> > : In October or November ColumnText will support kerning, several ways
> > of
> > : spacing for justified text and full features right-to-left text with
> > arabic
> > : shaping. Until then you are on your own. By the way, what's tracking,
> > : typographically speaking?
> > :
> > : Best Regards,
> > : Paulo Soares
> > :
> > : ----- Original Message -----
> > : From: "Shahzad Latif" <[EMAIL PROTECTED]>
> > : To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > : Sent: Saturday, August 10, 2002 14:52
> > : Subject: Re: [iText-questions] leading, tracking, kerning
> > :
> > :
> > : > Hi:
> > : >
> > : > Just a correction. Leading is working great. My bad.
> > : >
> > : > Could someone suggest something for tracking, kerning, space between
> > : > words
> > : > issues in columntext. I would really appreciate that.
> > : >
> > : > Regards,
> > : >
> > : > Shahzad
> >
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > iText-questions mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> --__--__--
>
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> End of iText-questions Digest
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions