iText Knowledge Base
Search in spaces:
-
Chapter 2: Defining styles with CSS
to add a footer, and external CSS for fonts, colors, and so on. In the next chapter, we're going to use some more CSS, more
-
How to add blank pages while concatenating several PDFs using PdfSmartCopy
page for the "back" of the document, otherwise the following document is messed up. Is there any way to add blank pages while
-
How to add an In Reply To annotation?
array (the annotation with index 0), so this is how I'm going to add an "in reply to" annotation: public void manipulatePdf
-
How to create a link to launch an external program?
(); As you see, we’ve created a PdfFileSpec instance to add an external resource (any file/program you wish) and add it directly
-
How to generate and design PDFs with iText or iTextSharp?
this guarantee from other vendors. Click How to generate and design PDFs with iText or iTextSharp? if you want to see how to answer
-
How to rotate a page while creating a PDF document?
= new PdfNumber(90); PORTRAIT = new PdfNumber(0); SEASCAPE = new PdfNumber(270); Click How to rotate a page while creating a PDF
-
pdfHTML: Support for linearGradient in CSS and SVG
https://kb.itextpdf.com/home/it7kb/examples/support-for-lineargradient-color-scheme-in-layout-css-and-svg we demonstrated how to use this
-
Support for linearGradient Color Scheme in Layout, CSS and SVG
for linearGradient in both CSS and SVG within the iText 7 Core library and version 3.0.1 of the pdfHTML add-on. In the following code
-
How to generate 2D barcode as vector image?
difference with ordinary images, is that this image is a vector image. Click How to generate 2D barcode as vector image? if you
-
pdfHTML: Added full background support
In release version 3.0.3 of the pdfHTML add-on, we have added full support for the background property, this includes HTML
-
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
-
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
-
Chapter 5: Custom tag workers and CSS appliers
https://itextpdf.com/en/products/itext-7/pdfhtml add-on. We'll override the default functionality that matches HTML tags with iText objec
-
Release iText 7.1.3
. Added support for display:block of label HTML element. CSS: support for unicode-range property. Bug fixes, among which
-
Chapter 3: Generating PDF based on Media Queries
https://github.com/itext/i7js-examples/blob/develop/src/main/resources/htmlsamples/html/css/sxsw.css for the HTML and CSS code that was u
-
How to add an image and text to the same cell?
I am generating bar codes in a table. Now I want to insert the student code under the bar code label. How can I do this? My
-
Release iText 7.0.6
https://www.nuget.org/packages/itext7/7.0.6 Assorted fixes ported from 7.1.0 and 7.1.1. Support added for License Key Library 3.0.1. User
-
How to merge PDFs and add bookmarks?
. Click How to merge PDFs and add bookmarks? if you want to see how to answer this question in iText 5. bookmarks merge_documents
-
How can I generate a PDF/UA compatible PDF with iText?
. However, I have not been able to find a good example of how to generate a PDF/UA document. Can you provide an example? Posted
-
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
-
How to add text to an image?
(watermark, width / 2, height / 2, TextAlignment.CENTER, (float) Math.PI / 6); return new Image(template); } This is how we add
-
How to generate a report with dynamic header in PDF using iText 7?
of the report contains a list of customer transactions. My doubt is: How to generate a header dynamically for each client? I need
-
How to use a Digital Signing Service (DSS) such as GlobalSign, with iText 7
document’s hash and then add the digital signature to the PDF. How the signing process works The task of signing a PDF using a DSS
-
pdfHTML: Support for overflow-wrap, word-break CSS Properties
the addition of support for the overflow-wrap and word-break CSS properties. Both properties serve to determine whether and how
-
Chapter 2: Adding content to a Canvas or a Document
(" by ").add(author); 11. while (!renderer.isFull()) 12. canvas.add(p); 13. canvas.close(); The Rectangle we define in line 1 is larger
-
How to add two images in one cell?
the lazy "); p.add(img2); cell = new Cell(); cell.add(p); table.addCell(cell); Click How to add two images in one cell? if you
-
Chapter 4: Creating reports using pdfHTML
> tag. These rows will be populated with the movie data. We don't use any external CSS, but there is some internal CSS in which we
-
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
-
How can I convert a CSV file to a table with a repeating header row?
will be added: a header or the usual one addRowToTable(table, line, bold, true); while ((line = br.readLine()) != null) { addRowToTable
-
How to load a PDF from a stream and add a file attachment?
and add a file attachment? if you want to see how to answer this question in iText 5. file_attachment embedded_files pdfreader
-
pdfHTML: Support attr() function for content property
Background: Supporting the attr() CSS function for content property has been a long-requested feature for users of our popular
-
Chapter 5: Adding AbstractElement objects (part 2)
. In the next example, we'll add tables inside tables. Nesting tables Figure 5.17 shows three or six tables, depending on how you
-
Release pdfHTML 3.0.3
property in a text element are now supported by pdfHTML 3.0.3 too. While we're on the subject, we added the support of word-wrap
-
Release iText 7.0.4
and min-width css property [DEVSIX-1242 https://jira.itextsupport.com/browse/DEVSIX-1242] - Add bookmarks when adding a header
-
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
-
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
-
How can I serve a PDF to a browser without storing a file on the server side?
How can I serve the PDF file to the client without storing the file on the server side and allow the client side to directly
-
Release iText 7.1.1
- for .NET https://www.nuget.org/packages/itext7.pdfhtml/2.0.1 Improvements in CSS handling: @font-face, inherit. Borders: border
-
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
-
Page events
to rotate a page while creating a PDF document? How can I add an image to all pages of my PDF? How to add a rectangle to every
-
Chapter 7: Handling events; setting viewer preferences and printer properties
, but what if we want to add a watermark, background, header or footer to every page? How do we know when a new page is created? We'll
-
Release pdfHTML 3.0.4
added is the initial support of the CSS Flexible Layout Box module https://www.w3.org/TR/css-flexbox-1/. This module is currently
-
How to add a border to a paragraph?
I've created a Paragraph using iText. Now I have to add a border to this paragraph, not to the whole document. How do I do
-
How to get specific types from AcroFields? Like PushButtonField, RadioCheckField, etc
); This returned false every time. To better explain my scenario: I have an existing PDF (I am NOT generating this file
-
How to convert an A4 size PDF to a PDF booklet?
for other books were added so that the total number of pages would be a multiple of 16. This shows how pages are typically printed
-
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
-
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
-
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
-
How to add an image to an AcroForm field?
adding images. How is this done? Posted on StackOverflow on Apr 17, 2013
-
How to add a rectangle to every page of a document?
to get a rectangle on every single page of the document but I'm not sure how to do this. I tried adding this at the end of my code
-
Chapter 4: Adding AbstractElement objects (part 1)
border, left padding and bottom margin for that Div. Figure 4.1: Grouping elements in a Div The DivExample1 example shows how
-
How to add a watermark to a page with an opaque image?
that some crucial information will get lost by covering the existing content. In that case, take a look at how I add the text
-
How to extend the page size of a PDF to add a watermark?
can see, a half an inch margin was added to the left of each page. This is how it's done: PdfDocument pdfDoc = new PdfDocument(new
-
Why aren't images added sequentially?
Paragraph("Quick brown fox"); int i = 0; while (i Click Why aren't images added sequentially? if you want to see how to answer
-
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
-
How to add an image watermark to a PDF file?
is that you're adding the watermark outside the visible area of the page. See my answer to the question “How to position text
-
How to merge documents correctly?
); int n = pdfDoc.getNumberOfPages(); for (int i = 1; i Or you can add them while merging, as is done in the MergeWithToc
-
How to add a text to the left and to the right in a header?
How do I divide my header and footer into three sections? I need to add more than one header and footer to my document
-
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
-
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
-
How to add an image to an existing PDF using AffineTransform?
a scale transformation scaling the image to its width in X direction and to its height in Y direction. Click How to add an image
-
How to add a map with a pointer to a PDF?
that has been opened Many other options are possible, but once again: your question wasn't entirely clear. Click How to add a map
-
How to add a page number in the header of a PDF/A Level A file?
an exception telling me that the content I'm adding isn't tagged. How do I solve this problem? Posted on StackOverflow on Dec 16, 2014
-
How to tile a document and add margins to the tiles?
I am tiling a document as is done in the TilingHero example. That works well, but now I'd also like to add margins to each
-
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
-
How can I add titles of chapters in ColumnText?
)); } You now have a list of titles which you can click to jump to the corresponding table. Click How can I add titles of chapters
-
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
-
How to add a table in the top-right corner of the page?
= tableLayoutResult.getOccupiedArea().getBBox().getHeight(); Click How to add a table in the top-right corner of the page? if you want to
-
Generating and displaying bar codes
How to generate 2D barcode as vector image? barcodes <div data-pym-src='https://itext.jdoodle.com/embed/itext' data-java-url
-
How to add a background image to a cell?
, 0, 1, new Image(ImageDataFactory.create(IMG)), "Top left", TextAlignment.LEFT)); Click How to add a background image to a cell
-
Release iText 7.0.5
and pdfHTML, and there are some nice additions to pdfSweep. General The add-ons pdfSweep, pdfHTML, and pdfInvoice have been released
-
How to add text as a header or footer?
the text that was added as a header and a footer to each page. Click How to add text as a header or footer? if you want to see
-
How to split a row over multiple pages?
Can anybody suggest how I can split a row over multiple pages? I am using PdfPTable to create a table in PDF. I have a single
-
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
-
How to set a fixed background image for all my pages?
Click, I generate 4 pages on my PDF, I added this image to provide a background image: string imageFilePath = parent + "/Images
-
How to add an inner table surrounded by text?
Table and Cell classes in iText 7 instead of PdfPTable and PdfPCell. Click How to add an inner table surrounded by text? if you
-
How to send a file to the server through a PDF?
Is there a way to create some kind of Input File, File Chooser, etc, and attach it on the generated PDF file? And then send
-
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
-
Chapter 7: Creating PDF/UA and PDF/A documents
-c07e02_quickbrownfox_pdfa_1b example shows how we can create a "Quick brown fox" PDF that complies to PDF/A-1b. //Initialize PDFA documen
-
Chapter 7: Creating PDF/UA and PDF/A documents | .NET
https://itextpdf.com/content/itext-7-jump-start-tutorial/examples/chapter-7#c07e04_mergepdfadocuments.cs shows how it's done. //Initializ
-
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
-
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
-
Chapter 3: Using renderers and event handlers | .NET
or implicitly) and when we added basic building blocks such as Paragraph and List to that document object. iText made sure
-
How can I add an image to all pages of my PDF?
, you'll discover that it is very easy to port the Java to C#. Click How can I add an image to all pages of my PDF? if you want to see
-
Chapter 3: Using renderers and event handlers
; while (tokenizer.hasMoreTokens()) { if (isHeader) { Cell cell = new Cell().add(new Paragraph(tokenizer.nextToken
-
How to add a border to a PDF page?
); Why am I not able to add border to my PDF page even after enabling borders for all sides? I've set border and its color too
-
How to hyphenate text?
")); table.addCell(new Cell().add(paragraph)); Click How to hyphenate text? if you want to see how to answer this question in iText 5
-
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
-
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
-
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
-
How to add a full line break?
at the resulting pdf and you'll see that the line now runs through the margins. Click How to add a full line break? if you want to see ho
-
How to add an x-offset to a text pattern with every x-step?
the type of pattern you require. Click How to add an x-offset to a text pattern with every x-step? if you want to see how
-
How can I add a new AcroForm field to a PDF?
I have used iText to fill data into existing AcroForm fields in a PDF. I am now looking for a solution to add new AcroForm
-
How to define multiple actions for a PushbuttonField?
case with the upper while using methods. Click How to define multiple actions for a PushbuttonField? if you want to see how
-
.How to add a border to a PDF page? vLatest
); Why am I not able to add border to my PDF page even after enabling borders for all sides? I've set border and its color too
-
How to add a table to the bottom of the last page?
I have created table in a PDF document using iText. This works fine, but I don't want to add the table at the current pointer
-
How to add a hidden text field?
property. field.Visibility = PdfFormField.HIDDEN; Click How to add a hidden text field? if you want to see how to answer
-
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
-
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
-
How to convert an existing A4 PDF document to an A3 booklet?
can guide me how to do this. A sample would be appreciated. Note: the output PDF should be an A3 booklet format. Posted
-
How to add a printable or non-printable bitmap stamp to a PDF?
(); } Click How to add a printable or non-printable bitmap stamp to a PDF? if you want to see how to answer this question in iText 5
-
Chapter 6: Creating actions, destinations, and bookmarks
().setFontSize(14).add(record.get(2))) .add(new Paragraph(String.format( "Directed by %s (%s, %s)", record.get(3), record.get(4
-
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
-
Release iText 7.1.2
'running'. 8 bug fixes. Improvement by adding support for CSS root pseudoclass, empty pseudoclass. pdfSweep 2.0.1 for Java
-
How to add an onMouseOver javaScript action to a TextField?
How can I add javascripts to iTextsharp created textfields? To add an onMouseOver JavaScript action to a TextField, use
-
Release iText 7.1.7
handling multiple PdfDocument instances from a single PdfReader Better support for invalid xref tables pdfa Better validation
-
Chapter 3: Using ILeafElement implementations
4 and add the 5 tab stops to the TabStop list in line 5. While we are at it, we also draw lines that will show us the position
-
Release iText 7.1.5
https://itextpdf.com/en/products/itext-7/itext-7-core/Community https://itextpdf.com/en/products/itext-7/itext-7-community. We're also up
-
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
-
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
-
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
-
How to add a table on a form (and maybe insert a new page)?
by overriding the updateCurrentArea() method. This way the table is able to roll over the next page. Click How to add a table
-
Actions and annotations
How to add an In Reply To annotation? How to attach files to a PDF? How to rename named destinations in existing PDF files
-
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
-
How to nest tables without extending the inner table?
what happens when you add the table straight to another table. This is how it’s done in iText 7: Table innerTable1 = new Table(1
-
How to disable the save button and hide the menu bar in Adobe Reader?
while other options like "scroll", "find",... should be preserved. In add I am serving a PDF to a browser via a Servlet. I need
-
Part II - Proprietary APIs and Custom Providers
in external devices which are hardened against attempts to copy the private keys (e.g. smart cards or HSMs) or even in remote servers
-
.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
-
pdfHTML: Support for the CSS object-fit Property
feature is support for the CSS object-fit property in converted PDF's. The object-fit property allows for precise reformatting
-
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
-
How to add blank pages to an existing PDF in java?
above will add an extra blank 11th page, using the same page size as the first page. You can specify any index and ps values
-
How to give an image rounded corners?
into a PDF. Now I want to get the image width and height (while getting the image from disk) and make the edges of image curved
-
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
-
How to resize an Image to fit it into a PdfPCell?
].setAutoScale(true)); table.addCell(cell); By adding the boolean parameter true, you ask iText to scale the image. My code is written
-
iText 7: Converting HTML to PDF with pdfHTML
find a full list of features here https://itextpdf.com/features. Introduction In this tutorial, we'll learn how to convert HTML
-
Core SVG: Added support of font-relative units for the font-size property of a text element
="20" y="140" style="font-size:16px">css font-size 16</text> <text x="20" y="170" font-size="24">font-size 24</text> <text x="20
-
How to print mathematical characters like ?, ?, ?, ?, ? ?, ??
) and many others. How can I add them to a PDF? This is my code : Document document = new Document(PageSize.A4, 60, 60, 60, 60); try
-
How to format a field as a percentage?
IDE should show an error when typing this line. Even if I would add the missing comma between the second and third parameter
-
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
-
.How to add a shading pattern to a custom shape? vLatest
(convertToRadian(60))))); canvas.closePathStroke(); I wish to add a multi color gradient in this shape i.e. fill it with shading comprisin
-
How to add a shading pattern to a custom shape?
(convertToRadian(60))))); canvas.closePathStroke(); I wish to add a multi color gradient in this shape i.e. fill it with shading comprisin
-
Manipulating existing PDFs
the content inside a rectangle inside an existing PDF? How to reorder pages in an existing PDF file? How to add blank pages while
-
How to create unique images with Image.getInstance()?
How can I guarantee a new bitmap every time? I need to use the GetInstance() variant that accepts raw bitmap data
-
How to create a TOC when merging documents?
; IteratorPdfReader> readerIterator = readers.iterator(); PdfImportedPage page; int count = 1; while (readerIterator.hasNext
-
How to create a complex PDF document?
is "a pain" (because XML isn't well-suited for defining a layout), creating a certificate from (HTML + CSS) is possible with iText's
-
How to reduce redundant code when adding content at absolute positions?
figure out how to create a separate function to which I can simply pass some parameters, such as string, x_Cord, y_Cord, tilt
-
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
-
pdfHTML: Responsive Design
This is an example of how pdfHTML is able to reflow the contents of generated PDF documents using responsive design. The code
-
Image examples
cell? How to add a map with a pointer to a PDF? How to generate 2D barcode as vector image? How to create unique images
-
How to add a new form from an existing PDF template?
then create the extra fields you need (text fields, button fields,...) and add them to the form. If this doesn't answer your question
-
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
-
Getting started
How to generate and design PDFs with iText or iTextSharp? How to underline text with a dotted line? How to add a full line
-
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
-
How to create a PDF with font information and embed the actual font while merging the files into a single PDF?
this link if you want to see how to answer this question in iText 5. fonts concatenate font_subset merge_documents itext_7
-
How do setMinimumSize() and setFixedSize() interact?
text in cells set to a fixed height clip. Is that what iText does? If not, how do I achieve this? While we're at it, am I
-
Part I - Overview and Simple Cases
with how iText builds a CMS signature container for your simple signature values and you want to do that yourself. In later
-
Release iText 7.1.9
CSS Investigate the causes of different outputs in java and .NET tests Add Comment to PdfRichMediaAnnotation Add tests to cover
-
How to merge forms from different files into one PDF?
and a PdfStamper that I am using to fill out a form. I now have to add another PDF to the end of the form I have been filling out
-
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
-
Chapter 1: Hello HTML to PDF
and CSS, and a SRC constant with the path to that source HTML file. For instance: public static String BASEURI = "src/main
-
pdfHTML: Bézier Curve Improvements
Background: With the 7.1.16 release of iText Core and 3.0.5 of pdfHTML have come some improvements to how Bézier curves
-
How to resize a PdfPTable to fit the page?
I am generating a document that contains a table. I need to make sure that this table never exceeds one page in size
-
Installing iText 7 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
-
How do the measurement systems in HTML relate to the measurement system in PDF?
CSS files found in the wild, you will notice that many sizes are expressed in pixels. For instance: <img src="logo.img" style
-
How to get the rendered dimensions of text?
(), but I'm looking for more detailed information like: How many lines would a string need if rendered in a cell of a given width (say
-
Installing iText 7 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
-
How to rename named destinations in existing PDF files?
to open the PDF file at a specific location in the file. The team responsible for generating the PDF document uses a tool
-
pdfHTML: Using emojis in iText
to add these emojis to our document, even though we cannot add the emojis directly. The only consideration we have to keep
-
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
-
Page events for headers and footers
Some examples for questions such as: Click How to add text as a header or footer? Click How to add a table as a header? Click
-
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
-
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
-
Can I change the page count by changing internal metadata?
structure of PDF document. While searching the internet, I've found some nice tools to edit the metadata, so far I haven't found how
-
How to draw lines on an image?
add text in the example written in answer to "How to add text to an image
-
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
-
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
-
How to draw a rectangle around multiline text?
How do I draw a rectangle outlining my text? I am trying to draw a rectangle around multi-line text in iText. I use this code
-
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
-
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
-
How to read PDFs created with an unknown random owner password?
How do I bypass the owner password? Requirement is to process a batch of PDFs one at a time and on success encrypt each
-
Creating and adding annotations
These examples were written in the context of questions such as: Click How to add a printable or non-printable bitmap stamp
-
Adding watermarks to images
These examples were written in answer to the following questions: Click How to add text to an image? Click How to draw lines
-
Why is my content overlapping with my footer?
to learn how to add events in iText 7. You should override the handleEvent() method in IEventHandler interface and assign
-
How to create radio buttons inside a table?
How do I use iText 7 to create a table with a radio button inside? I know how to create a table and I know how to add a radio
-
pdfOptimizer: Support added for Font, Image, Color Space optimization
scheme from RGB to CMYK, or vice versa. As our development team continues to add more functionality to this stable release
-
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
-
How to create a clickable polygon or path?
QuadPoints ;-) Allow me to explain how QuadPoints are used by showing you the AddPolygonLink
-
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
-
Adding fields to an existing form
Example to answer Click How can I add a new AcroForm field to a PDF? addfield <div data-pym-src
-
Widow and Orphan content support added
Support for controlling widow and orphan content was added in iText 7.1.11 so that content looks precise on the document page
-
How to create a table with complex borders?
this: Can anyone explain how I would start creating such a table? Posted on StackOverflow on Jul 9, 2015
-
How to precisely position an image on top of a Table?
, and 4pt below and 6pt to the right of the top-left of C5. How do I do this? I thought I'll add the text to the table, add
-
Adding metadata
These examples were written in answer to questions such as: Click How do I add XMP metadata to each page of an existing PDF
-
How to create a list without indentation?
will show, how we can receive the list with indentation. That's a matter of adding a single line to your code: List list2 = new
-
Adding a cover page to an existing PDF
These examples were written in answer to the question Click How to add a cover page to an existing PDF document? addcover1
-
How do I insert a hyperlink to another page in an existing PDF?
You are already adding the Rectangle, now you need to add the annotation. This is how it looks in Java: PdfAnnotation
-
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
-
Digital Signatures Hub
shows developers how to use iText 7 and the AWS KMS APIs to generate a digital signature and add it to a PDF document. Related
-
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
-
How to rotate a paragraph?
. Also, they can add text at absolute positions, rotations, and alignments. The text can have new lines. I've been using the iText
-
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
-
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
-
How to watermark PDFs using text or images?
. This may not be what you want: maybe you want the watermark to be added differently. Look how the loop changes
-
Release iText 7.0.3
identical resources) and copying pages with form fields. Added ECDSA algorithm OIDs. Table layout improvements. Fixed XXE
-
How to parse multiple HTML files into one PDF?
https://itextpdf.com/content/itext-7-converting-html-pdf-pdfhtml/chapter-1-hello-html-pdf, but instead of adding the elements generated f
-
How to set background image in PdfPCell in iText?
I am currently using iText to generate PDF reports. I want to set a medium size image as a background in PdfPCell instead
-
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
-
Release iText 7.1.11
calendar) [PDFCALLIGRAPH] New glyphs which have been added while applying positioning features do not affect the start/end
-
Font examples
a PDF document? How to create a PDF with font information and embed the actual font while merging the files into a single PDF? How
-
How can I find the maximum character limit for a text field?
how many characters fit in case the form tells you that the content is added using a monospace font. Click this link if you
-
Advantages of using Blockchain for Signing PDF documents
,...). In the context of blockchain, the keypair is usually generated in a Web of Trust (WoT), but that's not a must. In some use cases (e
-
How to stamp image on existing PDF and create an anchor?
https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/annotations/AddImageLink.java example to f
-
Chapter 5: Manipulating an existing PDF document
http://kb.itextpdf.com/content/itext-7-jump-start-tutorial/examples/chapter-5#c05e03_addcontent.java example shows how we can add content
-
Chapter 5: Manipulating an existing PDF document | .NET
https://itextpdf.com/content/itext-7-jump-start-tutorial/examples/chapter-5#c05e03_addcontent.cs example shows how we can add content to
-
Chapter 2: Adding low-level content | .NET
of the code: how do we add the text? //Get the length of the longest string var maxStringWidth = text.Max(s => s.Length
-
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
-
How to position text relative to page?
crop = reader.getCropBox(1); // add overlay text Phrase phrase = new Phrase("Overlay Text"); ColumnText.showTextAligned
-
How to get text and image in the same cell?
= Element.ALIGN_MIDDLE; table5.AddCell(cell); } How could I insert the number of the image at the left corner of cell? Posted
-
How to create a document with unequal page sizes?
https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/objects/UnequalPages.java example for you
-
How to calculate/set font line distance?
() - 20, 0); I need to add 3 lines, but I don't find how to calculate the distance between the lines. Each line has different
-
Chapter 1: Introducing basic building blocks
, ";"); while (tokenizer.hasMoreTokens()) { if (isHeader) { table.addHeaderCell( new Cell().add( new Paragraph(tokenizer.nextToken
-
Chapter 1: Introducing basic building blocks | .NET
, ";"); while (tokenizer.HasMoreTokens()) { if (isHeader) { table.AddHeaderCell( new Cell().Add( new Paragraph(tokenizer.NextToken
-
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
-
How to display barcodes in a matrix-like structure?
How can I display different bar codes in multiple columns in a PDF page using iText? I have to display 12 bar codes
-
Release pdfHTML 3.0.5
of pdfHTML is the support of the attr() CSS function. This is used to retrieve the value of an attribute of the selected element
-
Why iText and Blockchain?
-based workflows with a workflow involving digital documents. We wanted to accomplish this by emphasizing the added value of digital
-
Adding images to a table
? https://kb.itextpdf.com/home/it5kb/faq/how-to-precisely-position-an-image-on-top-of-a-pdfptable Click How to add two images in one cell
-
How to extract text and anchor information from a PDF?
be: "You can visit our website, XYZ (www.google.com http://www.google.com) and do something". Basically I am trying to generate
-
Chapter 6: Reusing existing PDF documents | .NET
https://itextpdf.com/content/itext-7-jump-start-tutorial/examples/chapter-6#c06e01_thegoldengatebridge_scale_shrink.cs example shows how
-
How to show an image at a text field position?
= position.position; } This is how I try to set the image on that position: Image image = Image.getInstance("ImageFileName"); Float dimen
-
How to superimpose pages from existing documents into another document?
I need to add existing pages from different PDFs under an existing page in another PDF. This is the code I have so far
-
How to insert a "linked rectangle" with iText?
of PdfAnnotation, you can add it to a specific page using the addAnnotation() method. Click this link if you want to see how to answer
-
How to change the color of a circle annotation?
I am adding a SquareCircle annotation to an already existing PDF using iTextSharp in C#. Now I want to change the Fill Color
-
.Chapter 2: Adding low-level content | .NET vLatest
of the code: how do we add the text? //Get the length of the longest string var maxStringWidth = text.Max(s => s.Length
-
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
-
Chapter 6: Reusing existing PDF documents
example shows how it's done. PdfDocument pdf = new PdfDocument(new PdfWriter(dest)); PdfDocument origPdf = new PdfDocument(new
-
Chapter 2: Adding low-level content
that path of the rectangle using the fill color as paint. Now comes the less trivial part of the code: how do we add the text
-
How to introduce rounded cells with a background color?
I have seen how to create cells with rounded borders, but is it possible to make a cell that will have no borders, but colored
-
How to create a pop-up window to display images and text?
I want to add and pop-up window in a C# project to display an image and text by clicking on an annotation
-
How to distribute the radio buttons of a radio field across multiple PdfPCells?
to figure out how to do it with radio buttons / radio groups. Is this possible with iText? Does anyone have an example? Posted
-
How to format a String resulting in a two-column display?
: I suppose the spaces in every string name, surname and school are the problem. How can I deal with this? EXPECTED OUTPUT: Name
-
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
-
How to maintain a paragraph's indentation inside a table cell?
there is only one possible way to add a paragraph into the cell. Table table = new Table(1); Paragraph right = new Paragraph
-
How to adapt the position of the first line in ColumnText?
I'm dealing with a situation where I have a Phrase added to a ColumnText object
-
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
-
How do I change the border color of a PdfPCell?
of code that shows how to create a cell with different borders in iText 7: PdfDocument pdfDoc = new PdfDocument(new PdfWriter
-
Merging documents with bookmarks
This example was originally written in answer to the question Click How to merge PDFs and add bookmarks? for iText5. The code
-
.Merging documents with bookmarks vLatest
This example was originally written in answer to the question Click How to merge PDFs and add bookmarks? for iText5. The code
-
How to rotate a page 90 degrees?
I am trying to use a PDF for stamping and need to rotate it 90 degrees to lay it on correctly? Anyone know how to do
-
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
-
How to write a table header if part of a table is forwarded to the next page?
. I am using PdfWriter to create a PDF document. I am adding a PdfPTable to the PDF document. This table has header row
-
How to align two paragraphs to the left and right on the same line?
should be like Name:ABC date:2015-03-02 How can I do this? Posted on StackOverflow on Apr 11, 2015
-
Chapter 1: Introducing fonts
cases can get quite complex, whereas a tutorial needs to explain different concepts as simple as possible. While I was looking
-
How to get the number of characters in a field?
with a value but then I need to know how many digits are expected for the date of birth. I figured that if I could get
-
How to set up a table display?
; } Using this method will make your code easier to read and maintain. This is how we create the document and add the table: public
-
.How do I set parameters back to the default value? vLatest
(PdfContentByte.TEXT_RENDER_MODE_FILL_STROKE); That works, but creates another problem. I don't know how to set these parameters back
-
How do I set parameters back to the default value?
(PdfContentByte.TEXT_RENDER_MODE_FILL_STROKE); That works, but creates another problem. I don't know how to set these parameters back
-
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
-
Installing the iText license key and license key library for Java and .NET
https://repo.itextsupport.com/simple/releases/com/itextpdf/licensing/licensing-base/. You can also use Maven to resolve this dependency.
-
How to create a table with only vertical borders?
() method: Cell cell = new Cell().add("SL.NO") .setBorder(Border.NO_BORDER) .setBorderLeft(new SolidBorder(1)); table.addCell
-
How to change a background Image into a watermark by altering the opacity?
https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/images/BackgroundImage.java example. In yo
-
How to continue an ordered list on a second page?
consists of variable data (text/barcodes/images) that is added to existing PDF documents/templates (think boiler plate). Most
-
How to open an MS Word attachment by clicking an image?
on the images. I wonder how can I do this with the iText library. I can add the images and attach the MS word documents but I haven't
-
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
-
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
-
Release iText Core 7.1.12
initial support for <linearGradient> in SVG and linear-gradient() in CSS, which is something that both Core, and pdfHTML 3.0.1
-
How to prevent the resizing of pages in PDF?
. https://stackoverflow.com/users/2064134/cristi-b Please add the following line to your code. This line will make sure that the page
-
How to change the properties of an annotation?
I am adding Caret annotation in already existing PDF using iTextSharp in C#. Now I want to made some changes in the Annotation
-
How to create and apply redactions?
( rect.getRight() + 10, rect.getBottom(), rect.getWidth() + 20, rect.getHeight())); You can use the put() method to add all the other
-
How to decrypt a PDF document with the owner password?
https://raw.githubusercontent.com/itext/i5js-sandbox/master/resources/pdfs/hello_encrypted.pdf that I will use in the first example demon
-
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
-
Release pdfOffice 1.0.0
free tools and from within web browsers. PDF also has the added benefit that files are guaranteed to appear the same, regardless
-
How can I crop the pages of an existing PDF document?
I have an existing document of which the pages are too big. How can I crop the pages? Posted on StackOverflow on Apr 12, 2014
-
How to get the UserUnit from a PDF file?
the default value of the user unit, and I add an example on how to create a document with pages that have a different user unit. Now
-
How to underline text with a dotted line?
https://raw.githubusercontent.com/itext/i5js-sandbox/master/cmpfiles/objects/cmp_underline_dotted.pdf for the result), I add the line und
-
How to get rid of the top padding in a PdfPCell?
setVerticalAlignment(Element.ALIGN_TOP) which doesn't result in positioning the text near the top border of my cell, even with padding 0.
-
How to define spacing and leading in PdfPCell objects?
Is it possible to add space between the elements of a cell (rows) in C#? I'm creating a PDF in visual studio 2012 and wanted
-
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
-
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
-
How to modify the size of annotations and make them read-only?
people to add annotations. Once the PDF is encrypted, you'll notice that the entries in the drop-down list are limited. (See How
-
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
-
How to set the export value of a check box?
I need to add a check box to an existing PDF. I also need set the export value of this check box. I saw that I can get
-
How does a PdfPCell's height relate to the font size?
on the elements which you add into the cell. But still you can set the padding: padding is the extra space inside the borders
-
How to write a Zapfdingbats character at a specific location on a page?
how to draw a Zapfdingbats character: PdfFont zapfdingbats = PdfFontFactory.createFont(FontConstants.ZAPFDINGBATS); Once you
-
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
-
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
-
How to draw a line every 25 words?
be a way of adding these lines during the creation process without really having to find the text position, right? Posted
-
How to remove text from a PDF?
(); pdfDoc.close(); } As you see, we define a list of PdfCleanUpLocation objects. To this list, we add a PdfCleanUpLocation passing
-
How to use the full size of a page?
you 13 by 128 user units to add content. This is somewhat consistent with what you experience. Click How to use the full size
-
Volume Counter FAQs
the instructions marked iText 7.1.x in this FAQ. However, if you have a JSON license key file, see the instructions for iText 7.2.x. How
-
Part III - PKCS#11
functionality and the same key material. In this part we focus on signing via PKCS#11; first we illuminate how to access PKCS#11
-
How to keep specific words together on one line?
don't want any newline to occur within the phone number. I have a sample paragraph and I am adding chunk values to it like
-
How to strike through text using iText?
(StandardFonts.HELVETICA)); table.addCell(new Cell().add(new Paragraph("0123456789").setFont(font).setLineThrough())); In this case
-
How to move the content inside a rectangle inside an existing PDF?
in the original PDF should be shifted somewhat in the x and y direction. I have no influence on how the PDFs are created and I can accept
-
Release iText Core 7.1.15
version was updated to 1.68. In addition this release brings many important changes to iText 7. While many of these changes relate
-
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
-
Release iText 7.0.8
https://www.nuget.org/packages/itext7.pdfhtml/1.0.5 1 backported fix for @Page rules in CSS License Key Library 3.0.3 for Java
-
How to change the text color of an AcroForm field?
field without changing the text color in the XFA field (which is really hard to achieve). Please try adding this line in iText 7
-
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
-
When Contracts aren't Smart Contracts
in the blockchain, smart contracts can be used to determine whether and how a document can be registered in the blockchain
-
Tables
How do I change the border color of a PdfPCell? How to add an image and text to the same cell? How to create a table
-
How to make a single letter bold within a word?
(this), do I really have to create three chunks for one word and than add all the chunks together? Or is there another approach
-
How to allow page extraction when setting password security?
: ALLOW_MODIFY_CONTENTS bit 5: Extract text / graphics: ALLOW_COPY bit 6: Add / Modify text annotations: ALLOW_MODIFY_ANNOTATIONS bit 7
-
pdfHTML: more accurate rendering of checkboxes
and lower, checkboxes with {{width: 100%}} and {{display: block}} CSS properties could be rendered incorrectly. This was due
-
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
-
Adding backgrounds using page events
Examples written in answer to questions such as: Click How to change the color of pages? How to draw a border for PDF pages
-
Chapter 6: Using fonts in pdfHTML
that are supported by default if you don't change the font provider. That's pretty limited, so let's find out how we can add support
-
Release licensekey 3.1.4
-volume) which add support for our brand new iText product - pdfOptimizer
-
Interactive forms
technology? How to underline a portion of text in a text field? How to add a hidden text field? How to add a table on a form
-
How to shrink pages in an existing PDF?
for adding header and footer means by scaling(shrink) page as shown in this screenshot: I have made a second example, named
-
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
-
How to get the author of a "free text" annotation?
-up window when open and active. This entry shall identify the user who added the annotation. The value you seek is not available
-
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
-
Before we start: installing iText 7
the jars from the Central Maven Repository. We have made some simple videos explaining how to do this using different IDEs: How
-
Core SVG: Support <pattern> element
With iText 7.1.14 and pdfHTML 3.0.3, we are pleased to announce that we have added full support for SVG’s <pattern> element
-
Why is my font not applied when I create a PDF document?
of font. How can I fix it? I am generating PDF documents with iText. When I try to include the "Agenda Tabular Light" font, iText
-
Scaling large HTML content to render onto smaller PDF page sizes
. This will cause the generated PDF file to have content that overlaps, or with content rendering off the page. The simplest solution
-
Fail-safe processing of Outlines without Parent link
-level item is the outline dictionary itself. PDFs generated using iText conform exactly to the above requirement. iText's logic also
-
How to define the data encoding when submitting a PDF form using AcroForm technology?
), and I submit the data to a server, how can I specify/retrieve the encoding that will be used? For instance. When I submit
-
Absolute positioning of text
of text? How to draw a rectangle around multiline text? How to continue an ordered list on a second page? How to add an x-offset
-
Absolute positioning of lines and shapes
How to draw vertical gradient in iTextSharp? How to add an image to an existing PDF using AffineTransform? How to fill
-
Improving SVG to PDF conversion
situations. Below is an example of one of the invalid streams we found while investigating this bug: Capture.PNG To resolve this bug
-
Adding page numbers to an existing PDF
In this example, we use ColumnText to add page numbers to an existing PDF document. stamppagexofy <div data-pym-src
-
How to create a table based on a two-dimensional array?
<String> record : dataset) { for (String field : record) { table.addCell(new Cell().add(new Paragraph(field))); } } doc.add(table
-
How can I log the number of documents / bytes I've processed?
"How can I count the number of PDF reads and writes in iText 7?" in the Volume Counter FAQs. Please take a look
-
pdfCalligraph: Support wrapping at word boundaries for languages which don't use spaces for word separation
of the pdfCalligraph add-on. Code example Here is an example demonstrating this new word wrapping behavior: <div data-pym-src
-
PNG Image Handling
iText Core 7.1.11 introduced more robust PNG image handling to address an issue which could occur when adding certain PNG
-
Adding a background to a table
Examples written in answer to questions such as: Click How to set background image in PdfPCell in iText? coloredbackground
-
Part IV - Appearances
of a few default appearances or generating the appearance completely yourself. If you create a signature in an already existing
-
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
-
How do I use pdfRender in a .NET environment?
Introduction While iText does not currently offer a native C# version of pdfRender
-
.How to create a table based on a two-dimensional array? vLatest
<String> record : dataset) { for (String field : record) { table.addCell(new Cell().add(new Paragraph(field))); } } doc.add(table
-
General questions about iText
and getPageLabelFormats? How to add text at an absolute position on the top of the first page? How can I log the number of documents
-
Release pdfRender 1.0.0
We are proud to announce the first release of pdfRender, a new add-on for iText 7 Core which enables you to render PDFs
-
Release pdfRender 1.0.5
while using the volume license library. In addtion, pdfRender also benefits from some stability improvements in iText Core
-
Installing iText 7 Community for Java developers
How to install iText 7 Community Java version Thank you for your interest in our open-source PDF library, we hope you
-
Release pdfXFA 2.0.10
Release date: April 14, 2021 In this release, we have fixed a JS-related bug that, while it might be considered minor, often
-
pdfOffice: improved conversion of docx files containing embedded videos
containing embedded videos. While previous releases would convert such files without errors, the resulting document would only contain
-
Release iText 7.1.8
https://itextpdf.com/en/products/itext-7/pdf2data add-ons. We’re pleased to announce iText 7.1.8, our latest quarterly release. Despite t
-
Installing iText 7 for Java
How to install iText 7 Java version Thank you for your interest in our open-source PDF library, we hope you will enjoy using
-
Why do I get an "InvalidPdfException: PDF header signature not found"?
zero length due to some problem while creating the InputStream. Another context in which I've seen this happen, is a PDF loaded
-
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
-
Creating a simple PDF/UA document
This example was written in answer to the question How can I generate a PDF/UA compatible PDF with iText
-
pdfCalligraph: Support for Myanmar script
showing how to achieve this. The following variables represents file paths as strings to their designated file: licensePath - String
-
How to draw a borderless rounded rectangle?
for a rectangle with a border of 0f. Here is the code I'm using: magazine = new Document(PageSize.LETTER,0,0,0,0); pdfw
-
Can pdfHTML render Base64 images to PDF?
Yes, iText supports external images as shown in different examples in the previous chapters, but it also supports inline
-
How to get the image DPI in PDF?
How can I read the width/height/scale of an image and be confident about the result? I'm trying to get information about
-
Is it possible to set a different alignment for text on the same line in the same cell?
In one cell and on the same line, I must add two text (name and date). The first snippet of text must be on the left page side
-
How to move an AcroForm field?
How can I change the position of an Acrofield? I have a process that inserts a table of content into an existing Acroform
-
Release pdfOffice 2.0.2
Release date: April 11, 2022 pdfOffice is an iText 7 add-on which enables high-quality native conversion of Microsoft Office
-
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
-
Installing iText free trial for Java and .NET developers
" above: 2. Download iText 7 and your desired add-ons: For Java, you can find the latest instructions on where and how to download
-
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
-
Page orientation and rotation
Examples written in answer to questions such as: Click How to rotate a page while creating a PDF document? pageorientations
-
iText 7: Jump-Start Tutorial for .NET
in Bangalore on April 26, 2016. We released the first version of iText 7 in May. This tutorial is the first manual on how to use iText
-
iText 7: Jump-Start Tutorial for Java
in Bangalore on April 26, 2016. We released the first version of iText 7 in May. This tutorial is the first manual on how to use iText
-
How to extract embedded streams?
to extract that same array. How can I do this? Posted on StackOverflow on May 17, 2015
-
Release iText 7.1.0
https://itextpdf.com/en/resources/installation-guides/itext-71-migration-guide-net. Support was added for PDF 2.0 improvements and featur
-
How to create a link to a specific page number?
My question is how to target a page based on its number. For example if targeted page number is 6, clicking on the Anchor text
-
How to change the order of Optional Content Groups?
I have a PDF file with a hierarchy of layers. How do I modify this data in order to copy it into new file? I have a PDF file
-
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
-
Table events
How to define different border types for a single cell? How to add a table in the top-right corner of the page? How to get
-
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
-
How to make a field not required?
at the “How to find out which fields are required?” question. Is solves the same problem. Based on your question, I assume that you have
-
How to use an image as list symbol?
/icon somehow? If so, how? Posted on StackOverflow on Aug 20, 2015 https://stackoverflow.com/questions/32128348 by lucas.mdo
-
How to increase the accuracy of measurements in iTextSharp?
I want to resize a pdf to a specific size, but when I use scaling it loses accuracy because a float rounds the value. How can
-
How to create a table with rounded corners?
How do I do this? I have to create a table having rounded corners, something like it: Posted on StackOverflow on May 14, 2014
-
Release iText Core 7.2.1
and demonstrate use cases. As always, we try to synchronize the release with those of our iText 7 add-ons. So, besides Core, be sure
-
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
-
Content parsing, extraction and redaction of text
What are the extra characters in the font name of my PDF? How to get the co-ordinates of an image? How to create and apply
-
How to fill a rectangle with color?
How do I ensure that I can choose the fill color? I have the following code : PdfContentByte canvas = writer.getDirectContent
-
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
-
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
-
pdfOffice - Example
pdfOffice is an iText 7 add-on that allows generating a PDF document from either a Word, PowerPoint, or Excel file. Currently
-
How to protect an already existing PDF with a password?
How do I set a password for an existing PDF? Posted on StackOverflow on Dec 2, 2014
-
How to change the color of pages?
the color of 3rd page. I want to change the color of 3rd page onward to white. How can I do this using iText? Posted on StackOverflow
-
Which PDF filters are used to encode data?
. Currently I am working with the iTextSharp library to generate PDF files. These files will be processed by some file processor
-
Using iText 7 and AWS KMS to digitally sign a PDF document: Part 1
https://itextpdf.com/en/blog/technical-notes/using-itext-7-and-aws-kms-digitally-sign-pdf-document" and shows how to generate a self-sign
-
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
-
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
-
How to display indian rupee symbol?
like this: ?). Note that it's very important to check if the font you're using knows how to draw the symbol. If it doesn't
-
How to encrypt PDF using a certificate?
need to post another question: how to get a public certificate from a smart card. Once you have this certificate, you can encrypt
-
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
-
Installing iText 7 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
-
Installing iText 7 pdfOptimizer for Java developers
How to install pdfOptimizer Java version Thank you for your interest in our optimizer add-on pdfOptimizer, we hope you
-
How to update a PDF without creating a new PDF?
https://stackoverflow.com/questions/16081831/using-itextsharp-stamper-required-to-update-in-the-same-pdf by tk2013 https://stackoverflow.
-
How to change width of single column of table?
of the first column, but I don't know how to do that. Posted on StackOverflow on Jun 10, 2014
-
How to set the OCG state of an existing PDF?
value to "on". How can I change this to "off"? Posted on StackOverflow on May 1, 2014
-
Which languages are supported in pdfHTML?
with a combination of Chinese and English text, you will only see the English text, unless you provide a font that knows how
-
Why is my cell event not triggered?
cell. The difference appears to be that the cell event of the first cell is added to the cell before adding the cell
-
How to set initial view properties?
this [ {Catalog} > /PUT pdfmark. How is it done in PDF? Posted on StackOverflow on Jun 23, 2014
-
How to get the co-ordinates of an image?
How do I know whether the extracted image is the same as an image present in database, and the co-ordinates of the image
-
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
-
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
-
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
-
How to rotate and scale pages in an existing PDF?
basically no idea how to properly scale the source page when it needs to be resized. To this end I'm using the PdfWriter class
-
How to check a check box?
: Check box appearance states Click How to check a check box? if you want to see how to answer this question in iText 5. forms
-
How to align AcroFields?
https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/acroforms/AlignField.java for the full exa
-
How to prevent images from resizing in a table cell?
ahead of time how many dots I have, but if they overflow the cell, I want them to wrap, just like text would. My code is something
-
How to create a pushbuttonfield with double byte character text?
1 font Helvetica. This font doesn't know how to write Japanese. I used the font freesans.ttf. If you don't have that font, you
-
Installing iText 7 pdfOptimizer for .NET developers
How to install pdfOptimizer .NET version Thank you for your interest in our optimizer add-on - pdfOptimizer, we hope you
-
Where is the origin (x,y) of a PDF page?
angle. You can also scale an axis to get a different aspect ratio. While it's certainly fun to do this, it requires quite some Math
-
Chapter 4: Making a PDF interactive
In the previous chapters, we've created PDF documents by adding content to a page. It didn't matter if we were adding high
-
How to get the current page count?
: pdfDoc.getNumberOfPages(); Click How to get the current page count? if you want to see how to answer this question in iText 5. page_numb
-
How to close a PDF file to recreate it? (File in use problem)
If I don't close the file I get an error. How can I fixed this problem? I have the Java application that can create a PDF file
-
Chapter 4: Making a PDF interactive | .NET
In the previous chapters, we’ve created PDF documents by adding content to a page. It didn’t matter if we were adding high
-
Installing iText 7 Community for .NET developers
How to install iText 7 Community .NET version Thank you for your interest in our open-source PDF library, we hope you
-
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
-
Why does using ColumnText result in "The document has no pages" exception?
: java.io.IOException: The document has no pages. Do you have any suggestions how to fix this problem? Posted on StackOverflow on Sep 23,
-
Installing iText 7 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
-
Installing iText 7 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
-
Installing iText 7 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
-
How to make an image a qualified mask candidate in itext?
cannot be an image mask Is there any other way to mask an image using another image in iText? I know how to clip an image
-
How to draw a borderless table in iTextSharp?
use either cell events or table events, or a combination of both. Click How to draw a borderless table in iTextSharp? if you want
-
How to merge PDFs from ByteArrayOutputStreams?
understand how to do this because it seems that I need an InputStream (and I only have ByteArrayOutputStreams). Posted
-
How to get a font from an array?
of two files: a metrics file (AFM or PFM) and a font binary (PFB). In the code above afm and pfb are byte arrays. Click How
-
How to change the author name for comments?
")); } } pdfDoc.close(); } Click How to change the author name for comments? if you want to see how to answer this question in iText 5. an
-
Installing iText 7 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
-
Installing iText 7 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
-
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
-
How do I load a license key?
The license key library is a jar or dll that you add to your project. This library is used to load and validate your license
-
How to get the page number of an arbitrary PDF object?
the object containing the open action. How do I get the page number of that object? PdfReader soPdfItext = null; try
-
How to change the line spacing of text?
, it will be 20, and so on. You cannot combine fixed and multiplied leading. You can use only one of them. Click How to change the line
-
Why can't I set the font of a Phrase?
formules" was added to the Phrase. As you didn't add anything else to titreFormules, the font "Comic" is never used. When you
-
How to create a JavaScript action to open the attachments panel?
= Adobe Reader) and it won't work if people disable Javascript. Click How to create a JavaScript action to open the attachments
-
How to find out which fields are required?
(" -> required"); out.write('\n'); } out.flush(); out.close(); pdfDoc.close(); } Click How to find out which fields are required? if you
-
How can I read Roman page numbers?
Movies-5 Movies-6 Movies-7 Movies-8 Click How can I read Roman page numbers? if you want to see how to answer this question in iText
-
How to set the zoom level of a PDF using iTextSharp?
example. This is how it’s done in iText 7: PdfDocument pdfDoc = new PdfDocument(new PdfReader(SRC), new PdfWriter(DEST
-
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
-
Installing iText 7 for .NET
How to install iText 7 .NET version Thank you for your interest in our open-source PDF library, iText 7, we hope you
-
How can I create a Reader enabled PDF with a signature field that can be signed in Adobe Reader
I've read that I need to Reader enable my document, but I can't find how to do this using iText. Using iText, I've
-
Why are PDF files different even if the content is the same?
documents that are generated sequentially may result in different tags for the same font subset. Another reason why two seemingly
-
How to find the absolute position and dimension of a field?
that corresponds with the annotation. That's more work than can be provided in a code sample on this site. Click How to find
-
How to underline a portion of text in a text field?
enclosed in -tag to be underlined. How could I do that? For example: U>This text/U> should be underlined. I need the text enclosed
-
How to make sure a check box is printed?
with this problem in iText 7. Click How to make sure a check box is printed? if you want to see how to answer this question
-
How to extract a page number from a PDF file?
, not only with iText, Tika, PdfBox, or any other tool you might try). Click How to extract a page number from a PDF file
-
How to use multiple fonts in a single cell?
is identical. Click How to use multiple fonts in a single cell? if you want to see how to answer this question in iText 5. fonts
-
How should I interpret the coordinates of a rectangle in PDF?
right Y Every time, I get confused about how to make dimensions based on these coordinates to draw rectangle. If possible, can I
-
Release pdfXFA 3.0.1
Release date: April 11 2022 pdfXFA is an iText 7 add-on for Java and C# (.NET) that allows you to flatten dynamic XFA forms
-
How can I set the zoom level of a PDF using iText 7?
A simple iText 7 example showing how to set a specific magnification level for a PDF. You can use setOpenAction to open
-
How do I rotate a PDF page to an arbitrary angle?
on the page instead of rotating the page. Click How do I rotate a PDF page to an arbitrary angle? if you want to see how
-
Volume Counter installation guide
released a volume based counting mechanism based on an event system. iText and its add-ons will send events through this event system
-
How to create a custom dashed line separator?
the DottedLine, e.g. as a Text in a Cell (equivalents for Chunks and PdfPCells in iText 5). Click How to create a custom dashed line
-
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
-
pdfRender: BufferedImage as output format
) { // Here is where you provide logic on how to process the BufferedImage object // In this case we simply add it to an ArrayList
-
Why do I have to pay for pdfhtml during my upgrade, when I already have XML Worker in iText?
is a complete rewrite that supports over a hundred more HTML tags and CSS properties, but also ties directly into core allowing
-
How to convert HTML containing Arabic/Hebrew characters to PDF?
forgotten to add the pdfCalligraph add-on https://itextpdf.com/itext7/pdfcalligraph to your CLASSPATH. faq pdfhtml pdfcalligraph
-
PDF and Digital Signatures
, non-repudiation, and the time of signing can still be validated on the long term. Let's find out how this works, step by step
-
How to set the page size to Envelope size with Landscape orientation?
, 0f); I googled but I couldn't find the Envelope size. How do I set the page size as Envelope with Landscape orientation? Posted
-
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
-
Why doesn't getDefaultCell().setBorder(PdfPCell.NO_BORDER) have any effect?
different concepts. Concept 1: you define every Cell (no PdfPCell in iText 7) manually, for instance: Cell cell = new Cell() .add(new
-
Why does ColumnText ignore the horizontal alignment?
Rectangle(310, 722, 200, 100)); } return currentArea; } } If you wish to draw a border for the columns, add these lines
-
.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
-
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
-
How to read text from a specific position?
))); text.Append(currentText); } pdfReader.Close(); } return text.ToString(); But how can I only restrict it to a specific location? Poste
-
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
-
How do I install iText 7 Core?
Installing iText 7 Core is as simple as downloading the binaries https://developers.itextpdf.com/downloads and adding them
-
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
-
How to create a PDF with a Cartesian grid?
want to see how to answer this question in iText 5. faq Published by Scroll Versions from this space and version Latest
-
How to fill XFA form using iText without breaking usage rights?
in the PdfDocument constructor. Click How to fill XFA form using iText without breaking usage rights? if you want to see how to answer
-
Argument not specified in iTextSharp
methods such as add() and addCell() into Add() and AddCell(). Member-variables in Java are changed and consulted using getters
-
How to create an uncompressed PDF file?
be compressed. Click this link if you want to see how to answer this question in iText 5. faq Published by Scroll Versions from this spac
-
How to read bookmark titles?
of the outline tree. Click this link if you want to see how to answer this question in iText 5. faq Published by Scroll Versions
-
How to check if a font is bold?
want to see how to answer this question in iText 5. faq Published by Scroll Versions from this space and version Latest
-
Do I need a license for Windows fonts when using iText?
? I understand that iText does not come with any font programs and that you need to provide a font file. The PDFs I generate
-
How to get the color properties of an AcroForm field?
for the actual color value. Click How to get the color properties of an AcroForm field? if you want to see how to answer this question
-
How to convert colored images to black and white?
()); pdfDoc.close(); Click How to convert colored images to black and white? if you want to see how to answer this question
-
How to crop out a part of PDF file?
save and restore the graphics state stack, but that's rather obvious. Click How to crop out a part of PDF file? if you want
-
Installing iText 7 pdf2Data for Java
Thank you for your interest in our data extraction add-on — pdf2Data, we hope you will enjoy using our product and share your
-
Installing iText 7 pdf2Data for .NET
Thank you for your interest in our data extraction add-on—pdf2Data, we hope you will enjoy using our product and share your
-
How to use a text extraction strategy after applying a location extraction strategy?
> This will filter only the text where the PostScript font name ends with Bold or Oblique. This is how you use this filter: <div data
-
When is the content flushed to a PDF File by iTextSharp?
in a PDF. It's just a sequence of lines, shapes and glyphs drawn on a page. When you add content to a document using the Add
-
Repeating parts of a form
These examples were written in answer to questions such as: Click How to continue field output on a second page? Click How
-
.Repeating parts of a form vLatest
These examples were written in answer to questions such as: Click How to continue field output on a second page? Click How
-
.How to create a PDF with a Cartesian grid? vLatest
want to see how to answer this question in iText 5. faq
-
What's an easy to print "first right, then down"?
that fit on one page, add rows one by one to a PdfPTable as long as they fit. When they don't, that's where we need to split
-
How to render certain HTML entities (such as arrows) to PDF?
>" + "</body></html>"; The pdfHTML add-on is perfectly capable of parsing such entities. No special settings are needed
-
Why do PDFs change when processing them?
use case using hashes goes against the PDF standard (see also the previous question). How to solve this problem? You can add
-
Pattern colors
These examples were written in the context of questions such as: Click How to add a shading pattern to a custom shape? Click
-
.Pattern colors vLatest
These examples were written in the context of questions such as: Click How to add a shading pattern to a custom shape? Click
-
How to get the page width and height of a PDF document?
of your page. Variable page is the integer number of page you are interested in. Click this link if you want to see how to answer
-
How to solve an UnsupportedCharsetException when using itext-asian.jar
). Just use the font file with an encoding that is supported by that font program. Click this link if you want to see how
-
How to solve an UnsupportedCharsetException when using itext-asian.jar?
and require a font pack in Adobe Reader), you should use KozMinPro-Regular (without the otf). Click this link if you want to see how
-
How to use System Font in iTextSharp with VB.net?
= new Document(pdfDoc).add(p); doc.close(); This is almost a literal translation of the Java and C# examples that can be found
-
What does "Not LTV-enabled" mean?
it as LTV-enabled by simply adding the immediate signer certificates to the trusted certificates for the signature type at hands
-
How to flatten a XFA PDF Form using pdfXFA
https://stackoverflow.com/users/2413934/chuck You didn't insert a code sample to show how you are currently flattening the XFA form. I
-
How to introduce a custom font weight in iText 7?
this to get a different boldness). Click this link if you want to see how to answer this question in iText 5. italic mimic_bold
-
How to avoid an exception when importing a TIFF file?
to see how to answer this question in iText 5. faq Published by Scroll Versions from this space and version Latest
-
How can I find the border color of a field?
. Click this link if you want to see how to answer this question in iText 5. faq
-
How to flatten a XFA PDF Form using iTextSharp?
https://stackoverflow.com/users/2413934/chuck You didn't insert a code sample to show how you are currently flattening the XFA form. I
-
How much does it cost to upgrade iText 5 to iText 7?
the new add-ons for iText 7 (e.g. pdfHTML https://itextpdf.com/en/products/itext-7/pdfhtml, pdfSweep
-
Watermark examples
These examples were written in response to questions such as: How to add a watermark to a page with an opaque image? How
-
How to make a particular sub-string Bold when converting HTML to PDF?
a suitable method for this. How should I do this? Posted on StackOverflow on Jun 4, 2014
-
How to change the zoom factor in link annotations?
this link if you want to see how to answer this question in iText 5. faq Published by Scroll Versions from this space and version
-
Nested tables
How to invoke a page break for nested tables? Click How to add an inner table surrounded by text? nestedtableproblem <div data
-
Using iText 7 and AWS KMS to digitally sign a PDF document: Part 5
of IExternalSignatureContainer instead of IExternalSignature for signing While IExternalSignature is the easiest way, there are some draw
-
How to allow a Unicode subscript symbol in a PDF without using setTextRise()?
if you want to see how to answer this question in iText 5. fonts superscript itext_7 itext_7_community itext_7_core
-
How to fill out a PDF file programmatically? (Dynamic XFA)
() method, the data is sufficient. Click this link if you want to see how to answer this question in iText 5. faq pdfxfa
-
I upgraded to iText 7, how do I use my license?
How to install your new iText license. If you're using iText 7.2 and later, you should have a license key in JSON format
-
Large tables
Example that shows how you can add a table little by little in order to keep the memory footprint low. incompletetable <div
-
Page numbers and PDF/A
This example was written in answer to the question Click How to add a page number in the header of a PDF/A Level A file
-
.Write on previous page vLatest
This example in answer to the question Click How to add text at an absolute position on the top of the first page
-
.Creating Table of Contents using events vLatest
Example written in answer to the question Click How can I add titles of chapters in ColumnText? createtocincolumn <div data
-
.Custom Metadata entry vLatest
Example written in answer to Click How to add / delete / retrieve information from a PDF using a custom property
-
Cell and table widths
Examples that explain how to define the dimensions of a table, its columns and its cells. Click How to add a table in the top
-
An IExternalSignature implementation for signing via PKCS#11 with the Entrust Signing Automation Service
This example was written to show how to use iText and the Entrust Signing Automation Service for PKCS#11 signing of PDF
-
What is the PdfPTable.DefaultCell property used for?
() method to add any type of content you want (String, Image, BlockElement or Cell itself) and set different properties directly
-
Write on previous page
This example in answer to the question Click How to add text at an absolute position on the top of the first page
-
Drawing extra content on an image
This example was written in answer to the question Click How to add a map with a pointer to a PDF? addpointer <div data-pym
-
Changing page sizes of existing PDFs
This example was written in answer to the question Click How to extend the page size of a PDF to add a watermark