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
1
vote
2 answers

iTextPDF: changing the Table Alignment dynamically

I want to dynamically align the iText PdfTable. How to set the x and y position based alignment in iTextPDF. PdfPCell cell; cell = new PdfPCell(testTable); cell.setFixedHeight(44f); cell.setColspan(3); cell.setBorder(0); table.addCell(cell); …
Pradeep.PG
  • 189
  • 1
  • 1
  • 10
1
vote
1 answer

itextpdf XMLWorker Document

We are using itextpdf for creating PDFs. We have one cell whose values are in HTML format. We need to convert those HTML values to text. Is it possible to convert only one PDF cell using XMLWorker?
1
vote
1 answer

Using iTextPDF to trim a page's whitespace

I have a pdf which comprises of some data, followed by some whitespace. I don't know how large the data is, but I'd like to trim off the whitespace following the data PdfReader reader = new PdfReader(PDFLOCATION); Rectangle rect = new…
Andy N
  • 392
  • 3
  • 8
  • 24
1
vote
2 answers

Merging Tagged PDF without ruining the tags

I am trying to merge two Tagged PDF's with the iTextPDF 5.4.4 version jar. After doing all the operations while closing the document on the line: document.close();): . It throws the below error java.lang.NullPointerException PDF Creation Failed…
Comm
  • 11
  • 1
  • 3
1
vote
1 answer

iText pdf functionality broken after lib upgrade - cannot merge tables

Ugrading the iText PDF library from 2.0.4 to 5.4.1 has broken the existing functionality in my application. Merging tables into one complex table does not work anymore. //Creating tables Table table0 = new Table(2); Table table1 = new…
Erik Kaju
  • 3,147
  • 3
  • 19
  • 28
1
vote
1 answer

Nested iText PdfPTable border width

I'm using iTextPdf for pdf generation and I'm creating nested table using the below code. PdfPTable table = new PdfPTable(3); PdfPTable nestedTable = new PdfPTable(2); table.addCell(nestedTable); Now, I want the border width of table to be 0, i.e…
dShringi
  • 1,497
  • 2
  • 22
  • 36
1
vote
1 answer

Lost spaces in my created pdfs (pdfbox & itextpdf)

I'm using pdfbox & itextpdf to create very simple invoices in pdf format. We're creating raw invoice text files in an erp system outside of java - so the only thing i have to do combining the textfile with a (pdf) template. (Thats not the problem.…
Mirko
  • 1,512
  • 1
  • 12
  • 19
1
vote
2 answers

ProGuard forced with "-dontwarn" results in Android App that behaves incorrectly

I have a application that i want to build with progaurd i am using ksoap and itext jars in this applicaction now the problem is while building the app in release mode(signed apk) i am getting error(see the error log below) i earlier tried solving…
Chandrashekhar
  • 498
  • 4
  • 19
1
vote
0 answers

How to merge PDF file and HTML Text while generating PDF file dynamically using ITextPDF Java?

I have requirement in my project to generate PDF files dynamically. this PDF file should contain Header image, Footer Image and some content depending upon parameters passed to my servlet. These contents can be in HTML text format and can be PDF…
0
votes
0 answers

iText7 scaling rotated document with links

I am using iText7(java) and trying to scale a portrait document to landscape. The document contains links and has rotation set to 270. Setting mediabox and cropbox on document does not work due to rotation. The solution mentioned in iText Examples…
jkb016
  • 439
  • 1
  • 7
  • 17
0
votes
0 answers

Disable commenting on PDF using iText

I am using iText 2.1.7 for creating read-only PDF. I am using acrofields to set the content on the form. The PDF generated is read-only, any of the form fields are not editable. The issue I am having is client doesn't want user to even add…
Amrut
  • 971
  • 1
  • 9
  • 17
0
votes
1 answer

unable to pass values from session variable for making pdf using iText and Struts2

Here what I am trying to do is I have made some lists where I am fetching values and storing it in some particular lists and since I want to access those values in another method I am creating session variable and I am passing that values in session…
user5750833
0
votes
1 answer

Rotating text inside PDFPCell iTextPDF C#

I'm currently working for PDF Generator application in C# using iTextPDF library for my organization. How can I make a forty degree rotation to a text inside PDFPCell object. Can I do some tricks for making it work instead of manually using…
jeff_ang24
  • 119
  • 4
  • 12
0
votes
1 answer

Use both iText7 and iText 2.17

Our Project has been using iText 2.17 for a long time. Now we would like to add digital signature to our pdfs and we prefer to use iText7. Can both iText < 5.3 and 5.3+ libraries used together? Will there be a problem in class loader or all the…
Cybermonk
  • 514
  • 1
  • 6
  • 28
0
votes
1 answer

How can I use tab characters in multiline AcroFields with iText?

The project I'm working on has a PDF file that is used as a template to generate another final PDF. The template has a couple of form fields. To render the final document I use iText to open the template, find all the form fields and fill in the…
Geoffrey De Vylder
  • 3,963
  • 7
  • 36
  • 56