Adding an image to existing PDF shows up behind form fields
Submitted by WebTigers on Thu, 04/26/2012 - 16:55I want to absolutely position an image on a page. The image shows up but the AcroForm fields are obscuring the image. How do I push the image to show up over the form fields?
Here's the current code being used via a PHP/Java Bridge:
$outfile = '/home/me/pdf/public/pdfs/OUT.pdf';
$output = new java('java.io.FileOutputStream', $outfile);
$pdffile = '/home/me/pdf/public/pdfs/IN.pdf';
$imgfile = '/home/me/pdf/public/images/img.png';
try {
$PdfReader = new java('com.itextpdf.text.pdf.PdfReader', $pdffile);
Mapping high- and low-level info in a PDF
Submitted by rdevitt on Mon, 04/16/2012 - 17:59I am currently experimenting with the free version of iText, but we plan on licensing if does what we want.
Synopsis: We need to run through an existing PDF, looking for paragraphs containing given text, and then copy the rendered paragraphs to an output document, highlighting the text that was found.
Regarding Bouncy Castle dependency
Submitted by rocketraman on Wed, 02/29/2012 - 21:35Thanks for a very useful book about PDF and iText.
I have a question about the WARNING statement in Section 12.3: "...For iText 5.0.x, the Bouncy Castle JARs are required. Later versions of iText can use different libraries."
Is the above statement still true? BouncyCastle does not currently appear to be fully compatible with JDK7 and so I was wondering if iText could be configured to use the built-in Sun provider for PDF encryption.
Regards,
Raman Gupta
Principal
VIVO Systems
Does iText support Linearization?
Submitted by Anonymous Newbie on Wed, 02/29/2012 - 19:45I want to serve PDFs to a browser really fast. iText is fast but if I could create Linearized PDFs (Fast Web View) people could already look at the first page of a document before the document is finished.
Flag values for hidden and invisible fields
Submitted by minal.silimkar on Tue, 02/28/2012 - 14:29I have to do processing for hidden and invisible fields. I went through the Flag values returned for invisible and hidden fields and came to conclusion that for hidden it should return 2 and for invisible it should return 1. But when I parsed PDF, it returned various values such as 96, 32, 6 for invisible fields. I also found that only consistent flag value returned was 4 for PRINT_ONLY (viewable) fields. Does anybody know the reason behind this.
I referred class com.lowagie.text.pdf.PdfAnnotation for flag values.
Extracting Image Position
Submitted by Mark on Sat, 02/25/2012 - 01:00Can I obtain an image's bounding rectangle on the page from the ImageRenderInfo object passed to the RenderListener.RenderImage using iTextSharp?
Extracting tabular data
Submitted by Mark on Fri, 02/17/2012 - 00:04I need to extract tabular data from various PDF files. The table columns can be left, right or center aligned as well as word wrapped. I'm experimenting with various means of determining cell boundaries using the text boundaries obtained from a LocationTextExtractionStrategy subclass but it's proving to be rather complicated.
The tabular data is demarcated by lines which would unambiguously determine the cell boundaries but I don't see a way to extract line information using the parsing classes.
Extracted images are very dark
Submitted by Massimo Lovato on Tue, 01/31/2012 - 23:58Good evening.
I tried to implement listing 15.30 and 15.31 of the book, and images were extracted from a pdf as .jpg files. The problem is that extracted images are very very dark compared to the original pdf. Is there anything I can do to solve this problem?
Thank you
Massimo
Licence of the examples
Submitted by gidoca on Wed, 12/21/2011 - 10:36Unfortunately, I wasn't able to find any information about this: can the examples in the book be modified and reused? If so, under what licence?
How do you flatten a dynamic XFA form?
Submitted by tdubois on Fri, 12/09/2011 - 16:21I have a dyanmic XFA form with a text field and a signature field with reader rights enabled.
I need to make the form read only for non admin users.
when I run the following code:
PdfReader reader = new PdfReader(report.getReportBytes());
reader.removeUsageRights();
ByteArrayOutputStream bao = new ByteArrayOutputStream();
PdfStamper stamper = new PdfStamper(reader, bao);
stamper.setFormFlattening(true);
stamper.close();
report.setReportBytes(bao.toByteArray());
I get the following error when I open the pdf.
