I am using the Itext java lib for scaling the pdf. For that i use PdfWriter
to get the page which is then treated as image instance and scaled and
finally added to PdfContentByte. But this final Pdf do not contain the text
box. If i use pdfCopy , then i will not be able to scale the pdf.

Is my understanding correct ? I have attached the original PDF (TextBox.pdf)
and the generated pdf(final.pdf) where u can observe that the top-left text
box is missing. Is there any way i can achieve scaling and adding of form
fields. Similarly , some hidden fields are getting visible . Please find the
sample code below:

  pdfWriter = PdfWriter.getInstance(pdfDocument,new
FileOutputStream("C:/TextBox.pdf"));
                                        pdfDocument.open();                     
pdfDirectContent = pdfWriter.getDirectContent();
page = pdfWriter.getImportedPage(reader1, pageN);
                                image = Image.getInstance(page);        
                                image.scalePercent(xx); // xx is % value
                                image.setAbsolutePosition(0, 0);
                                pdfDirectContent.addImage(image);
http://itext-general.2136553.n4.nabble.com/file/n2538775/TextBox.pdf
TextBox.pdf 
http://itext-general.2136553.n4.nabble.com/file/n2538775/final.pdf final.pdf 
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Unable-to-get-text-box-using-PDF-Writer-tp2538775p2538775.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to