itext

How do I draw part of parabola using iText ? Or how do I create quadratic bezier curves from cubic bezier curves?

I need to draw a shape whose boundaries are parts of parabola (that is quadratic bezier curves) using iText. I have found only method for drawing cubic bezier curves in PdfContentByte class. So how do I draw quadratic bezier curves using iText ? One way would be to use method for cubic bezier curves. Is it possible to draw quadratic be...

How to change line thickness in iText?

I'm drawing images to pdf using Java framework iText. I need to draw lines of specified width. There is a method setLineWidth(float width) in class PdfContentByte that should change it. However no matter what value I pass as its parameter the lines drawn are always extra thin. There is following line in javadoc of setLineWidth: The ...

iText PdfPTables, document.add with writeSelectedRows

I am currently modifying an existing system that generates reports with iText and java. The report template is as follows: Header1(PdfPTable) Header2(PdfPTable) Body(PdfPTable) I am currently using the writeSelectedRows to display Header1 and Header2, but document.add is used to display the Body. The problem is that the system is set...

iText - PDF file displaying message at the top about fillable form

Here is what I did: 1. I have a template WORD file that can be used to fill an application for some stuff. Assigned pre-defined tags to fillable fields. 2. Converted that word file to PDF file using CenoPdf 3. Used iText to fill the fields in generated PDF file. 4. Now when user downloads that filled file, they see a nice purple at the b...

Merging two templates in iText

Let's say I have two PDF templates created with Adobe Acrobat, which are both single-page, 8.5x11 documents. The first template (A.pdf) has content for the top half of the page. The second template (B.pdf) has content for the bottom half of the page. (It just so happens the content in both templates does not "overlap" each other.) I wou...

How do I figure out the font family and the font size of the words in a pdf document?

How do I figure out the font family and the font size of the words in a pdf document? We are actually trying to generate a pdf document programmatically using iText, but we are not sure how to find out the font family and the font size of the original document which needs to be generated. document properties doesn't seem to contain this ...

seam iText integration libraries

seam iText integration seems to use older version of iText jars, would it be possible to use the latest iText 5.0.2 specific jars as part of the maven dependencies. Has anyone done this before? http://repository.jboss.org/maven2/org/jboss/seam/jboss-seam-pdf/2.2.0.GA/jboss-seam-pdf-2.2.0.GA.pom http://repository.jboss.org/maven2/com/low...

Add header to PDF and RTF with iText

I am using iText to generate both PDF and RTFs. I know RTF generation with iText is not popular, but I still need to make the code work for both. Technically, I can have different pieces of code to handle each type, but it needs to be able to be contained within the same file/class. I can work with code like this: String outputData =...

Removing PDF attachments via itext

I'm trying to remove attachments from a number of my pdf files (I can extract via pdftk, so preserving them is not an issue). I coded the following based on an example found from a google search: import java.io.FileOutputStream; import java.io.IOException; import com.lowagie.text.*; import com.lowagie.text.pdf.*; c...

itext external border of a table

Hi, Is there any way to not have borders for cells inside a table but have the external border only? Something like: ______________ | cell 1 c2 | | | |______________| I;m talking about iTextSharp Pdf library ...

itext - pdf to html

Hi guys, I have spent about 20 hours of coding to produce invoices using iText in c#. Now, i want to use the same code to transform some of the tables to html. Do you know if i can do this? For instance i have this: PdfPTable table = new PdfPTable(3); table.DefaultCell.Border = 0; table.DefaultCell.Padding = 3; table.WidthPercentage =...

FDF-files not opening properly

We have created a servlet that provides a FDF file for our clients. The FDF file is created by iText and the output looks fine. Whenever we open the FDF either from the Servlet, or from a local file, AcrobatReader starts, asks if the PDF should be downloaded, we allow that and then we see the PDF - without the values we filled in the for...

Merging pdf-s with iText for double sided printing

Hi, I have multipaged pdf file (let's call it file1) And I am generating another pdf (file2) that consists of 1 table that may be also multipaged. How can I merge the existing pdf into the one I am generating so that the pages of these two files would be one after another (file1page1, file2page1, file1page2, etc...) I know how to merg...

GUI builder Tool for itext jar in Java

I am creating pdf in java using iText jar. Here I am manually positioning the all components like Text,Paragraph,line etc. is There Any GUI Tool available for this?. I tried it google but couldnt find. ...

OutOfMemoryError during the pdf merge

the below code merges the pdf files and returns the combined pdf data. while this code runs, i try to combine the 100 files with each file approximately around 500kb, i get outofmemory error in the line document.close();. this code runs in the web environment, is the memory available to webspehere server is the problem? i read in an arti...

Java image scaling

I am outputting images to a PDF file using iText. The images always appear larger than they are supposed to. According to the book (iText in Action), this is because iText always displays the images at a resolution of 72 dpi, regardless of what the actual dpi property of the image is. The book suggests using image.getDpiX() to find th...

IText can't keep rows together, second row spans multiple pages but won't stick with first row.

I am having trouble keeping my first and second rows of my main PDFPTable together using IText. My first row consists of a PDFPTable with some basic information. My second row consists of a PdfPTable that contains all of the tabulated info. Everytime the tabulated info becomes too big and spans multiple pages, it is kicked to the seco...

Gradient fills in iText using PDFContentByte

I am using Itext and Java to generate visualizations in PDF format, and I am stuck on how to apply a gradient fill to my path objects. I am using PDFContentByte directly for low-level control, and I can't find any examples showing how to successfully apply a two-color axial gradient using PDFContentByte. I am assuming the key is using ...

iTextSharp for PDF - how add file attachments?

Hi all. I am using iTextSharp to create a PDF document in C#. I would like to attach another file to the PDF. I'm having just loads of trouble trying to do so. The examples here show some annotations, which apparently attachments are. This is what I've tried: writer.AddAnnotation(its.pdf.PdfAnnotation.CreateFileAttachment(writer, n...

iTextSharp - how to open/read/extract a file attachment?

I have some PDF's all with two attached files with static names. I would like to use iTextSharp to extract these files to a temp directory so that I can work with them further. I tried following the tutorial here but I ran into problems when the iTextSharp.text.pdf.PdfReader didn't have a getCatalog() method as shown in the bottom exam...