Questions tagged [itextpdf]

itextpdf is part of the package name of iText, a PDF library available on itextpdf.com

Questions about the Java version of iText and the C# version of iText (aka iTextSharp) are usually posted using the tag.

227 questions
2
votes
1 answer

iTextPdf HTML to PDF : how to render HTML at specific location in PDF

I have below HTML string : Requirements:
  • Bullets are helpful
  • to display key points

How can I render above HTML into PDF at specific location? I have checked some examples at…
Nitesh Virani
  • 1,688
  • 4
  • 25
  • 41
2
votes
1 answer

Is it possible to have space between cells in iTextPdf?

Does iTextPdf allow to set spacing between cells in table? I have a table with 2 columns and I am trying to draw a border-bottom on cell. I want space between each border same as cell padding. I am using below code: PdfPTable table = new…
Karsan
  • 269
  • 3
  • 14
2
votes
1 answer

PDF file turns 0 kb when image is added in IText

I'm trying to create a pdf file which displays something like name, stop number, and fare. The code compiles and run perfectly, but when I tried to add an image in it, the pdf file it created was 0 kb and was damaged. I've been stuck in here for…
Gelly
  • 127
  • 1
  • 13
2
votes
1 answer

Android-Issue in ScrollView to Bitmap conversion

I am trying to convert a ScrollView to a Bitmap, but the resulting image only contains part of the content. This is how I create the image as a JPEG: ByteArrayOutputStream stream = new…
Rakesh L
  • 1,136
  • 4
  • 18
  • 44
2
votes
1 answer

Itextpdf stop transform pdf correctly

I have a next issue with itextpdf. private void generatePdf() throws Exception { FileOutputStream fos = null; try { PdfReader reader = new PdfReader("template.pdf"); fos = new FileOutputStream("test.pdf"); PdfStamper…
Dolzhenok
  • 78
  • 6
2
votes
3 answers

Img source close tag

I am using img tag but its not working this is my code and I have also use that type but when I open in firebug that have no close tag and we we…
Mangita
  • 41
  • 1
  • 5
2
votes
1 answer

Set html content as header and footer in iTextPDF using Java

In my application I've to generate a report from the html content. For this purpose I am using the iTextPDF library 5.5.0 with XMLWorker 5.5.0. End user can design the content of report (Header, Footer, Subject) using tinyMC editor. I am storing…
IT ppl
  • 2,626
  • 1
  • 39
  • 56
2
votes
1 answer

Pass Drawable to iTextPdf instead of an Image - Android

I am using iTextPdf to create a check-in application. I've added the an image already using the image object : imagePath = "/sdcard/Mugshot.jpg"; Image image = Image.getInstance(imagePath); image.setAbsolutePosition(165f,…
Anurag Pande
  • 123
  • 8
2
votes
1 answer

How can we extract text content from PDF file without header and footer

How can we extract text content from PDF file, we are using pdfbox to extract text from PDF file but we are getting header and footer is not required. I am using following java code. PDFTextStripper stripper = null; try { stripper = new…
2
votes
1 answer

How to extract page number from PDF file

We explored so many API's like tika,Pdfbox and itextpdf to extract page number from pdf file but we did not able to do this. In itextpdf we got PdfPageLabels.getPageLabels(reader) but the behaviour of this method is not uniform.
2
votes
1 answer

Shrink PDF pages with rotation using Rectangle in existing PDF

I am using following code to shrink every pages (Top and bottom) of existing pdf using iText library. Code working fine. But now if i process result pdf, i get 0 value for rotation of every page, while old pdf has other rotation too(i.e. 90deg). I…
Butani Vijay
  • 4,181
  • 2
  • 29
  • 61
2
votes
1 answer

Table.keepRowsTogether() in iText 5.5.1 doesn't seem to work correctly

I'm getting unexpected results when I try to keep rows in an iText table together. Below is some standalone code that creates a PDF with the results I'm seeing. FileOutputStream out = new FileOutputStream(new File("table.pdf")); Document document =…
Michael Hogenson
  • 1,292
  • 1
  • 15
  • 31
2
votes
1 answer

Multiple watermaks using iText PDF

I am using iTextPdf to generate text watermarking on a page. Currently a watermarking showing up in the center of the page, but I would like to add multiple watermarks (45 degrees) all over the page. If the watermark is small, I need two or three…
2
votes
3 answers

XFA Form conversion to PDFA-1B

We have a requirement to convert XFA Form (Adobe LiveCycle Form) to PDF/A-1B. We're attempting to use iText 5.4.0 to parse the PDF, populate the XFA fields and then save the modified PDF back out. All the examples I can find with iText talk about…
javadmirer
  • 81
  • 1
  • 1
  • 7
2
votes
2 answers

How to choose the optimal size for a font?

I'm creating a pdf document with a grid table based on the PdfPTable in itextpdf. The input data arrives as a java String[][] with all the cells filled. For each column, I iterate over all the rows to identify the maximum columns required to display…
1 2
3
15 16