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
16
votes
3 answers

How to convert iTextPDF Document to Byte Array

I need to convert iTextPDF Document file to byte[] after it's created in memory. I have already tested that I've no problem with creating PDF properly. The problem is how to convert it to byte array to store in DB. Here's my code: Document…
talha06
  • 6,206
  • 21
  • 92
  • 147
10
votes
1 answer

itext7 pdf to image

I am using iText7(java) and am looking for a way to convert a pdf page to image. In older iText versions you could do this : PdfImportedPage page = writer.getImportedPage(reader, 1); Image image = Image.getInstance(page); But iText7 does not…
jkb016
  • 439
  • 1
  • 7
  • 17
9
votes
1 answer

How should I interpret the coordinates of a rectangle in PDF?

I would like to know more about the coordinates of a Rectangle, in particular: lower left X lower left Y upper right X upper right Y Every time, I get confused about how to make dimensions based on these coordinates to draw rectangle. If…
Nazeer_hanne
  • 213
  • 6
  • 20
9
votes
3 answers

iText - avoid last row not to cut tables on page split to next page

I am working on itext 5 using java. I have pages with mutiple tables with dynamic rows. In some instances, the table last row is splitted into next page with the folowing header. I am using setHeaderRows() and setSkipFirstHeader() to manage…
Chandra Shekar
  • 113
  • 1
  • 3
  • 7
8
votes
2 answers

Comparison between JasperReports and iText/iTextpdf

I want to know pros and cons of JasperReports and iText/iTextpdf. Till now, I have been working on JasperReports but now thinking about shifting on iText. Should I change to iText or continue with JasperReports? I know that for dynamic reports, we…
Mital Pritmani
  • 4,880
  • 8
  • 38
  • 39
6
votes
2 answers

Load Font from /WEB-INF/resources/fonts/foobar.ttf with iTextPdf FontFactory

The question pretty much says it all. I get following exception: ExceptionConverter: java.io.IOException: /fonts/CALIBRI.TTF not found as file or resource. Caused By: java.io.IOException: /fonts/CALIBRI.TTF not found as file or resource. at…
m3t4lukas
  • 63
  • 1
  • 4
5
votes
1 answer

How can I use regular and bold in a single String?

I have a String that consists of a constant part and a variable part. I want the variable to be formatted using a regular font within the text paragraph, whereas I want the constant part to be bold. This is my code: String cc_cust_name =…
nitin
  • 53
  • 1
  • 5
4
votes
2 answers

Signing PDF - memory consumption

I tried some utilities for digital PDF signing based on iText v1 or v2 and found out that it seems whole PDF is loaded into memory (for 60M PDF process can take up to 300-400MB of memory). Can recent iText versions sign PDF without load it into…
Vova l
  • 213
  • 6
  • 15
4
votes
1 answer

PDF Page re-ordering using itext

i am using itext pdf library. can any one know how can i move pages in existing pdf? Actually i want to move few last pages at beginning of file. It is something like below but i don't understand how it work. reader = new…
Butani Vijay
  • 4,181
  • 2
  • 29
  • 61
4
votes
1 answer

Create Index File(TOC) for merged pdf using itext library in java

I am using iText to create a single PDF by merging a number of PDFs using PDFCopy. I need to create a TOC (not bookmarks) at the beginning of this document with clickable links to the first pages of each of the source PDFs. Code to merge…
Butani Vijay
  • 4,181
  • 2
  • 29
  • 61
4
votes
1 answer

Got DocumentException Arial with Cp1252 is not recognized

the last months I generates thousends of pdfs (on Windows 7 while developing, OpenSuse while test & production) with font Courier. Now I got the goal to use Arial. So I switched the font name in our property files and i got this…
Mirko
  • 1,512
  • 1
  • 12
  • 19
4
votes
2 answers

How to display indian rupee symbol in iText PDF in MVC3

I want to display Special Character India Rupee Symbol in iTextPDf, My Code: Font fontRupee = FontFactory.GetFont("Arial", "₹", true, 12); Chunk chunkRupee = new Chunk(" ₹ 5410", font3);
Avinash Singh
  • 2,697
  • 11
  • 44
  • 72
3
votes
1 answer

iText setting Creation Date & Modified Date in sandbox.stamper.SuperImpose.java

I'm trying to set Creation Date & Modified Date in the Superimposing content from one PDF into another PDF example sandbox.stamper.SuperImpose.java. The principle is (I think) clear: use getInfo() & then do info.put(PdfName.CREATIONDATE, new…
Dave The Dane
  • 650
  • 1
  • 7
  • 18
3
votes
1 answer

SOLR tika processor not crawling my PDF files prefectly

Hi fellow SOLR developers, I have some pdf files which has some circuit diagrams. There are some text written vertically over the circuits. For instance, there is a word "junction connector" marked in the pdf, vertically, over a circuit stretch,…
aswath86
  • 551
  • 5
  • 14
3
votes
2 answers

Stop iText table from spliting on new page

I am developing an app for android that generates pdf. I am using itextpdf to generate the pdf. I have the following problem: I have a table that has 3 rows and when this table is near the end of a page sometimes it puts one row on one page and two…
Shura Capricorn
  • 119
  • 1
  • 9
1
2 3
15 16