itext

Java iText Footer

I’m trying to generate a PDF using a JSP page and my coding outline as follows, Document document = new Document(PageSize.A4,70/*Left*/,70/*Right*/,140/*Top*/,30/*Bottom*/); response.setContentType("application/pdf" ); response.setHeader("Content-Disposition","inline; filename=vishwa-mandate.pdf"); PdfWriter.getInstance(docu...

How to autoSize table cells generated via iText

How to autoSize table cells which was generated by seam pdf plugin (via iText) ...

iTextSharp creation of a pdf from a list of byte arrays

Hi people, I've got a list of byte[] which i'd like to concatenate into one byte[] which will be the final PDf. On the "page = copy.GetImportedPage(new PdfReader(p), i); " i'm getting an "object reference not set to an instance error. I've got no clue of what's going on, i've already checked every object and there's no null. Any id...

Problem when try to add image to a pdf

I am generating pdf using java and itext. When I add image that we used before in previous version of the pdf everything is fine. But when I replace it with the new one(they are both png-s) it corrupts the PDF(my PDF reader return "not a pdf or corrupted). Are there any special things that must be set when saving the image? It gives me t...

PageStamp.AlterContents() NullReferenceException

Hi, this is the problem: i've got this piece of code... It keeps throwing a NullReferenceException at the stamp.AlterContents(); line. i've got no clue on what's going on. Any help appreciated! public static byte[] concatAndAddContent(List<byte[]> pdf) { byte [] todos; using(MemoryStream ms = new Mem...

PDF Generation Library for Java

Hi, I know this has been asked before, but I'm still undecided on which PDF generation framework to use for my current project. My requirements on-the-fly generation of PDF documents (mainly order forms, invoices) Java based easy to layout should be open source easy to change layout A lot of people seem to use iText, but I have so...

extract text from pdf files

I need to extract text (word by word) from a pdf file. import java.io.*; import com.itextpdf.text.*; import com.itextpdf.text.pdf.*; import com.itextpdf.text.pdf.parser.*; public class pdf { private static String INPUTFILE = "http://ontology.buffalo.edu/ontology%28PIC%29.pdf" ; private static String OUTPUTFILE = "c:/new3.p...

Extract columns of a pdf file

Possible Duplicate: Extract each column of a pdf file I need to extract text from pdf files using itext. The problem is that some pdf files contain 2 columns, when I extract text, I obtain as result a text file where columns are merged (in the same line, we found 2 columns) this is the code: public class pdf { private stati...

Split one PDF page into two

Hi, i want to split one wide PDF page into two PDF pages. My original page is wide as two A4 page size but height is normal(for A4). I trying to use IText but with no effects. Thanks for attention. ...

how to create pdf file which contains marathi font using itext ?

Hi Frinds, I have to create report using itext but the language should be hindi or marathi. Is it possible to make pdf file which contains marathi font like mangal,shruti,shree-dev...etc if yes plz reply me Thank you! ...

itext for pdf: how to output <pre> code snippet</pre>

Hi, The line prints to the next line automatically for a paragaph. How to keep the pre-formated as it is like line 1 line 2 line 3 I tried to find the answer from Paragraph class, no luck. Could some one help? thanks. ...

Barcode font not loading dynamically in MS Word when generating RTF from Java using iText

Hi Folks, I am using iText API to generate RTF using Java. The RTF file is generated fine but one requirement is adding a barcode. What i did is: FontFactory.register("c:\\windows\\fonts\\FREE3OF9.ttf", "Free 3 of 9 Extended"); return FontFactory.getFont("Free 3 of 9 Extended",20, Font.NORMAL, Color.BLACK); I tried loading other font...