iText Knowledge Base
Search in spaces:
-
Why doesn't FontFactory.GetFont() work for all fonts?
If I say: var georgia = FontFactory.GetFont("Georgia Regular", 10f); it doesn't work. When I check the state of the variable georgia, it
-
Why can't I set the font of a Phrase?
Why doesn't setting the font of a Phrase after the construction of the object work? I'm starting with iTextSharp and wondering if there
-
Why is iText embedding a font even when I specify not to embed?
Why does NOT_EMBEDDED option still embed the font ? I am using Noto fonts to create a PDF and evaluating embedding versus not embedding.
-
Font examples
These questions were answered in the scope of 7.0.x and 7.1.x versions. However, if you find links to our GitHub repo
-
Why is my font not applied when I create a PDF document?
I am generating PDF documents with iText. When I try to include the "Agenda Tabular Light" font, iText ignores my choice of font. How can
-
Why do I get a font embedding error when creating PDFA/1a?
What i am trying to achieve here is create a list with a bullet in front of every item in the list. What am i missing here? I have a
-
Why do I get a message saying 1.not.found.as.a.resource?
What might cause new Font(Font.HELVETICA, 11f, Font.BOLD) or BaseFont.createFont(BaseFont.HELVETICA, 'Cp1252', BaseFont.NOT_EMBEDDED) to
-
How to use System Font in iTextSharp with VB.net?
Can someone help me with writing the code to use a system font? I'm using Itextsharp to convert text files to PDF documents dynamically
-
Why aren't my fonts getting registered?
I have 156 TTF files under my /usr/share/fonts directory tree. Why aren't these being registered? I have a program using iTextSharp that
-
How to use the font Verdana in PdfStamper?
Why doesn't exchanging the Part BaseFont.HELVETICA with "Verdana" work? I want to use Verdana as a font while stamping a PDF file with
-
Why isn't the Rupee symbol showing?
I tried using arial.ttf and arialbd.ttf, but I don't have any luck with these to show the rupee symbol. Why doesn't it work? I am using
-
How to use multiple fonts in a single cell?
I'm making a windows form for a friend who delivers packages. I want to transfer his current paper form, into a PDF with the iTextSharp
-
How to use Cyrillic characters in a PDF?
Why are characters such as "?" and "?" not being recognized? I have a problem when adding characters such as "?" or "?" while generating
-
Chapter 1: Introducing fonts
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
How can I load a font from /WEB-INF/resources/fonts/foobar.ttf?
As far as I can see, it should be not found in resources by iText's FontFactory. class. The question pretty much says it all. I get
-
Why doesn't getDefaultCell().setBorder(PdfPCell.NO_BORDER) have any effect?
For some reason table.getDefaultCell().setBorder(PdfPCell.NO_BORDER) has no effect: my table has still borders. Here is my code:
-
How to fit a String inside a rectangle?
When the column height is not sufficient to add the content of the strings, why is the content incomplete? I'm trying to add some
-
How to check if a font is bold?
I have an application, that extracts headings out of pdf files. The documents that the application is supposed to work with, all have
-
Chapter 6: Using fonts in pdfHTML
Up until now, we haven't spent much attention to the fonts that were used when we converted HTML to PDF. We know that Helvetica is the
-
How does a PdfPCell's height relate to the font size?
In iText, what is the minimum height of a PdfPCell for which a given size of font text is visible? Is there any ratio between PdfPCell
-
Why are PDF files different even if the content is the same?
Can someone please explain to me what kind of differences there are between files and the reason why the PDF format has this defect? I've
-
How to display indian rupee symbol?
Why does my code not work? I want to display the special character "India Rupee Symbol" in iText, My Code: BaseFont rupee
-
How to embed a font only partially?
Is partial embedding automatic? I am asked to include partial font into a PDF. I think I will use iText and I found how to embed the
-
How to use two different colors in a single String?
I want to set the color for only part of the string. How do I do this? I have string like below, and I can't split the string. String
-
What are the extra characters in the font name of my PDF?
Why does it happen only for a few PDF file? While extracting font name from PDF, I get some junk characters followed by plus sign and
-
Why can't I extract text added using a Type3 font correctly from a PDF?
I have PDF file in Arabic that has text with font Type3 when I extract text using PDFBox some characters are empty and their font equals
-
How to create a PDF with font information and embed the actual font while merging the files into a single PDF?
I would like to create PDFs which only embed font information, not the full font. Then when I merge these PDFs into a single document, I
-
Why can't I embed a font due to licensing restrictions?
Before we answer this specific question, let's take a look at another question that was posted on Stack Overflow: Do I need a license for
-
How to change the text color of an AcroForm field?
When I change the text color for a field it does not change. Why is that? I have a PDF with named fields I created with Adobe LifeCycle.
-
Do I need a license for Windows fonts when using iText?
For example if I am using Arial, one of the most commonly used fonts (but which is not free), do I need to purchase the font? I
-
How can I generate a PDF/UA compatible PDF with iText?
We have a number of dynamically generated PDFs on our site that were created using iText 2.1.7. However, we also have a large number of
-
Why is my cell event not triggered?
Please take a look at my code. I am expecting the cell event to be triggered for two cells, but it only triggers on the first cell. The
-
Chapter 2: Adding content to a Canvas or a Document
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
Chapter 3: Using renderers and event handlers | .NET
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
How to make a single letter bold within a word?
Is it possible to bold out specific letters within a word in iText? Consider this sentence, "this is a word". Could I make all the "i"
-
What is causing syntax errors in a page created with iText 7?
The document prints fine, so why do I get an error? I am getting the following error when I want to print a PDF generated with
-
Chapter 7: Creating PDF/UA and PDF/A documents
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
Chapter 7: Creating PDF/UA and PDF/A documents | .NET
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
Chapter 3: Using renderers and event handlers
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
Chapter 4: Creating reports using pdfHTML
Roughly speaking, there are three major ways to create PDF documents using iText, You can create a PDF document from scratch using iText
-
Release iText 7.1.4
iText 7.1.4 is the fourth maintenance release for iText 7.1 Core https://itextpdf.com/itext-7-core/Community
-
How to get a font from an array?
Is it possible to create a Font object from a byte array instead of using file paths? The FontFactory class has two methods for
-
Chapter 2: Adding low-level content
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
Chapter 2: Adding low-level content | .NET
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
Chapter 2: Defining styles with CSS
In the previous chapter, we looked at different snippets of Java code. In this chapter, we'll use the same snippet for every example:
-
How to print mathematical characters like ?, ?, ?, ?, ? ?, ??
I am using iText for PDF generation. I have some characters/symbols to print like ∈, ∩, ∑, ∫, ? (Mathematical symbols) and many others.
-
Why is my PDF missing several characters?
In spite of the abundance of documentation on how to use font files, and how to create documents with text in different languages, people
-
How to introduce a custom font weight in iText 7?
Is there a way to set font weight as a number? I can set bold font like this: iTextSharp.text.Font font_main = new
-
How to choose the optimal size for a font?
Given a certain available width, how do I define the font size for a snippet of text, so that it matches the available width? Posted on
-
Chapter 5: Custom tag workers and CSS appliers
In this chapter, we'll change two of the most important internal mechanisms of the pdfHTML
-
PDF and Digital Signatures
The digital signature technology, as described in ETSI's PDF Advanced Electronic Signatures (PAdES) standard and ISO's ISO-32000
-
How to set a fixed background image for all my pages?
I want to apply the background image to all of the pages, but it is only showing up on the last page. Why is that? On Button Click, I
-
Why do I get a StackOverflowException in the OnEndPage() event handler?
Why does it not work when I override the OnEndPage event to add a paragraph to the document? In the code below, you can see that I've
-
How can I find the maximum character limit for a text field?
How can I find the maximum character limit for a text field in an AcroForm form? I've researched this problem and I tried the following
-
How do the measurement systems in HTML relate to the measurement system in PDF?
Similar questions were posted on Stack Overflow, for instance on Aug 28, '14
-
Why is the page size of a PDF always the same, no matter if it's landscape or portrait?
If I call the getPageSize(), the value is always the same. Why isn't the value different for a page in landscape ? I have a PdfReader
-
Chapter 3: Generating PDF based on Media Queries
Figure: pdfHTML C3F01 Examining the example HTML file Figure 3.1 shows an HTML page introducing South by South West, a yearly event in
-
Chapter 5: Adding AbstractElement objects (part 2)
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
pdfOptimizer: Support added for Font, Image, Color Space optimization
Background: pdfOptimizer https://itextpdf.com/en/products/itext-7/compress-pdf-pdfoptimizer is iText's latest and greatest innovation in
-
How to create a pushbuttonfield with double byte character text?
I need a pushbuttonfield with double byte characters (DBCS) as the text. This works: PushbuttonField myButton = new
-
Chapter 3: Using ILeafElement implementations
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
Why aren't images added sequentially?
The order of the elements on paper is not the same as the order that I used to put the element in the document via the document.add()
-
Which languages are supported in pdfHTML?
This is not a new question. The answer can be found in chapter 6
-
Release iText 7.0.3
With 7.0.3 https://mvnrepository.com/artifact/com.itextpdf/itext7-core/7.0.3 we're bringing you another maintenance release for iText 7
-
How to allow a Unicode subscript symbol in a PDF without using setTextRise()?
Is there a setting to change the encoding/font of the text to UTF-8, so that it allows all the Unicode symbols? I have been trying to
-
Chapter 4: Adding AbstractElement objects (part 1)
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
Tables
These questions were answered in the scope of 7.0.x and 7.1.x versions. However, if you find links to our GitHub repo
-
How to create Persian content in PDF?
I want to retrieve data from database and show them to the user. How do I do this if my character is in Arabic or Farsi? I have problem
-
Why do PDFs change when processing them?
When I calculate a hash for my files, I get 2 different hash results. Why is this? In the next code snippet, I use PdfStamper, but I
-
How to introduce superscript?
How do I format dates so that the "th" in 14th or "rd" in 3rd is in superscript? I want to format a date like this: 14th may 2015.
-
How to apply color to Strings in a Paragraph?
I want to have different font color and size for these Strings. How Can I do that on ColumnText/Paragraph? I am combining 2 strings to
-
Chapter 1: Introducing basic building blocks
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
Chapter 1: Introducing basic building blocks | .NET
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
Release iText 7.1.5
iText 7.1.5 is the fifth maintenance release for iText 7.1 Core https://itextpdf.com/en/products/itext-7/itext-7-core/Community
-
How to restrict the number of characters on a single line?
How can I add strings to a single line that is underlined? I am using iText to generate PDFs. In these PDFs, I need to add two Strings on
-
Core SVG: Added support of font-relative units for the font-size property of a text element
In previous iText 7 Core versions, the font-size attribute in SVG’s text element was in some specific cases being calculated incorrectly.
-
How to rotate and scale pages in an existing PDF?
I need some example code of using the PdfCopy class to resize a page. There is a PdfCopy.SetPagesize() function, but I have basically no
-
Release iText 7.1.9
iText 7.1.9 is the latest quarterly release for iText 7 Core/Community. This release includes further documentation
-
Release iText 7.1.3
iText 7.1.3 is the third maintenance release for iText 7.1 Core https://itextpdf.com/itext-7-core/Community
-
How to extract a page number from a PDF file?
We explored many API's like Tika, PdfBox and iText to extract page numbers from a PDF file, but we weren't able to meet this requirement.
-
Release iText Core 7.1.14
Release date: January 14, 2021 iText Core 7.1.14 is the latest release of your favorite PDF library for Java and .NET, and the first
-
Why do I get a "getOutputStream() has already been called for this response" error in JSP?
How can I generate a dynamic PDF file which can be downloaded by client machine? I'm using JDBC to fetch data from database and then I
-
Chapter 7: Handling events; setting viewer preferences and printer properties
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
How to change the line spacing of text?
In my PDF the default space between the lines is slightly greater than I consider ideal. I'm creating a PDF document consisting of text
-
Advantages of using Blockchain for Signing PDF documents
Suppose that we don't store the signature of a document in the document itself, but instead store it in the blockchain. In a blockchain
-
How to calculate/set font line distance?
I am implementing a PdfPageEventHelper event to add a footer as shown in this code snippet: ColumnText.showTextAligned(cb,
-
How to rotate a paragraph?
Why can't I rotate anything bigger than a single line? I have a web site where the users upload photos and create photobooks. Also, they
-
How to add a page number in the header of a PDF/A Level A file?
Why is it that when I introduce text that is added at an absolute position, iText tells me that the content I'm adding isn't tagged? I am
-
How to add text to an image?
This was the original question: Pdf vertical postion method gives the next page position instead of current page In my project I use
-
How can I add an image to all pages of my PDF?
I have been trying to add an image to all pages using iTextSharp. The image needs to be OVER all content of every page. I have used the
-
How to make an image a qualified mask candidate in itext?
Is there a way to mask an image using another image in iText? I want to mask an image using another image, for example A.jpg should be
-
Release iText 7.0.5
iText 7.0.5 https://mvnrepository.com/artifact/com.itextpdf/itext7-core/7.0.5 is a scheduled maintenance release for iText 7 Community.
-
iText Core: Support Type3 fonts reading for stamping mode
Background: Type3 fonts are user-defined fonts in which arbitrary characters are mapped to custom glyphs. For instance, a character A can
-
.iText Core: Support Type 3 fonts reading for stamping mode vLatest
Background: Type 3 fonts are user-defined fonts in which arbitrary characters are mapped to custom glyphs. For instance, a character A
-
How to enable LTV for a timestamp signature?
Acrobat tells me my signature is LTV enabled, but the timestamp signature is not. How can I make both LTV enabled? I'm using iText to
-
How to format a field as a percentage?
I use iText from C# code. I use AcroFields to populate a form with data, but I lose my formatting. I am using the following: Stream os =
-
Do we need a browser engine to render HTML+CSS to PDF?
No, pdfHTML does all the work parsing the HTML and CSS, and mapping them to iText objects and styles. Then the iText engine renders the
-
Before we start: installing iText Core | .NET
All the examples explained in this tutorial are available on our web site from this URL: Examples for the iText jump-start tutorial
-
Why does ColumnText ignore the horizontal alignment?
Why does the text appear printed on top of a column, where it is unreadable? I'm trying to get some rows of text on the left side and
-
How to watermark PDFs using text or images?
What are my options from a Java serverside context? Watermark without rotation What are my options from a Java serverside context?
-
How to decrypt a PDF document with the owner password?
I need to remove the security/encryption from some PDF documents, preferably with the iText library. This used to be possible, but after
-
How to hyphenate text?
I generate a PDF file with iText in Java. My table columns have fixed widths. Text that is too long for one line is wrapped in the cell.
-
Fonts and merging documents
This example was written in answer to the question Click How to create a PDF with font information and embed the actual font while
-
Content parsing, extraction and redaction of text
These questions were answered in the scope of 7.0.x and 7.1.x versions. However, if you find links to our GitHub repo
-
Forms module changes
Overview In the scope of the 8.0.0 release we've introduced several major breaking changes in the forms module of the itextcore
-
Before we start: installing iText Core
All the examples explained in this tutorial are available on our web site from this URL: Examples for the iText jump-start tutorial
-
Unembed a font
How to unembed a font from a PDF unembedfont <div data-pym-src='https://itext.jdoodle.com/embed/itext'
-
Release iText 7.1.10
iText 7.1.10 brings the first quarterly release of 2020 for the iText 7 family, and coincidentally it's on the day that iText, as a
-
How to add text as a header or footer?
There are no errors but my footer doesn't show up. I'm creating a pdf and want to add a footer. I did everything like the book "iText in
-
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. How do I get the variable to be formatted using a regular font
-
Which PDF filters are used to encode data?
I am very keen to know which PDF filters are used by iTextSharp to encode the data so that it can decode the data properly. Currently I
-
Why does my header overlap with my content?
I am using page events to create a header that consists of a table. This table is added to each page in my document, but unfortunately,
-
Why is my content overlapping with my footer?
I want the content that overlaps to automatically move to the next page. I am using iTextSharp to generate PDF documents, but the content
-
How to create and apply redactions?
Is there any way to implement PDF redaction using iText? Working with the Acrobat SDK API I found that redactions also just seem to be
-
Part II - Proprietary APIs and Custom Providers
In contexts with higher security requirements the private keys usually are not available in local key stores but instead in external
-
Why do I get an "InvalidPdfException: PDF header signature not found"?
Is there some other way around this issue, that can allow reading of the pdf despite this problem? I have some code that reads pdf files.
-
Chapter 5: Manipulating an existing PDF document
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
Chapter 5: Manipulating an existing PDF document | .NET
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
Why iText and Blockchain?
When iText was first released in the year 2000, its author, Bruno Lowagie, wrote down the following mission statement: We want to enable
-
How to set the line width of a clipping path?
How do I change the size of my clipping path? I have a PdfTemplate and I want to clip its shape to a specific path. I know how to do
-
iText 7.1 - Migration guide for Java
Introduction This is a short migration guide to help you or your developers switch from 7.0.x to 7.1.0. This guide will broadly cover the
-
iText 7.1 - Migration guide for .NET
Introduction This is a short migration guide to help you or your developers switch from 7.0.x to 7.1.0. This guide will broadly cover the
-
Release iText 7.0.2
For this release, we have added some a minor updates to our iText 7 platform, version 7.0.2. As well as some updates for the License Key
-
.Why does the cell background color affect the color of other lines? vLatest
I'm creating a PDF where I add some text to each page as well as 2 lines that are drawn using the following method: private void
-
Why does the cell background color affect the color of other lines?
I'm creating a PDF where I add some text to each page as well as 2 lines that are drawn using the following method: private void
-
How to format a String resulting in a two-column display?
I'm trying to print in PDF two columns of information that contain some strings that the user inputs. This is my code so far: string s =
-
How to add an image watermark to a PDF file?
My problem is that in some PDF files no watermark is added although the file size increased. Why is that? I'm using C# and iTextSharp to
-
How to prevent splitting a table?
How to ensure the entire table goes on the same page. I'm developing an app that generates PDF using iText. I have a table that has 3
-
pdfHTML: Support for overflow-wrap, word-break CSS Properties
Background: Among the wide array of feature additions and bug fixes arriving with iText Core 7.1.14 and pdfHTML 3.0.3 comes the addition
-
Page events
These questions were answered in the scope of 7.0.x and 7.1.x versions. However, if you find links to our GitHub repo
-
Could not find a glyph corresponding to Unicode character
We ship pdfOCR https://itextpdf.com/en/products/itext-7/pdfocr with Liberation https://en.wikipedia.org/wiki/Liberation_fonts (GitHub
-
How to get the rendered dimensions of text?
I would like to find out information about the layout of text in a PdfPCell. I'm aware of BaseFont.getWidthPointKerned(), but I'm looking
-
Bouncy Castle changes
Overview In the scope of the 8.0.0 release, we've introduced several major breaking changes in the way we handle bouncy-castle
-
What does "Not LTV-enabled" mean?
Since my signature was declared valid at a known and certified date, why would it become invalid in the future? I'm using iText to sign
-
Why do I get an "System.IO.FileLoadException: Could not load file or assembly" error?
In my .NET project I get an "System.IO.FileLoadException: Could not load file or assembly" error. What could be causing this? In my .NET
-
Chapter 1: Hello HTML to PDF
In this chapter, we'll convert a simple HTML file to a PDF document in many different ways. The content of the HTML file will consist of
-
How to get rid of the top padding in a PdfPCell?
I'm creating labels (as in Avery labels) using tables. Positioning of label elements requires some very tight tolerances in order to fit
-
How to preserve high resolution images in PDF?
Is there any way to add a big image to an A4 page without losing quality? I'm trying to put high quality images into PDF (one per page).
-
Why does the function to concatenate / merge PDFs cause issues in some cases?
The code usually works great! But once in a while, it's rotating some of the pages by 90 degrees. Anyone ever have this happen? I'm using
-
iText 7: Converting HTML to PDF with pdfHTML
NOTE: We are continually updating our features- and have some new features that are not included in this eBook yet. You can find a full
-
Why is content missing in my table?
I am adding image cells based on an imagelist that may not contain 6 or 12 or 18 images. The number of images can be 1 or 7 or anything.
-
Why does PdfStamper create a file with 0 bytes?
When attempting to encrypt a pdf, I get a zero size file as a result. Any ideas what is causing this? File f = new
-
Before we start: Overview of the classes and interfaces
When we talk about iText 7's basic building blocks, we refer to all classes that implement the IElement interface. iText 7 is originally
-
PdfSigner now correctly detects and creates PDF/A documents
What changed? In previous iText versions, when a PDF was signed, iText did not check whether a given document was a PDF or PDF/A
-
How to calculate the height of an element?
I am generating PDF files from XML data. I calculate the height of a paragraph element like this: float paraWidth = 0.0f; for (Object o :
-
How to reorder the pages of a PDF file?
I am generating Table of Contents after creating a document and I want to move Table of Contents to the start of the document. Suppose
-
How to resize an Image to fit it into a PdfPCell?
The problem is that the chart image is too big for the cell. These charts look like this: vulnerabilityDetailsTable.AddCell(new
-
Release iText 7.1.0
We are pleased to announce that iText 7.1.0 https://mvnrepository.com/artifact/com.itextpdf/itext7-core/7.1.0 is a new release for iText
-
Release iText 7.1.6
iText 7.1.6 is the sixth maintenance release for iText 7.1 Core https://itextpdf.com/en/products/itext-7/itext-7-core/Community
-
How to convert PdfStamper to a byte array?
In my application, I need to read the existing PDF and add barcodes to this PDF and pass it to output stream. Here the existing pdf is
-
How to put text above a barcode instead of under the bars?
How do I produce barcodes with text above instead of below? I'm using iText to dynamically generate PDF docs.I'm able to introduce bar
-
Which image types are supported by iText?
I want to add a PNG image to a PDF file, but I've read that PNG files aren't supported in PDF. Does this mean that I can't use PNG files
-
How to add multiple images into a single PDF?
How do I update my code in order to add all the images into the exported PDF instead of only the last one? I have the following code, but
-
Release iText Core 7.1.15
Release date: April 14, 2021 iText Core 7.1.15 is the second quarterly release for 2021 of our multifunctional PDF SDK. Important notes:
-
Release iText 7.1.1
iText 7.1.1 https://search.maven.org/#artifactdetails%7Ccom.itextpdf%7Citext7-core%7C7.1.1%7Cpom is the first scheduled maintenance
-
Installing iText Community for Java developers
How to install iText Community Java version Thank you for your interest in our open-source PDF library, we hope you will enjoy using our
-
Why is the text I extract from an English PDF page garbled?
I'm trying to extract and print English text out of a PDF on the console. Extraction is done through iText's PdfTextExtractor class. The
-
Flexbox suport in pdfHTML
With the release of pdfHTML 3.0.4, we are pleased to announce that we now support the CSS Flexible Layout Box module
-
Chapter 4: Making a PDF interactive
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
Volume Counter FAQs
FAQs and information about the counting mechanism for volume licenses used by iText 7 and newer. Important! As of the release of iText
-
How to add a watermark to a page with an opaque image?
Is it possible to add a watermark that will be transparent on top of an image? I currently use: PdfContentByte canvas =
-
How to add an image to an existing PDF using AffineTransform?
Why does it work If I use the commented line without the transform, but with the AffineTransform, it does not show up? This is my code:
-
How to add a table as a header?
I am working with iTextSharp trying to add an header and a footer to my generated PDF, but if I try to add an header that have width of
-
Installing iText for Java
How to install iText Java version Thank you for your interest in our open-source PDF library, we hope you will enjoy using our product
-
Why do I get an error saying that "use of extended features is no longer available"?
What do I do when I get an error message about reader extensions. I am stamping text on an existing PDF document using this code:
-
Does my HTML have to be valid XML?
If you are still using iText 5 and XML Worker, you have to provide XHTML. For instance: a single <br> wasn't allowed in your HTML; you
-
Why does iText enter a cross symbol when CheckType style is check mark?
When filling in a PDF programmatically, how can I show check marks instead of cross checks? I have an existing PDF that I am filling in
-
Chapter 4: Making a PDF interactive | .NET
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
How to format a field as a currency?
I use iTextSharp to populate a form with data. I just learned [/question/how-format-field-percentage](how to format a field as a
-
How to rotate a single line of text?
How do I rotate text using the central point? I'm converting a document which is created with a online editor. I need to be able to
-
How to fill out a PDF file programmatically? (Dynamic XFA)
I have a dynamic XFA Form that I can fill out manually using Adobe Acrobat on my computer. Using iTextSharp I can read what the XFA XML
-
How to extract embedded streams?
I have embedded a byte array into a PDF file, more specifically an AVI file in a RichMedia annotation. Now I am trying to extract that
-
How to get the current page count?
When I try to count the total number of pages, I don't get the current amount. Why is that? I have to create a PDF document from a grid
-
How to add an x-offset to a text pattern with every x-step?
I am creating a text pattern within a rectangle. Is there a way to increase the xStep parameter of the pattern? I am creating a text
-
How to align a label versus its content?
I want my content to be aligned so that every line starts at the same X position, no matter how many items are added to the list. I have
-
Release pdfCalligraph 3.0.0
Release date: October 25, 2021 The pdfCalligraph 3.0.0 release brings support for two more types of the Glyph Positioning table (GPOS)
-
Basic Concepts (Glossary)
If you are new at Blockchain and PDF, you'll find this short glossary interesting. Concepts related to Blockchain: Distributed database:
-
Use cases
Invoices The ZUGFeRD https://www.ferd-net.de/standards/zugferd.html invoicing standard uses a combination of PDF/A-3 with an XML file
-
What is the PdfPTable.DefaultCell property used for?
I need help explaining the Java documentation for PdfPTable.getDefaultCell. The Java documentation for PdfPTable.getDefaultCell() reads:
-
How to create a new PDF file if a file name already exists?
How can I create a new PDF file without appending or overwriting the original data of the first user? I need to create simple receipts
-
How to only read text from a constant location on PDF pages?
How do I read only a specific part of each PDF page where information on each page is located at a constant position? I have a problem
-
How to create a JavaScript action to open the attachments panel?
Is there an action which opens the attachments panel? Not right away, but when the user presses some text? Is there an action which opens
-
Improving SVG to PDF conversion
What has changed? In the latest release of iText 7, there have been a couple of fixes for certain bugs that had the potential to
-
When Contracts aren't Smart Contracts
We're constantly talking about documents, and some of these documents might be agreements, or "contracts." The word "contract" is also
-
.How to add a border to a PDF page? vLatest
This is a snippet of my source code: Rectangle rect= new Rectangle(36,108); rect.enableBorderSide(1); rect.enableBorderSide(2);
-
How to add a border to a PDF page?
This is a snippet of my source code: Rectangle rect= new Rectangle(36,108); rect.enableBorderSide(1); rect.enableBorderSide(2);
-
How to create a nested column?
I need help creating a nested table in iText. How can I create a table that looks like the table in the following screen shot: This is my
-
Release pdf2Data 3.0.0
Release date: October 25, 2021 The main changes for pdf2Data 3.0.0 come from the upgrade of iText to 7.2.0, so all improvements in iText
-
How to read text from a specific position?
I have a problem using iTextSharp when reading data from PDF File. What I want to achieve is to read only specific part of PDF page (I
-
Release iText Core 7.1.13
Release date: October 22, 2020 The iText Core 7.1.13 release is the fourth quarterly release for 2020 of our innovative PDF library. This
-
How to generate and design PDFs with iText or iTextSharp?
I'm wondering what is the best/easiest way to design a PDF document? Is it remotely legit to actually design a whole PDF document with
-
How to keep specific words together on one line?
I want to make sure that firstname and lastname aren't split by a newline. When a phone number contains space characters, I don't want
-
How to read bookmark titles?
I am working with a single PDF containing multiple documents. Each document has a bookmark. I need to read the bookmark names for a
-
Appendix
Method Text / Link Image Tab AreaBreak addStyle() Yes Yes No No setHyphenation() Yes No No No setSplitCharacters() Yes No No No
-
How To find internal links in a PDF file?
I am using ItextSharp for searching internal links in a PDF file. This is already done with External Links. //Get the current page
-
Release iText Core 7.2.4
Release date: October 25, 2022 As the last quarter of 2022 rolls around, it’s time for our final release of the year for iText 7 Core.
-
How to create a table in which the cells have different widths?
How to create with Java a table with three different row widths. How to create a table with Java that has three rows as follows: First
-
How to allow page extraction when setting password security?
Is it possible to create a PDF with password security enabled that also allows extraction of pages? I haven't found any property in
-
How to change the zoom factor in link annotations?
I want to change only zoom property of links. This is what I currently have: int n = reader.getNumberOfPages(); PdfDestination d = new
-
iText: Jump-Start Tutorial for .NET
NOTE: We are continually updating our features- and have some new features that are not included in this eBook yet. You can find a full
-
iText: Jump-Start Tutorial for Java
NOTE: We are continually updating our features- and have some new features that are not included in this eBook yet. You can find a full
-
Chapter 6: Creating actions, destinations, and bookmarks
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
Installing the iText license key and license key library for Java and .NET
Thank you for your interest in our PDF library, we hope you will enjoy using our product and share your experiences with us and the iText
-
Chapter 6: Reusing existing PDF documents | .NET
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
Chapter 6: Reusing existing PDF documents
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples
-
How to convert HTML containing Arabic/Hebrew characters to PDF?
This is a duplicate of the question Which languages are supported in pdfHTML?. The answer can be found in chapter 6, but this question is
-
How much does it cost to upgrade iText 5 to iText 7?
Customers who have a commercial license for iText 5 Core, and who are current support and maintenance subscribers can upgrade to iText 7
-
Tables and fonts
A couple of table examples. cellmethod <div data-pym-src='https://itext.jdoodle.com/embed/itext'
-
Deploying iText Suite SDK/API on Amazon Web Services
These instructions are for subscribers of the iText Suite (BYOL) on AWS Marketplace
-
How to solve an UnsupportedCharsetException when using itext-asian.jar
My Code: public static final String[] tempString = { "KozMinPro-Regular.otf", "UniJIS-UCS2-H", pharseString }; bf =
-
How to solve an UnsupportedCharsetException when using itext-asian.jar?
My Code: public static final String[] tempString = { "KozMinPro-Regular.otf", "UniJIS-UCS2-H", pharseString }; bf =
-
How to render certain HTML entities (such as arrows) to PDF?
This question was originally asked on Mar 18, '15 https://stackoverflow.com/questions/29121766 by aggsol
-
Release iText Core 7.2.0
Release date: October 25, 2021 We are pleased to announce the next major version of iText 7; iText 7.2.0. The most important change in
-
General questions about iText
These questions were answered in the scope of 7.0.x and 7.1.x versions. However, if you find links to our GitHub repo
-
How can I convert a CSV file to a table with a repeating header row?
I am generating a PDF file from CSV using iText. I need to format the file such that the header row (which occurs in the beginning of
-
pdfHTML: Line Height property support
In pdfHTML 3.0.0 (released with iText 7.1.11) support was added for the line-height property for inline-level elements as well as
-
How to define the data encoding when submitting a PDF form using AcroForm technology?
When I create a PDF form (for instance using Acrobat) that contains text fields in AcroForm format (PDF dictionaries, no XFA), and I
-
How to define the page size based on the content?
I'm generating a PDF document with iTextSharp. This document must have only one page. In other words the content must fit the page size.
-
ColumnText and the font ascender
For more info about this example, read the answer to the question Click How to adapt the position of the first line in ColumnText?
-
.ColumnText and the font ascender vLatest
For more info about this example, read the answer to the question Click How to adapt the position of the first line in ColumnText?
-
Why are the AcroFields in my document empty?
I have a PDF form with filled out fields. I can change the values and save them. But when I try to read the AcroFields, they are empty.
-
How to create a complex PDF document?
I have an Java/Java EE based application wherein I have a requirement to create PDF certificates for various services that will be
-
Migration guide from iText 5 to iText 7
Installation instructions Instead of having everything in one giant jar (or DLL), we have split iText into several independent parts. You
-
Part III - PKCS#11
The PKCS#11 standard defines a platform-independent API for accessing cryptographic tokens. If a device manufacturer or a service
-
.How do I set parameters back to the default value? vLatest
I am using absolute positioning when writing text in a PDF document using iTextSharp. It only have a single BaseFont instance for a
-
How do I set parameters back to the default value?
I am using absolute positioning when writing text in a PDF document using iTextSharp. It only have a single BaseFont instance for a
-
Creating a custom Type 3 font
logo <div data-pym-src='https://itext.jdoodle.com/embed/itext'
-
Reuse a font from an existing PDF
reusefont <div data-pym-src='https://itext.jdoodle.com/embed/itext'
-
Release iText Core 7.2.2
Release date: April 11, 2022 It's already Q2 of 2022, and so we're pleased to announce the release of iText Core 7.2.2. Your favorite PDF
-
Release iText 7.1.7
iText 7.1.7 is the quarterly release for iText 7 Core/Community. This release includes improvements to performance and reduced memory
-
Why do I get a BouncyCastle NoClassDefFoundError?
I want to encrypt my PDF but there seems to be an error. Here is the code: PdfReader reader = new PdfReader("my.pdf"); PdfStamper stamper
-
If iText is free why do I have to pay for it?
A common misperception is that open source software is free. Open source software is often better than proprietary closed source software
-
How to use a text extraction strategy after applying a location extraction strategy?
I used the following code to get data in PDF from a particular location. Rectangle rect = new Rectangle(0,0,250,250); RenderFilter filter
-
Manipulating existing PDFs
These questions were answered in the scope of 7.0.x and 7.1.x versions. However, if you find links to our GitHub repo
-
Release iText Core 7.2.5
Release date: January 16, 2023 Happy 2023 everyone! Thanks to our regular quarterly release schedule, the start of a new year also means
-
Can I generate a PDF from a URL instead of from a file on disk?
You can generate a PDF from any HTML InputStream. In most of the examples, we have used a FileOutputStream, but in chapter 4, we have
-
Release pdfCalligraph 2.0.9
Release date: April 14, 2021 In this new version of pdfCalligraph, we fixed two esoteric, yet rather annoying bugs. The first one could
-
How to strike through text using iText?
I have 2 numbers one above the other, but the first one must have an Strikethrough. I'm using a table and a cell to put both numbers in
-
Release pdfHTML 3.0.3
Release date: January 14, 2021 This release of pdfHTML brings many improvements for SVG processing. We are introducing the <pattern>
-
Absolute positioning of text
These questions were answered in the scope of 7.0.x and 7.1.x versions. However, if you find links to our GitHub repo
-
Inspect a PDF
These questions were answered in the scope of 7.0.x and 7.1.x versions. However, if you find links to our GitHub repo
-
Why does using ColumnText result in "The document has no pages" exception?
I want to use ColumnText to wrap text in a rectangle, but it tells me the document has no pages. I want to use ColumnText to wrap text in
-
Why do I have to buy core to use the add-ons?
The modular architecture of iText v7 allowed us to create significant add-on functionality with the development of add-on modules that
-
How to crop out a part of PDF file?
I have to remove the top part of each page from a PDF. I managed to do this with CROPBOX, but the problem is that this will make the
-
Release pdfOptimizer 1.0.1
Release date: April 14, 2021 We continue to improve pdfOptimizer, our newest iText 7 add-on designed to reduce the file size of your PDFs
-
Questions about PDF in general
These questions were answered in the scope of 7.0.x and 7.1.x versions. However, if you find links to our GitHub repo
-
Does a PDF file have styles, headers and footers?
Does a PDF file have styles, headers and footers information as is the case with docx files that have separate xml files with extra
-
pdfCalligraph: New types of GSOP lookup
Background: The Glyph Positioning table (GPOS) provides precise control over glyph placement for sophisticated text layout and rendering
-
Is it safe to remove XFA?
Are there any issues that can come up of removing the XFA format from a PDF form? If I don't drop XFA, I can see the fields pre-filled on
-
Interactive forms
These questions were answered in the scope of 7.0.x and 7.1.x versions. However, if you find links to our GitHub repo
-
pdfHTML: Using emojis in iText
Introduction From their humble beginnings in 1999, emojis have become a staple of digital communication and most document and
-
Release iText Core 8.0.1
Release date: Aug 2, 2023 Q3 of 2023 is here, and so is a new release of your favorite open-source PDF library for Java and .NET: iText
-
Release iText 7.0.4
With 7.0.4 https://mvnrepository.com/artifact/com.itextpdf/itext7-core/7.0.4 we're bringing you another maintenance release for iText 7
-
Release iText Core 8.0.0
Release date: May 10, 2023 It’s time for our second quarterly release of the iText Suite https://itextpdf.com/node/1746; yet as we
-
Why do I have to pay for pdfhtml during my upgrade, when I already have XML Worker in iText?
XML Worker was created with the intention of converting very small and basic HTML into a PDF as a black-box method. pdfHTML is a complete
-
Part IV - Appearances
When people sign a PDF, they often do not merely want to see that signature in some extra signature panel, they want to see a
-
How to merge documents correctly?
Is there some way to detect the page size and then use that same page size for those documents? Or, if not, is it possible to have it fit
-
What is the difference between AGPL and commercial license?
AGPL is a copyleft license. Copyleft gives every person who receives a copy of a work permission to reproduce, adapt or distribute the
-
Scaling large HTML content to render onto smaller PDF page sizes
There are often instances where you need to convert HTML content that is larger then the default page size of your PDF. This will cause
-
Release pdfRender 1.0.4
Release date: April 14, 2021 This release of pdfRender brings a lot of performance improvements and few bugfixes that make PDF to image
-
Release pdfHTML 4.0.2
Release date: April 11, 2022 pdfHTML is an iText 7 add-on that allows you to easily convert HTML and CSS into standards compliant PDFs
-
How to add inline spacing in a PdfPCell?
I need to add space between two parts of a line in a PdfPCell. Chunk chunk = new Chunk("Received Rs(In Words) : " + " " +
-
Release iText 7.0.7
iText 7.0.7 is a scheduled maintenance release for iText 7.0 Core https://itextpdf.com/itext-7-core/Community
-
How to change the spacing between words and characters?
I want to set the text alignment to justified, but I don't want iText to add any extra space between the characters. I don't want extra
-
pdfHTML: Support for generating cross references for TOC creation with target-counter, target-counters CSS properties
Background: The target-counter and target-counter CSS Level 3 properties retrieve counter values and display information from the
-
Release pdfHTML 3.0.5
Release date: July 5, 2021 The pdfHTML 3.0.5 release is the third quarterly release for 2021. A new feature in this release of pdfHTML is
-
How to disable the save button and hide the menu bar in Adobe Reader?
I am serving a PDF to a browser via a Servlet. I need to disable the "save" and "print" option in the Adobe Reader menu bar while other
-
Flattening a form
Examples written in answer to questions such as: Click Why does iText enter a cross symbol when CheckType style is check mark?
-
Release iText 7.0.6
iText 7.0.6 https://search.maven.org/#artifactdetails%7Ccom.itextpdf%7Citext7-core%7C7.0.6%7Cpom is a scheduled maintenance release for
-
Table events
These questions were answered in the scope of 7.0.x and 7.1.x versions. However, if you find links to our GitHub repo
-
Image examples
These questions were answered in the scope of 7.0.x and 7.1.x versions. However, if you find links to our GitHub repo
-
Absolute positioning of lines and shapes
These questions were answered in the scope of 7.0.x and 7.1.x versions. However, if you find links to our GitHub repo
-
Release iText Core 7.1.12
The iText Core 7.1.12 release is the third quarterly release of 2020 of our innovative PDF library. This Core release brings initial
-
pdfCalligraph: Support wrapping at word boundaries for languages which don't use spaces for word separation
Introduction Some languages don't use spaces to separate words and instead use spaces to only separate sentences. Languages which do this
-
How to make sure a check box is printed?
When I click on File and Print, the check boxes don't show in the print preview, and also don't print. Why is that? I am new to
-
How to hide the Adobe floating toolbar when showing a PDF in browser?
I am generating a PDF document and displaying it in a Web browser (the current version of IE is the most important target). I want to
-
How to add a rectangle to every page of a document?
Why does my code only add the rectangle on the last page? I'm using iText to create a PDF document. Right now I am trying to get a
-
Showing special characters
These examples are written in the context of questions such as: Click How to display indian rupee symbol? Click Why isn't the Rupee
-
What does TextPositioning in pdfOCR do?
pdfOCR https://itextpdf.com/en/products/itext-7/pdfocr allows you to define the way text is retrieved in the Tesseract
-
Can I create a Reader-enabled PDF using iText?
I want my PDF to have extra usage rights for people opening the document in Adobe Reader, but I can't find how to achieve this using
-
How to change width of single column of table?
I am looking to change the width of a column to fit a longer word. hello I have created table in a PDF file using iText. The heading of
-
Release pdfXFA 4.0.0
Release date: May 10, 2023 pdfXFA https://itextpdf.com/node/261/ is an iText Core add-on for Java and C# (.NET) that allows you to
-
Installing iText free trial for Java and .NET developers
Thank you for your interest in our PDF library, we hope you will enjoy using our product and share your experiences with us and the iText
-
Release iText 7.0.1
iText 7.0.1 is our first functional product update. It's a maintenance release that fixes a number of minor bugs, re-syncs the Java and
-
How to send a 'success' response back to Acrobat Reader from a java servlet?
How do I send a response back to the Acrobat Reader as a java servlet response? I am generating an editable PDF form at the server side
-
How to add blank pages while concatenating several PDFs using PdfSmartCopy
I'm trying to concatenate a huge number of PDF files to create a print-ready file, so that I don't have to print them one by one. The
-
Which languages are supported in pdfOCR?
Since pdfOCR https://itextpdf.com/en/products/itext-7/pdfocr relies on Tesseract https://github.com/tesseract-ocr/tesseract 4.1, you can
-
pdfCalligraph: Support for Myanmar script
With iText 7.1.13 and pdfCalligraph 2.0.8, we are pleased to announce that we now support the full support for rendering Myanmar script.
-
Release pdfOptimizer 2.0.1
Release date: January 11, 2022 The pdfOptimizer 2.0.1 release includes a small yet important improvement. It will now notify you in cases
-
Building blocks : Examples
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples you will find them for the latest available
-
How to create a clickable polygon or path?
Is anyone out there able to create a clickable annotation that has an irregular shape? I know I can create a rectangular one like this:
-
Czech example
This example was originally written in answer to the question Click How to use Cyrillic characters in a PDF?. It was then used to create
-
How to reorder pages in an existing PDF file?
I want to move a couple of the last pages to the start of my document. I am using the iText pdf library. Does any one know how I can move
-
How to rotate a page while creating a PDF document?
I can set the size of the page to landscape but the content is still oriented left->right while I would like it to be bottom->top. I want
-
How to define multiple actions for a PushbuttonField?
How do I keep a page redirect or how do I set it in code? In a PDF, I can set up a button to: Submit the FDF data to my RestAPI Redirect
-
How to set the page size to Envelope size with Landscape orientation?
I create a PDF document using iTextSharp and this code: Document pdfDoc = new Document(PageSize.A4.Rotate(), 10f, 10f, 100f, 0f); I
-
How to create a table with 2 rows that can be used as a footer?
I want to add footer with 2 rows. The 1st row will have the document name with a background color. The 2nd row will have copyright
-
How to add a new form from an existing PDF template?
I want create a PDF template from another template. The resulting PDF should still be a template that I can fill out with data. I tried
-
Release pdfHTML 3.0.1
A new feature in this release is the introduction of support for <linearGradient> in SVG and linear-gradient() in CSS. This is a commonly
-
.Release pdfHTML 4.0.0 vLatest
Release date: October 25, 2021 The pdfHTML 4.0.0 release doesn't bring as many visible changes compared to the previous major release,
-
Release pdfHTML 4.0.0
Release date: October 25, 2021 The pdfHTML 4.0.0 release doesn't bring as many visible changes compared to the previous major release,
-
How to generate 2D barcode as vector image?
Why are our barcode pages coming out completely black? I am generating 2D barcodes using iText API, but these barcodes are placed into
-
How can I add titles of chapters in ColumnText?
Why can I only add a Chapter to the document body and not add a Chapter to create a TOC? I need to make a PDF like this: And then add TOC
-
Create fields in a table
These examples were written in answer to questions such as: Click How to distribute the radio buttons of a radio field across multiple
-
How to add JPEG images that are multi-stage filtered (DCTDecode and FlateDecode)?
Recently I am tasked with reducing the file sizes of PDF generated from blank office documents. The images are mostly blank, but they
-
When is the content flushed to a PDF File by iTextSharp?
I assumed that Document.Add() flushed content to the PDF file (the file stream) immediately, but it looks like that's not the case.
-
Release pdfOCR 1.0.2
Release date: October 22, 2020 pdfOCR 1.0.2 is already the third release of our newest product. It brings some important improvements
-
Best iText 7 Questions on StackOverflow
These questions were answered in the scope of 7.0.x and 7.1.x versions. However, if you find links to our GitHub repo
-
How to make a particular sub-string Bold when converting HTML to PDF?
I am using iText in Java to convert a HTML to PDF. I want a particular paragraph which has some words as Bold and some as Bold+Underlined
-
How to add text at an absolute position on the top of the first page?
How can I add text automatically to the 1st page, instead of the last? I have a script that creates a PDF file and writes contents to it.
-
How to add text inside a rectangle?
I have created a rectangle using PdfContentByte. Now I want to add text inside this rectangle. How can I do this? My rectangle code is:
-
How to extend the page size of a PDF to add a watermark?
I want to add a watermark to a document that doesn't cover any of the existing text (not even if the watermark is transparent). Instead,
-
How to protect a PDF with a username and password?
How do I encrypt a PDF? Let's say I have a private teaching forum, where each user has a username and an encrypted password (paid
-
Splitting tables
Examples that show what happens when a table doesn't fit the page: Click How to prevent splitting a table? splitrowatendofpage <div
-
Release iText 7.1.2
iText 7.1.2 is the second maintenance release for iText 7 Core https://itextpdf.com/itext-7-core/Community
-
How to truncate text within a bounding box?
How can I stop the text from overflowing a given region when writing? I am writing content to a PdfContentByte object directly using:
-
Release iText Core 7.1.17
Release date: October 25, 2021 The iText 7.1.17 release is a maintenance release with a security bug fix for a vulnerability that allowed
-
How to prevent images from resizing in a table cell?
Is there a way to make all the images the same size? I would like to create a table that has a list of dots. I don't know ahead of time
-
Digital Signing with iText
Signing a PDF with early versions of iText was something akin to rocket science: the code had to do a lot of stuff which was hard to
-
How to add a background image to a cell?
I want to create a document which contains a table with cells with the same background image and text. I have the following requirements:
-
How to get the color properties of an AcroForm field?
I have 20 AcroForm text fields in my pdf with different color fill properties. I'm not able to read these properties. Is there any way we
-
How to fix the orientation of a PDF page in order to scale it?
How do I properly rotate page contents and how can I scale the rotated contents correctly? I need to scale down the pages of an existing
-
Digital Signatures Hub
This area is a central hub to collect our examples, FAQs, articles and other resources related to the topic of digitally signing PDF
-
How to tell iText how to clip text to fit in a cell?
When I call setFixedHeight() on a PdfPCell, and add more text than fits in the given height, iText seems to print the prefix of the
-
How to get the page number of an arbitrary PDF object?
I am trying to find the page number of a PDF object using iText's Java API. The following code reads in the PDF file, and gets the object
-
How to reduce redundant code when adding content at absolute positions?
This is part of a vb.net http://vb.net app that uses the itextsharp library: Dim cb As PdfContentByte = writer.DirectContent
-
Using iText 7 and AWS KMS to digitally sign a PDF document: Part 2
This example was written for the article "Using iText 7 and AWS KMS to digitally sign a PDF document
-
How to create a TOC when merging documents?
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
-
How to right-align text in a PdfPCell?
I have a C# application that generates a PDF invoice. In this invoice is a table of items and prices. This is generated using a PdfPTable
-
Release iText Core 7.1.16
Release date: July 5, 2021 The iText Core 7.1.16 release is already our third release for 2021 and it brings a few important
-
Release pdfOffice 2.0.3
Release date: October 25, 2022 pdfOffice https://itextpdf.com/node/15181/ is an iText 7 add-on that enables high-quality native
-
I have been using iText 5 or 7 without a commercial license but never open sourced my application. What should I do?
Legally, your usage falls under the terms of the AGPL license if you haven’t purchased a commercial license but you’ve been using the
-
SVG: support exponent notation for numbers with capital E
There was a bug in SVG processing where the use of a capital 'E' for exponent notation would cause rendering issues by causing incorrect
-
What is the connection between LTV and document timestamps?
How do I make a PDF document LTV enabled without using timestamps? I have read the paper, discussions but there is one thing still
-
How to divide a page in N parts so we can fill each with a different source?
How can I achieve this using iTextPDF in java? Example So the first half of the page would be in English while the second part would be
-
What is the size limit of pdf file?
I am using iTextSharp in a web application to generate PDF files. These PDF files contain .tiff images taken from a folder. If size of
-
How to remove text from a PDF?
Is it possible to remove all text occurrences contained in a specified area (red color rectangle area) of ??a pdf document? I want to
-
How to check a check box?
I've tried so many different ways, but I can't get the check box to be checked! Here's what I've tried: var reader = new
-
How to reuse a page from one PDF document into another PDF document?
How can I create an element from an existing PDF, so that I can place it in my new PDF? I'm trying to add an image that I have on the
-
Release pdfRender 1.0.2
Release date: October 22, 2020 The most important feature which was added in this release is a change to the supported output formats.
-
How do I create a separate OCR layer?
By default, pdfOCR https://itextpdf.com/en/products/itext-7/pdfocr merges the recognized text into the image that just got processed, but
-
Release pdfHTML 3.0.4
Release date: April 14, 2021 We are really proud of our job for the pdfHTML 3.0.4 release, since it brings quite a few improvements and
-
Release pdfRender 2.0.3
Release date: October 25, 2022 pdfRender https://itextpdf.com/node/14046 is an iText 7 add-on for Java to generate images from PDF
-
How to convert an ASP or JSP page to PDF?
The pdfHTML add-on parses HTML and CSS. That's it. ASP.Net, JSP, MVC, Razor, Struts, Spring, etc, are all HTML frameworks iText and
-
How to draw vertical gradient in iTextSharp?
I can make a horizontal gradient, but how do I make it vertical? I am trying to draw a vertical gradient at the bottom of an iTextSharp
-
How to find out the current cursor position on a page?
I'd like to execute a command to tell me how much height has been consumed thus far in the document (for the current page) so I can set
-
How to attach files to a PDF?
I am struggling with attaching files to a PDF that I am generating at runtime. I manage to attach a file to the PDF, but I can't seem to
-
How to find the absolute position and dimension of a field?
And is the opposite possible: if I know the position, can I get the name of the field? Given an field name, is it possible to find the
-
How to flatten a XFA PDF Form using pdfXFA
I assume I need to flatten a XFA form in order to display properly on the UI of an application that uses Nuance's CSDK. When I process it
-
How to show an image with large dimensions across multiple pages?
I have an image with large dimensions which I How could I split the image into multiple pages while retaining its original dimensions? I
-
How to flatten a XFA PDF Form using iTextSharp?
I assume I need to flatten a XFA form in order to display properly on the UI of an application that uses Nuance's CSDK. When I process it
-
Support for a symbol element in SVG
The release of iText Core 7.1.13 includes a number of bug fixes as well as useful feature additions. As we continue to work on increasing
-
pdfHTML: support for inline-block with a width percent value
In previous versions of pdfHTML there was a CSS bug where we did not fully support using a span or label tag in certain situations. For
-
pdfRender: WEBP format support added
In our iText 7.1.14 release we've added support for the WEBP image format to pdfRender 1.0.3. This is a modern image format which employs
-
pdfHTML: Creation and/or merging of outlines for documents
With pdfHTML 3.0.0 (released with iText Core 7.1.11) we improved the creation and/or merging of document outlines. Details When we
-
How to rename named destinations in existing PDF files?
I would like the named destinations in all the documents to be the same. I've been using named destinations in PDF files to open the PDF
-
What's an easy to print "first right, then down"?
I would like to print "first right, then down", which is similar to row-major order. Print the first page-full of rows, but all columns
-
Installing iText pdfSweep for Java developers
How to install pdfSweep Java version Thank you for your interest in our pdfSweep redaction add-on, we hope you will enjoy using our
-
Installing iText pdfHTML for Java developers
How to install pdfHTML Java version Thank you for your interest in our HTML and CSS to PDF converter add-on pdfHTML, we hope you will
-
Installing iText pdfOCR for Java developers
How to install pdfOCR Java version Thank you for your interest in our OCR add-on pdfOCR, we hope you will enjoy using our product and
-
Positioning different text snippets on a page
These examples were written in response to questions such as: Click How to divide a page in N parts so we can fill each with a different
-
Release licensekey 3.1.4
Release date: April 14, 2021 We are releasing version 3.1.4 of our auxiliary license libraries (both licensekey and licensekey-volume)
-
Release pdfSweep 3.0.0
Release date: October 25, 2021 In the 3.0.0 release pdfSweep as with all other iText 7 add-ons gets the support of the new License
-
Is it possible to attach multiple layout events to a PdfPCell?
How do I separate different cell options in separate events? I'm not sure if it's possible to set multiple events. I would like to
-
How to create hierarchical bookmarks?
How can I create a hierarchical bookmark structure in PDF using iText? I have data in ArrayList like below : ArrayList tree = new
-
How to continue field output on a second page?
I have generated a PDF from a template. The PDF has a field in the middle of it that is of variable length. I am trying to work it so
-
pdfOffice + iText Core Annotations Example
Background: With the addition of pdfOffice to the iText 7 Suite portfolio comes a wide range of potential synergies and new frontiers for
-
pdfHTML: support for CSS4 device-cmyk example
Introduction Due to popular demand from customers, we have recently added support for adding content made with device-dependent CMYK
-
How to shrink pages in an existing PDF?
I am using PdfWriter, PdfImportedPage and the addTemplate() method to shrink pages. However, when I do so, I lose the rotation of the
-
Installing iText for .NET
How to install iText .NET version Thank you for your interest in our open-source PDF library, we hope you will enjoy using our product
-
How to maintain a paragraph's indentation inside a table cell?
Is there a way to determine if a paragraph will take a new line due to exceeding PdfPCell width, and to indent the remainder of the text
-
Argument not specified in iTextSharp
I am getting the errors that cell.setPadding, cell.setHorizontalAlignment, cell.setBorder all are not member of
-
How to add alternative text for an image in Tagged PDF?
I know that iText can generate tagged PDF documents from scratch, but is it possible to insert alternative text for images in an existing
-
How to extract text and anchor information from a PDF?
I am looking for a method to extract the text as well as anchor information using iText. For example: the PDF content is "You can visit
-
Installing iText Community for .NET developers
How to install iText Community .NET version Thank you for your interest in our open-source PDF library, we hope you will enjoy using our
-
Installing iText pdfOptimizer for Java developers
How to install pdfOptimizer Java version Thank you for your interest in our optimizer add-on pdfOptimizer, we hope you will enjoy using
-
Installing iText pdfOffice for Java developers
How to install pdfOffice Java version Thank you for your interest in our office converter add-on pdfOffice, we hope you will enjoy using
-
How to get the UserUnit from a PDF file?
What do I need to do to get the user unit for each page so I can then get the page dimensions in pixels? I have a bunch of PDF files that
-
pdfRender: BufferedImage as output format
The pdfRender add-on enables you to easily display (render) any PDF as an image. Before version 1.0.2 of the library you were able to
-
.How to add "continue on next page" / "continued from next page" to a table? vLatest
I need to build a table to which I'm adding all the content dynamically by iterating over a list of records. Every record corresponds
-
How to add "continue on next page" / "continued from next page" to a table?
I need to build a table to which I'm adding all the content dynamically by iterating over a list of records. Every record corresponds
-
Release pdfOffice 1.0.0
Release date: July 5, 2021 We are proud to announce the first release of pdfOffice
-
Installing iText pdfOCR for .NET developers
How to install pdfOCR .NET version Thank you for your interest in our OCR add-on - pdfOCR, we hope you will enjoy using our product and
-
Installing iText pdfHTML for .NET developers
How to install pdfHTML .NET version Thank you for your interest in our HTML and CSS to PDF converter add-on - pdfHTML, we hope you will
-
Installing iText pdfRender for Java developers
How to install pdfRender Java version Thank you for your interest in our renderer of PDFs as images, we hope you will enjoy using our
-
Installing iText pdfXFA for Java developers
Thank you for your interest in our dynamic PDF add-on - pdfXFA , we hope you will enjoy using our product and share your experiences with
-
Installing iText pdfCalligraph for Java developers
Thank you for your interest in our PDF tool for typography add-on - pdfCalligraph, we hope you will enjoy using our product and share
-
Installing iText pdfSweep for .NET developers
How to install pdfSweep .NET version Thank you for your interest in our pdfSweep redaction add-on, we hope you will enjoy using our
-
Part I - Overview and Simple Cases
An Overview The iText signing API is based on the PdfSigner class. This class takes care of the PDF-specific aspects of PDF signing.
-
Digital signatures - chapter 2
These examples were written in the context of Chapter 2 - "PDF and digital signatures" of the Digital Signatures for PDF documents
-
How to tell iText which fields to flatten first?
How do I change the order on the page of these fields with iText? I have a PDF with text form fields at are layered one on top of the
-
Where is the origin (x,y) of a PDF page?
I want to position text at some specific place in the document. However, I cannot figure out where to find the origin of the coordinate
-
How to convert colored images to black and white?
I've tried varieties of COLORSPACEs and BITSPERCOMPONENTs, but always get "Insufficient data for an image", "Out of memory", or "An error
-
How to define different border types for a single cell?
How do I create a cell with various borders? Example table When I set up the cell.setBorder(Rectangle.BOTTOM | Rectangle.RIGHT); the
-
Do you have customer testimonials?
Yes, you can find all our customer testimonials and case studies here https://itextpdf.com/en/resources/case-studies. testimonial
-
How to parse multiple HTML files into one PDF?
This question was originally posted on Stack Overflow on January 6, 2015
-
Where are your .NET examples?
While our library is the same in the Java and .NET version you can take a look at the .NET Jump-Start Tutorial
-
How does iText Group count processes/files?
Files are counted based on one open, close, or edit to a PDF file. For example all of the following would count as one process for
-
Release RUPS 7.1.13
Release date: October 22, 2020 We always release RUPS together with iText 7 Core https://itextpdf.com/en/products/itext-7/itext-7-core,
-
Release RUPS 7.1.14
Release date: January 14, 2021 We always release our PDF debugging tool RUPS together with iText 7 Core
-
Release RUPS 7.1.15
Release date: April 14, 2021 We always release our PDF debugging tool RUPS together with iText 7 Core
-
Release RUPS 7.1.16
Release date: July 5, 2021 We always release our PDF debugging tool RUPS together with iText 7 Core
-
Release RUPS 7.2.0
Release date: October 25, 2021 We always release our PDF debugging tool RUPS together with iText 7 Core
-
Release RUPS 7.2.1
Release date: January 11, 2022 We always release our PDF debugging tool RUPS together with iText 7 Core
-
Release RUPS 7.2.2
Release date: April 11, 2022 We always release our PDF debugging tool RUPS together with iText 7 Core
-
Release RUPS 7.2.5
Release date: January 16, 2023 We always release our PDF debugging tool RUPS https://itextpdf.com/node/281/ together with iText Core
-
Examples for the iText jump-start tutorial | .NET
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples you will find them for the latest available
-
Examples for the iText jump-start tutorial
This Tutorial was written with iText 7.0.x in mind, however, if you go to the linked Examples you will find them for the latest available
-
Release RUPS 7.1.12
We always release RUPS together with iText 7 Core https://itextpdf.com/en/products/itext-7/itext-7-core, as it is one of the most
-
Release pdfOptimizer 2.0.0
Release date: October 25, 2021 In a nutshell, the pdfOptimizer 2.0.0 release benefits from all the improvements in iText 7.2.0 to offer
-
.Release pdfOptimizer 2.0.0 vLatest
Release date: October 25, 2021 In a nutshell, the pdfOptimizer 2.0.0 release benefits from all the improvements in iText 7.2.0 to offer
-
Release RUPS 7.2.4
Release date: October 25, 2022 We always release our PDF debugging tool RUPS https://itextpdf.com/node/281/ together with iText 7 Core
-
How to check for an event and remove it?
Is there a way to check to see if a page event has already been added to a PdfWriter object? If so, can you also remove that page event?
-
Release pdfRender 1.0.6
Release date: October 25, 2021 Along with the iText 7.1.17 maintenance release we are also releasing an update to pdfRender. pdfRender
-
Release pdfOCR 2.0.0
Release date: October 25, 2021 The pdfOCR 2.0.0 release brings the support of the new Unified License Mechanism along with the other
-
pdfOffice: improved conversion of docx files with repeating table header on new page
With the release of iText 7.2.2 and pdfOffice 2.0.2, we improved the conversion of docx files where a table extends to a new page.
-
How to make a field not required?
I am trying to make a field not required using iText. I know that I can make a field required using something like below statement:
-
How do I get an object if I have its indirect reference?
I would like to analyze the individual radio buttons. I am using iTextSharp to analyze a form enabled PDF. I know how to navigate to the
-
How to introduce multiple PdfPageEventHelper instances?
I have to generate a large amount of different types of documents using the iTextSharp library that all have things in common. Some pages
-
How to draw a borderless table in iTextSharp?
It appears as though the PDfPCell class does have a border property on it but not the PdfPTable class. Is there some property on the
-
How to introduce a rowspan?
I am adding a table to a PDF file. I have 3 rows and 3 columns. I want the first column to appear only once as a single cell for all the
-
Release pdfHTML 4.0.1
Release date: January 11, 2022 The pdfHTML 4.0.1 release is the first release of our HTML to PDF creation add-on in 2022. It brings
-
Safeguards against loops in cross-reference structure of PDF files
We've made some improvements to how we parse cross-reference tables or streams in existing documents. The PDF file format uses these
-
Release RUPS 7.2.3
Release date: July 5, 2022 We always release our PDF debugging tool RUPS https://itextpdf.com/node/281/ together with iText 7 Core
-
iText 7 Core: Fixing incorrect height calculation
Background: The BBox, or the Bounding Box, is the smallest rectangle that can enclose all the content on the page. The values represented
-
Creating and editing PDF 2.0 Documents
In July 2017 PDF 2.0 was released which added a bunch of useful features to PDFs such as AES-256 encryption, unicode passwords,
-
Evaluating JS with pdfHTML
While pdfHTML does not evaluate JavaScript, we can solve this problem by using a browser engine to preprocess the HTML + CSS +
-
How to convert an existing A4 PDF document to an A3 booklet?
I want to convert an existing A4 PDF document into an A3 PDF using Java. Since I am new to the iText API, I wonder if anyone can guide me
-
How to change the icon of a push button field?
I am currently trying to fill out a predefined Form with itextsharp while adding an image. How can I do this? I'am currently trying to
-
How to underline a portion of text in a text field?
I have an application that uses iText to fill PDF form fields. One of these fields has some text with tags. I need the text enclosed in
-
How to distribute the radio buttons of a radio field across multiple PdfPCells?
I'd like to make a PdfPTable with multiple rows. In each row I'd like to have a Radio button in the first cell and descriptive text in
-
How do I add XMP metadata to each page of an existing PDF?
So far all the examples seem to involve adding metadata while creating a new Document. I want to take an existing PDF and add a GUID to
-
How to create a document with unequal page sizes?
I have the option to specify the page size, but I want different page sizes for different pages in my PDF. Is that possible? I want to
-
How to add a cover page to an existing PDF document?
I need to add an existing cover page (a single-page PDF) to another existing PDF document. How can this be done? Posted on StackOverflow
-
Does anyone have any idea how TabStop works?
I'm still trying to learn iText and have a few of the concepts down. However I can't figure out what TabStop is or how to use it. My
-
How to avoid an exception when importing a TIFF file?
When I try to convert a specific tiff file to PDF, the following exception occurs: java.lang.RuntimeException: Scanline must begin with
-
How to invoke a page break for nested tables?
I have one PdfPTable with one column. One page fits 50 rows. If I add some text data to table (for an example, 300 rows), the report
-
How to generate a report with dynamic header in PDF using iText 7?
I'm generating a PDF report with iTextSharp, the header of the report has the information of the customer. In the body of the report
-
Release pdfHTML 3.0.2
Release date: October 22, 2020 In this release, we extended the support of the CSS specification to add full support of the background
-
Blockchain for PDF Documents
You've paid a digital invoice of your supplier, and afterwards it seemed to be fake - you were a victim of invoicing fraud. These issues
-
How do I use pdfRender in a .NET environment?
Introduction While iText does not currently offer a native C# version of pdfRender
-
pdfOffice: enabled parallel conversion
What changed? Previously, it wasn't possible to use pdfOffice in parallel due to certain limitations in the library. Files were
-
Release pdfOffice 2.0.4
Release date: January 16, 2023 pdfOffice https://itextpdf.com/node/15181/ is an iText 7 add-on that enables high-quality native
-
Installing iText pdfOptimizer for .NET developers
How to install pdfOptimizer .NET version Thank you for your interest in our optimizer add-on - pdfOptimizer, we hope you will enjoy using
-
Installing iText pdfCalligraph for .NET developers
Thank you for your interest in our PDF tool for typography add-on - pdfCalligraph, we hope you will enjoy using our product and share
-
Installing iText pdfXFA for .NET developers
Thank you for your interest in our dynamic PDF add-on - pdfXFA , we hope you will enjoy using our product and share your experiences with
-
iText 7: Building Blocks
NOTE: We are continually updating our features- and have some new features that are not included in this eBook yet. You can find a full
-
How to open an MS Word attachment by clicking an image?
How can I make an image clickable so that an attached MS word document opens? I have some PDFs here where there are some images (an MS
-
How to create a list without indentation?
Is it possible to create numbered lists without any indentation? Something like: 1 A 1-1 A_A 2 B 2-1 B_B 2-1-1 B_B_B Posted on
-
How to move the content inside a rectangle inside an existing PDF?
My goal is to move text in a PDF around, which is within a certain rectangular area. All content matching the area in the original PDF
-
How to add an In Reply To annotation?
I am trying to add a sticky note reply to in pdf using iTextSharp. I am able to create a new annotation in the pdf. But I cannot link it
-
How to use a dotted line as a cell border?
I am trying to create a table with cells that have a dotted line for a border. How can I do this? Posted on StackOverflow on Nov 21, 2013
-
pdfHTML: Support for the CSS object-fit Property
The release of pdfHTML 3.0.2 includes a number of bug fixes as well as useful feature additions. Among those additional feature is
-
pdf2Data: Grouping of extracted values in XML
pdf2Data 2.1.9 introduces a new rule: groupByTb: dataField. This rule allows the grouping of extracted values in the output XML file,
-
pdfHTML: Custom ResourceRetriever
In release 7.1.13 of iText Core and 3.0.2 of pdfHTML we've implemented a new class called ResourceRetriever. This class allows you to
-
Release iText 7.1.8
iText 7.1.8 is the quarterly release for iText 7 Core/Community. This release includes support for XFDF, a much anticipated .NET
-
How to show an image at a text field position?
I have a PDF document which has AcroForm text fields. Now I want to insert a signature image in one of the those fields. I want to place
-
How to define the width of a cell?
I'm trying to change the width of a cell, but I don't succeed. Can someone explain how to define the width of a cell? Posted on
-
How to delete attachments in PDF using iText?
I want to write another program to delete the embedded files. How can I do this? Attachment shown in Adobe Acrobat public void
-
Support for Beveled, Underline and Inset form field border styles
In iText 7 Core 7.1.14 we've implemented some border styles for PDF form fields which we were previously missing. The styles in question
-
Forms in iText Core 8.0.0
Creating form fields using AcroForms is now much improved with iText Core 8.0.0. Rather than needing to specify the exact position of
-
How to merge forms from different files into one PDF?
Is there a way to merge both of my forms together without losing the interactive fields? I currently have a PdfReader and a PdfStamper
-
How to get specific types from AcroFields? Like PushButtonField, RadioCheckField, etc
https://itextpdf.com/sites/default/files/Dfhdk.png Form with radio buttons and check boxes When I call AcroFields.GetField(string name);
-
Removing Items from a PDF's Outline Tree
Introduction A PDF's document outline tree (otherwise known as its bookmarks) serves as an important source of shortcuts for users to
-
Volume Counter installation guide
Important! As of the release of iText 7.2 https://kb.itextpdf.com/home/it7kb/releases/release-itext-7-2-0, the old licensing system was