iText Knowledge Base
Search in spaces:
-
How to create a TOC when merging documents?
https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/merge/MergeWithToc2.java example. Click Ho
-
Merging documents and create a Table of Contents
These examples were written in answer to questions such as: Click How to create a TOC when merging documents? Click How
-
.Merging documents and create a Table of Contents vLatest
These examples were written in answer to questions such as: Click How to create a TOC when merging documents? Click How
-
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
-
How to merge documents correctly?
the following problem when printing the PDF file after merge, the PDF documents get cut off. Sometimes this happens because the documents
-
How to merge forms from different files into one PDF?
https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/acroforms/reporting/FillFlattenMerge2.java
-
Chapter 6: Creating actions, destinations, and bookmarks
about this example when compared to the previous one. Line 6: we create an ArrayList named toc that will contain a series
-
Manipulating existing PDFs
a TOC when merging documents? How to change the order of Optional Content Groups? How to crop out a part of PDF file? How
-
Chapter 6: Reusing existing PDF documents
with PdfMerger Figure 6.7 shows a PDF that was created by merging the first 32-page document with the second 15-page document
-
Chapter 6: Reusing existing PDF documents | .NET
of the merging of specific pages based on a Table of Contents (TOC) that we'll create on the fly. This TOC contains link annotations
-
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
-
pdfHTML: Creation and/or merging of outlines for documents
had one prefix, and this created problems when merging two documents created by pdfHTML, because destination names in different
-
How to merge PDFs from ByteArrayOutputStreams?
I have two PDF files, each one in a ByteArrayOutputStream. I want to merge the two PDFs, and I want to use iText, but I don't
-
How to merge PDFs from ByteArayOutputStreams?
I have two PDF files, each one in a ByteArrayOutputStream. I want to merge the two PDFs, and I want to use iText, but I don't
-
Chapter 7: Creating PDF/UA and PDF/A documents
the resulting PDF to be a PDF/A level A document. Figure 7.6 shows how we merged the two PDF/A level A documents we created
-
Why is my font not applied when I create a PDF document?
= PdfFontFactory.createRegisteredFont("garamond bold"); Click Why is my font not applied when I create a PDF document? if you want to see
-
Chapter 7: Creating PDF/UA and PDF/A documents | .NET
the two PDF/A level A documents we created in the previous sections. Figure 7.6: merging 2 PDF/A level A documents When we look
-
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
-
Chapter 7: Handling events; setting viewer preferences and printer properties
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 need
-
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 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 create a document with unequal page sizes?
= PdfWriter.getInstance( document, new FileOutputStream(("MYpdf.pdf"))); when I create the document, I have the option to specify
-
How to stamp image on existing PDF and create an anchor?
works when creating documents from scratch. Please take a look at the AddImageLink
-
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
-
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
-
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
-
Why do I get a font embedding error when creating PDFA/1a?
, TTC files, or a combination of AFM and PFB files. Click Why do I get a font embedding error when creating PDFA/1a? if you want
-
How to create a complex PDF document?
this technology. Click How to create a complex PDF document? if you want to see how to answer this question in iText 5. forms
-
How to create a clickable polygon or path?
shape that we'll make clickable. You already know how to create a clickable link with a rectangular shape: Rectangle linkLocation
-
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 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 allow page extraction when setting password security?
XI Pro. Click How to allow page extraction when setting password security? if you want to see how to answer this question
-
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
-
Why do PDFs change when processing them?
it was originally created and shall not change when the file is incrementally updated. The second byte string shall be a changing identif
-
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
-
How to create a pop-up window to display images and text?
the content. Click How to create a pop-up window to display images and text? if you want to see how to answer this question in iText 5
-
Why does the function to concatenate / merge PDFs cause issues in some cases?
? I'm using the following code to merge PDFs together using iText: public static void concatenatePdfs(ListFile> listOfPdfFiles
-
How to underline text with a dotted line?
I need to merge 2 paragraphs, the first is a sequence of dots, and the second is the text that I want write on dots: Paragraph
-
Font examples
embedding error when creating PDFA/1a? Can I embed a font only partially? Why is my font not applied when I create a PDF document? How
-
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
-
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
-
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 get the color properties of an AcroForm field?
need the annotation dictionary. You also know that the field dictionary and the widget dictionary are often merged when one
-
How to create a list without indentation?
will then automatically tag that content as a list (e.g. in the context of accessibility). Click How to create a list without
-
How not to merge documents
This is an example that is used by many people, but it is completely wrong: you should not use PdfWriter to merge documents
-
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
-
Why is iText embedding a font even when I specify not to embed?
= FontFactory.getFont("my_nato_font", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); When I create the pdf and do a CTRL + D, I can
-
How to update a PDF without creating a new PDF?
creating a new PDF? if you want to see how to answer this question in iText 5. itext_7 the_best_questions_on_stack_overflow
-
Interactive forms
enter a cross symbol when CheckType style is check mark? How to create radio buttons inside a table? How to show an image
-
How to create and apply redactions?
. If you try to select the original text, you'll notice that is is no longer present. Click How to create and apply redactions
-
How to create a table based on a two-dimensional array?
. I need to place it in the table created. would like to have 2 Rows with 8 columns: String[] tableTitleList = {" Title", " (Re
-
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
-
How to create a link to launch an external program?
to the PdfAction. Click How to create a link to launch an external program? if you want to see how to answer this question in iText 5
-
Chapter 4: Creating reports using pdfHTML
discusses this third approach, which is ideal when you have to create documents of a certain type, for instance catalogues, invoices
-
.How to create a table based on a two-dimensional array? vLatest
. I need to place it in the table created. would like to have 2 Rows with 8 columns: String[] tableTitleList = {" Title", " (Re
-
How to solve an UnsupportedCharsetException when using itext-asian.jar
create fonts like this: PdfFont font = PdfFontFactory.createFont("KozMinPro-Regular", "UniJIS-UCS2-H", false); If you want to use
-
When Contracts aren't Smart Contracts
" is also used in the context of DLT, more specifically when we talk about "smart contracts." We need to make sure that we don't
-
How to create Persian content in PDF?
https://github.com/itext/i7js-book/blob/develop/src/main/java/com/itextpdf/samples/book/part3/chapter11/Listing_11_18_Ligatures2.java. Cl
-
How to create unique images with Image.getInstance()?
. Mea culpa and thanks. Click How to create unique images with Image.getInstance()? if you want to see how to answer
-
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 create a pushbuttonfield with double byte character text?
can try arialuni.ttf or any other font that supports Japanese. Click How to create a pushbuttonfield with double byte character
-
How to create a table with only vertical borders?
border: cell.setBorderRight(new SolidBorder(1)); Click How to create a table with only vertical borders? if you want to see how
-
PdfSigner now correctly detects and creates PDF/A documents
that does not conform to the PDF/A standard present on the document before the signing process started. How it works When signing
-
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
-
How to create a link to a specific page number?
("Link", PdfAction.createGoTo("dest2"))); Click How to create a link to a specific page number? 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
-
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 Cyrillic characters in a PDF?
with what you see on the inside (when looking at the second screen shot), but that's how it works. CONCLUSION: Many people think
-
How to create a PDF with a Cartesian grid?
Could anyone please provide me a sample program that can dynamically create a grid or even dots starting at (0,0) at bottom
-
How to read PDFs created with an unknown random owner password?
password. It will only throw an exception if a user password is in place. Use this at your own risk. Click How to read PDFs created
-
How to add a page number in the header of a PDF/A Level A file?
to receive Tagged PDF using pdfDoc.setTagged(), iText will make sure that the appropriate tags are created when adding Element
-
How to create an uncompressed PDF file?
During development testing, I'd prefer to create uncompressed, non-binary PDF files with iTextSharp so that I can check
-
How to change the color of pages?
I want to create the first two pages with a blue background color and the remaining pages in white, but when I try this every
-
How to convert an A4 size PDF to a PDF booklet?
How to convert A3 PDFs into a booklet that will fold when printed. I need a variation on the example given in answer
-
.How to create a PDF with a Cartesian grid? vLatest
Could anyone please provide me a sample program that can dynamically create a grid or even dots starting at (0,0) at bottom
-
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 add a table on a form (and maybe insert a new page)?
to the next page). I am able to do these things separately (populate the PDF and create a table). But I cannot effectively merge them
-
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
-
Do I need a license for Windows fonts when using iText?
for Windows fonts when using iText? if you want to see how to answer this question in iText 5. font_license fonts itext_7 license
-
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
-
How to add a table as a header?
width of 100% of my page I have some problem. I have create a class named PdfHeaderFooter that extends the iTextSharp
-
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
-
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 using iTextSharp library, firstly I'm creating
-
How to send a file to the server through a PDF?
prepared an example that explains how to create such a field when creating a document from scratch: FileSelectionExample
-
How to prevent the resizing of pages in PDF?
I create a PDF where I define absolute measurements. However, when I print this PDF, the measurements aren't correct. I want
-
Create fields in a table
multiple PdfPCells? Click How to create radio buttons inside a table? Click Why does iText enter a cross symbol when CheckType
-
How to load a PDF from a stream and add a file attachment?
to create in memory and never will be in file system. How can I do this with iText? I'm using a MS SQL Report Server web service
-
When is the content flushed to a PDF File by iTextSharp?
it is necessary. Click When is the content flushed to a PDF File by iTextSharp? if you want to see how to answer this question
-
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 fill a rectangle with color?
border, because the path created using the rectangle() method has been dealt with when you filled it. No new path has been
-
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?
https://stackoverflow.com/questions/32582927 by Amit Ware https://stackoverflow.com/users/4684743/amit-ware This is how you create
-
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
-
How to add a printable or non-printable bitmap stamp to a PDF?
Dialog box, it would not be printed, but when "Document and stamps" is selected, then the bitmap would print Right now I can create
-
How to create a table with 2 rows that can be used as a footer?
copyright notices. I tried to create this table using ColumnText, but I am not able to set the background color for the row (only
-
How to generate and design PDFs with iText or iTextSharp?
to create the PDF design when I could just do it right within the PDF without having to rely on on various files that serves
-
How to add multiple images into a single PDF?
you need set the page size to the size of the first image when you create the Document instance. Click How to add multiple images
-
How to introduce multiple PdfPageEventHelper instances?
when necessary to compose the documents but PageEvent is not really an event but an instance of only one IPdfEvent, what
-
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
-
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 set a fixed background image for all my pages?
should not do that manually because you don't know when a new page will be created by iText. Instead you should use an event handler
-
How to draw a borderless rounded rectangle?
, 210, 100, 100) .stroke(); pdfDoc.close(); } This piece of code shows 4 different ways of creating rectangles. Click How
-
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
-
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
-
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
-
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
-
How to watermark PDFs using text or images?
on each odd page and a transparent image on each even page of an existing PDF document. This is how it's done: protected void
-
Fix for when a link occupies more than two areas, a NullPointerException is thrown
of LINK_ANNOTATION property on each split (important for links which occupy more than two areas.) This is because when we update
-
How to continue an ordered list on a second page?
commonly, I have to place various sections of text in specific places. I know how to create an ordered list, but I have come across
-
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 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
-
Release iText 7.1.11
, check above for how to revert the behavior); Improve creation and/or merging of outlines; Support for widows and orphans properties
-
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
-
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
-
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 can I serve a PDF to a browser without storing a file on the server side?
by Mishal Harish https://stackoverflow.com/users/4315788/mishal-harish You can use any OutputStream when creating a PDF file
-
How to distribute the radio buttons of a radio field across multiple PdfPCells?
= PdfAcroForm.getAcroForm(pdfDoc, true); form.addField(group); When we create the cells for the radio buttons, we add an event
-
How to fix the orientation of a PDF page in order to scale it?
); scaleDown(page, pageDict, PdfName.CropBox, scale); } } When you create the event, you pass a value scale that will define
-
How to parse multiple HTML files into one PDF?
to create a temporary PdfDocument. We merge this temporary PdfDocument into the PdfMerger instance. Once we have created and merged
-
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
-
How to tell iText which fields to flatten first?
of the other. When I fill the fields via iText and flatten the form, the form field that I had created on top of the other form
-
How can I generate a PDF/UA compatible PDF with iText?
are using, you are responsible for creating the tag structure at the lowest PDF level when you use the setTagged() method. In more
-
How to change the spacing between words and characters?
https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/objects/SpaceCharRatioExample.java to find
-
How to display indian rupee symbol?
as encoding. When creating a Font object, you pass the rupee symbol as encoding. The correct way to achieve what you want in iText 7
-
How to change the color of a circle annotation?
annotation property, but I don't know how. When opening the PDF in Acrobat, the fill color property is in the appearance tab
-
How to hide the Adobe floating toolbar when showing a PDF in browser?
" (HUD). Since version X of Adobe Reader, there is a new mode called "Read Mode", which is the default viewing mode when you open
-
Release iText Core 7.2.4
explicit destinations into a single PDF object PdfDocument.copyPagesTo was creating corrupt PDFs when there was a button widget
-
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
-
How to set up a table display?
https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/tables/SimpleTable11.java example and the
-
How to show an image with large dimensions across multiple pages?
this pageSize when creating the PdfDocument instance and I add the same image 4 times using different coordinates: PdfDocument
-
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 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
-
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 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 generate 2D barcode as vector image?
that is supposed to create a vector image. I tried using it like this: Rectangle pageSize = new Rectangle(w * 72, h * 72); Document doc =
-
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 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
-
Does anyone have any idea how TabStop works?
) of 56 user units and now, when we create Tabs inside or before text, they will make the “offset” equals to 56 user units. You can
-
How to use the font Verdana in PdfStamper?
file with iText PDF. The original file uses Verdana, which isn't an option in the class Basefont. Here is the function to create
-
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
-
pdfHTML: Support for generating cross references for TOC creation with target-counter, target-counters CSS properties
-before: always"> <p id="id3">Page number. This is on page: <a class="chapterone"></a></p> </body> </html> This HTML, when used
-
How can I find the border color of a field?
, and the value for Blue is 0. This is consistent with us setting the color to Color.RED when we created the file. You say that you have
-
How to make a single letter bold within a word?
Font RED_NORMAL = new Font(BaseColor.RED); In iText 7 you could create a Text instance and set only color value. When you add
-
How to add a map with a pointer to a PDF?
I am using java and iText to create a pdf. Is it possible to add a map with a pointer on it so the user will know where
-
How to add inline spacing in a PdfPCell?
the content of the first cell to the left (by default) and the content of the second cell to the right. This creates space between
-
How to add JPEG images that are multi-stage filtered (DCTDecode and FlateDecode)?
, and only stretch it up when the PDF is displayed, cutting up the image content into smaller patches of images,... So far, I have
-
Release iText 7.0.3
triggers a PdfException DEVSIX-1103 https://jira.itextsupport.com/browse/DEVSIX-1103: Merging a document with outlines created
-
How to add a table in the top-right corner of the page?
I'm creating a table in PDF using iText. I want to place it in top right corner. Here is my code snippet: PdfPTable table
-
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
-
How to format a String resulting in a two-column display?
(value2); return p; } In this example, we create a paragraph for which we define tabs of 200 user units. Now when we add a new Tab
-
Creating and editing PDF 2.0 Documents
PDF 2.0 support to iText! This page details how to create a PDF 2.0 document using iText, and how to take advantage of the new
-
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
-
How to add alternative text for an image in Tagged PDF?
Code can't recognize a fox or a dog, so we create a new document with Alt attributes saying "Figure without an Alt description
-
How to format a field as a percentage?
to the assumption that your form contains JavaScript that formats fields when a human user enters a value. When you fill out a form using
-
Creating form fields
These examples were written in answer to questions such as: Click How to send a file to the server through a PDF? Click How
-
.Creating form fields vLatest
These examples were written in answer to questions such as: Click How to send a file to the server through a PDF? Click How
-
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 allow a Unicode subscript symbol in a PDF without using setTextRise()?
trying to create PDF files using iText. I have found that Superscript (0,4,5,6,7,8,9) and Subscript (0,1,2,3,4,5,6,7,8,9
-
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
-
iText 7: Converting HTML to PDF with pdfHTML
was spent on the new Renderer framework. When a document is created with iText 7, a tree of renderers and their child-renderers
-
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
-
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
-
Chapter 4: Making a PDF interactive | .NET
they are represented by a widget annotation. This widget annotation is created implicitly when we create a field
-
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 File("C
-
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 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
-
General questions about iText
? How to create an uncompressed PDF file? How to create a list without indentation? Which PDF filters are used to encode data
-
Chapter 4: Making a PDF interactive
because they are represented by a widget annotation. This widget annotation is created implicitly when we create a field
-
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
-
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
-
How to extract embedded streams?
to extract that same array. How can I do this? Posted on StackOverflow on May 17, 2015
-
Why are PDF files different even if the content is the same?
to create PDF documents that look like identical twins when opened in a PDF viewer. And even if you create two identical PDF documents
-
Chapter 3: Generating PDF based on Media Queries
are expensive. What if there was a way to save on colored ink when printing our documents? Creating a PDF file for Print There's
-
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
-
Release iText 7.0.5
created when using pdfHTML is confusing [DEVSIX-1555 https://jira.itextsupport.com/browse/DEVSIX-1555] - Process MAX_WIDTH
-
How to set the OCG state of an existing PDF?
I need to turn off a specific layer (OCG object) in an exisiting PDF that was created in Autocad and that sets the default
-
.How to merge PDFs from ByteArayOutputStreams? vLatest
-
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
-
Release iText 7.1.4
: StyledXMLParserException for svg without width or height . [DEVSIX-1821] : /Parent reference missing when iText creates /Pages
-
TOC as first page
tableofcontents <div data-pym-src='https://itext.jdoodle.com/embed/itext'
-
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
-
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
-
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
-
Release iText 7.1.7
of SmartMode copying (performance boost in merge) Avoid resources depletion due to decompression bombs Improve the performance when
-
Release iText Core 7.2.5
. In previous versions, layers with identical names would be discarded when merging with useSmartMode() (Java
-
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 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 fill out a PDF file programmatically? (Dynamic XFA)
posted the question: I found the issue. The replacement DomDocument needs to be the entire merged XML of the new document, not just
-
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
-
Image examples
a map with a pointer to a PDF? How to generate 2D barcode as vector image? How to create unique images with Image.getInstance
-
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
-
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
-
pdfHTML: Using emojis in iText
. How it works When converting HTML files to PDF documents the process to include emojis is simple and straightforward; we need
-
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
-
How to resize an Image to fit it into a PdfPCell?
? If it's possible, where do have I to do this? Right after I load the image or when I put the image into my PDF table cell? When
-
What is the size limit of pdf file?
. If size of the contents of such a folder goes beyond 1GB then the browser gets closed automatically when receiving the PDF file
-
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 do I rotate a PDF page to an arbitrary angle?
clockwise when displayed or printed. The value shall be a multiple of 90. Default value: 0. Whenever an ISO standard uses the word
-
Absolute positioning of text
syntax errors in a page created with iText? How to fit a String inside a rectangle? Why does ColumnText ignore the horizontal
-
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
-
Chapter 5: Adding AbstractElement objects (part 2)
example to see how this PDF was created. Table table = new Table
-
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
-
How to extract a page number from a PDF file?
a minute!" you say, "When I open a PDF in Adobe Reader, I can clearly see a page number in the document!" Yes, you can see that page
-
How to decrypt a PDF document with the owner password?
. We'll create such a file using the EncryptPdf
-
How do I get an object if I have its indirect reference?
" for the radio button. Each item in that array is a PdfIndirectReference. How do I get the actual object when all I have
-
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 hidden text field?
I'd like to create a text field with iTextSharp that is not visible. Here's code I'm using to create a text field: TextField
-
How to resize a PdfPTable to fit the page?
by Jannis Alexakis https://stackoverflow.com/users/637791/jannis-alexakis If you want a table to fit a page, you should create
-
How to draw a borderless table in iTextSharp?
the border of each cell. For instance: if you create Cell objects, you use: cell.setBorder(Border.NO_BORDER); In case the cells
-
How to change the author name for comments?
with annotations created by "iText" and turn it into a PDF with annotations created by "Bruno Lowagie". The code is really simple: we loo
-
How to convert PdfStamper to a byte array?
examples on how to do that on the iText web site. Note that there is no PdfStamper in iText 7, we simply use PdfDocument instance
-
How to get text and image in the same cell?
I have create a table which has 48 images. I put the images to the right side in the cell. Now I would like to put the number
-
Using forms for reporting
How to merge forms from different files into one PDF? Click How to merge documents correctly? mergeforms <div data-pym-src
-
.Using forms for reporting vLatest
How to merge forms from different files into one PDF? Click How to merge documents correctly? mergeforms <div data-pym-src
-
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 add an image to an AcroForm field?
adding images. How is this done? Posted on StackOverflow on Apr 17, 2013
-
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
-
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
-
How to set the export value of a check box?
the possible values of an existing check box by looking at the appearance dictionary (/AP), but I don't know how to set the export
-
How to extract text and anchor information from a PDF?
can visit our website, XYZ, and do something" where XYZ is a clickable link. The output when extracting this content should
-
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
-
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
-
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 use the full size of a page?
I managed to set the size of the PDF document I'm creating to the size I need (~3cm x ~7cm), but the content inside the page
-
How to use a text extraction strategy after applying a location extraction strategy?
the bold text present in that location. Would creating a new method or class called FontBasedTextExtractionStrategy instead of a simple
-
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
-
How to check if a font is bold?
TT116t00 looks like when you look at the internals of the PDF file you have shared
-
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 set initial view properties?
this [ {Catalog} > /PUT pdfmark. How is it done in PDF? Posted on StackOverflow on Jun 23, 2014
-
.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
-
Chapter 1: Introducing fonts
turning a plain text file into a PDF eBook and I liked the result. When I discovered how many movies, cartoons and series were made
-
Chapter 3: Using renderers and event handlers
created a Document with a certain page size and certain margins (defined explicitly or implicitly) and when we added basic
-
Chapter 3: Using renderers and event handlers | .NET
created a Document with a certain page size and certain margins (defined explicitly or implicitly) and when we added basic
-
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
-
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
-
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 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
-
How to define the page size based on the content?
it to the document, so I can calculate the total size before creating the document, but some content types (tables for example) don't hav
-
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 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
-
.How to add a shading pattern to a custom shape? vLatest
https://stackoverflow.com/users/2847083/raghaveshukla I've created an example called ShadedFill
-
How to add a shading pattern to a custom shape?
https://stackoverflow.com/users/2847083/raghaveshukla I've created an example called ShadedFill
-
Chapter 5: Manipulating an existing PDF document
on. When creating a document from scratch, it's possible to create a placeholder for the total number of pages. Once all
-
Chapter 5: Manipulating an existing PDF document | .NET
the current page number. Now that we have an existing document, we can add "1 of 4", "2 of 4", and so on. When creating
-
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 add a watermark to a page with an opaque image?
this, you need to introduce transparency. I have written a simple example that shows how this is done. It is called TransparentWatermark
-
How to make an image a qualified mask candidate in itext?
should be masked with image B.jpg. But when I tried to make the image B a mask, I got the following DocumentException: This image
-
Option to disable AGPL-usage warning messages
When using iText 7 Core in AGPL mode (without loading an iText license) a message will occasionally be printed to the standard
-
How to remove text from a PDF?
the cleanUp() method and when we close the PdfDocument instance, we get the following result: Text in gray area has been completely
-
How to add a full line break?
how to do this. The document always has a margin to the left and the right. Chunk linebreak = new Chunk(new DottedLineSeparator
-
How to align AcroFields?
I'm using iText to populate the data to PDF templates, which are created in OpenOffice. The form is populating fine; I'm
-
PDF and Digital Signatures
. Creating a digital signature for PDF In figure 1, we can see how the bytes are organized in a PDF file. Figure 1: Digital Signature
-
Chapter 2: Adding content to a Canvas or a Document
class with two subclasses: Document and Canvas: Document is the default root element when creating a self-sufficient PDF
-
Release iText 7.0.4
to a PdfFont [DEVSIX-1392 https://jira.itextsupport.com/browse/DEVSIX-1392] - pdfXFA: Nullpointer when processing input [DEVSIX-1394
-
How to add "continue on next page" / "continued from next page" to a table?
corresponds with a row in a PdfPTable and finally I add this PdfPTable to the Document. When the table is split, I need to add
-
Clearer exception messages when Outline Dictionaries break PDF specification rules
In the past iText threw generic exceptions when a PDF's Outline Dictionary violated the PDF specification
-
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
-
How to introduce a custom font weight in iText 7?
https://stackoverflow.com/questions/26838812/custom-font-weight-in-itextsharp by retif https://stackoverflow.com/users/1688203/retif When
-
How to invoke a page break for nested tables?
), the report looks fine. When I nest a PdfPTable with a limited number of rows into a cell, all works fine too: /-------- 20 string
-
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 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
-
How to precisely position an image on top of a Table?
https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/tables/AddOverlappingImage.java class, we
-
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 to use a Digital Signing Service (DSS) such as GlobalSign, with iText 7
Introduction When we want to sign a PDF with a digital signature, we need to generate a hash from the document’s data and sign
-
How do I insert a hyperlink to another page in an existing PDF?
(10,10,100,100,0); rectangle.BackgroundColor = BaseColor.BLUE; overContent.Rectangle(rectangle); stamper.Close(); How can I do similar
-
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
-
Chapter 3: Using ILeafElement implementations
if there's an actual use case for the setFixedPosition() method that accepts a page number as a parameter when creating a document
-
How to tile a document and add margins to the tiles?
how we make a distinction between rect and pagesize? We define rect as the size of the original pages and we define pagesize
-
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
-
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
-
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
-
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 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 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
-
How to give an image rounded corners?
correspond with 1 inch). Question 2: How do you display the image with rounded corners? Some image formats (such as PNG) allow
-
How to add text to an image?
the image. If the content and the image exceed 450pt, the text is forwarded to the next page. My question is: how can I obtain
-
How to attach files to a PDF?
the document, you want to create a link to that opens the PDF document described with the keyword "specificname". This is done
-
How to hyphenate text?
the Paragraph. In other words: you need to create an empty Paragraph object and then add one or more Text objects: Paragraph
-
How to calculate the height of an element?
above the baseline and the height below the baseline, when we use a font size of 12. As you probably know, the font size
-
How can I read Roman page numbers?
that has pages numbered like this: Pages with page labels In the listPageLabels() method, we create a txt file with list of page
-
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
-
Why do I get a StackOverflowException in the OnEndPage() event handler?
a System.StackOverflowException error when attempting to run the code. Does anyone have any idea why this is happening and how I can fix
-
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 to add "continue on next page" / "continued from next page" to a table? vLatest
corresponds with a row in a PdfPTable and finally I add this PdfPTable to the Document. When the table is split, I need to add
-
Chapter 4: Adding AbstractElement objects (part 1)
a MyParagraphRenderer extending the default ParagraphRenderer. Creating a custom renderer When we look at figure 4.7, we see two Paragrap
-
How to superimpose pages from existing documents into another document?
error: Exception in thread "main" java.io.IOException: RandomAccessSource not opened How can I solve this problem? Posted
-
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
-
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
-
How to insert a "linked rectangle" with iText?
of a rectangle on a given page. I want to link this rectangle to another page of the same PDF (which I also know in advance). How do I
-
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
-
How to add a border to a PDF page?
of simple code to draw a border of a page: public void createPdf(String dest) throws IOException { // Create a PdfDocument
-
How to disable the save button and hide the menu bar in Adobe Reader?
); stamper.setViewerPreferences(PdfWriter.HideToolbar); My problem boils down to this: how do I disable the "save" button in the Adobe Rea
-
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
-
Advantages of using Blockchain for Signing PDF documents
would involve creating a hash of the document, signing that hash with a private key, and store that signed hash
-
How can I add a new AcroForm field to a PDF?
fields to a PDF. Is this possible with iText? If so, how can I do this? Posted on StackOverflow on Nov 30, 2014
-
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
-
How to maintain a paragraph's indentation inside a table cell?
("This is right, because we create a paragraph with an indentation to the left and as we are adding the paragraph in composite mode, all
-
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
-
How to adapt the position of the first line in ColumnText?
https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/objects/ColumnTextAscender.java example. H
-
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
-
How can I convert a CSV file to a table with a repeating header row?
in the beginning of every page) should be in a different font and color. Just to be clear, I know how to set the font style/size/color. I
-
.How to add a border to a PDF page? vLatest
of simple code to draw a border of a page: public void createPdf(String dest) throws IOException { // Create a PdfDocument
-
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
-
Chapter 6: Using fonts in pdfHTML
reader. The shall in that last sentence means that you don't have to embed these fonts when creating a PDF document, because you
-
How to right-align text in a PdfPCell?
comes out left-aligned in the cell. Here is my code for creating the table: PdfPTable table = new PdfPTable(2); table.TotalWidth
-
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
-
Digital Signatures Hub
a victim of invoicing fraud. These issues and many more can now be solved by Blockchain. This eBook focuses on how you can use
-
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
-
Which image types are supported by iText?
into PDF syntax. Instead of adding an Image XObject, iText will create a form XObject. When the image data is encoded using
-
Chapter 2: Adding low-level content | .NET
https://github.com/itext/i7js-highlevel/tags/.NET https://github.com/itext/i7ns-samples/tags). When we talk about low-level content
-
Why do I get a message saying 1.not.found.as.a.resource?
to explain why it happens. All of this shouldn't be a problem when using the correct jar with a JDK that knows how to read
-
Use cases
, the CRM of the vendor will notice this immediately when the block containing a record created by the bank reaches the CRM's
-
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
-
How to add two images in one cell?
I'm currently creating a system that generates a PDF. However, I can't put two or three images in a single cell. What should i
-
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
-
Release iText Core 7.2.1
PubKeySecurityHandler output stream with DER encoding format OcgPropertiesCopier: StackOverflowError when merging documents with OCGs
-
.How to make a particular sub-string Bold when converting HTML to PDF? vLatest
-
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
-
Chapter 5: Custom tag workers and CSS appliers
: Creating QRCodes from HTML The text in the HTML file has a red border because that's how we defined the style of the <qr>-tag
-
Why isn't the Rupee symbol showing?
am using iText for creating PDF. I have read the answer to the question "How to display indian rupee symbol
-
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
-
How to fill XFA form using iText without breaking usage rights?
it was created and using extended features isn't possible anymore. If I choose the XML manually by clicking 'Import data' from Adobe
-
How to set background image in PdfPCell in iText?
().addXObject(img.getXObject(), getOccupiedAreaBBox()); super.draw(drawContext); } } Then you should create an instance
-
Why is content missing in my table?
or anything. Here's my scenario: I create a PdfPTable with 6 columns. However, when I add only 1 or 2 cells to the table, it's
-
Create booklet from A4 document
This example was written in response to questions such as: Click How to convert an existing A4 PDF document to an A3 booklet
-
Where is the origin (x,y) of a PDF page?
. If they are missing, they default to the /CropBox. None of these values can outsize the /CropBox. When you create a document
-
Release iText 7.1.0
https://jira.itextsupport.com/browse/DEVSIX-1468] - Create FontDescriptor for Type3 fonts and parse it when font is read from document [D
-
Core Layout: Text in PDF does not wrap appropriately (Text elements inside Paragraph)
Background In release 7.2.5 of the iText Core library we’ve introduced a fix in relation to how word wrapping is handled
-
Actions and annotations
the color of a circle annotation? How to create hierarchical bookmarks? How to modify the size of annotations and make them read-only
-
How can I load a font from /WEB-INF/resources/fonts/foobar.ttf?
"); PdfFontFactory.register(path); The caveat is that this method is highly unportable and environment-dependent. Among others, this will
-
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 newer, you should have a license key in JSON format
-
Tables
the border color of a PdfPCell? How to add an image and text to the same cell? How to create a table with complex borders? How
-
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
-
How do the measurement systems in HTML relate to the measurement system in PDF?
. For instance: when I open Word on my PC, the default font is Calibri with a font size of 11pt. Although ISO 32000 claims
-
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
-
.Create booklet from A4 document vLatest
This example was written in response to questions such as: Click How to convert an existing A4 PDF document to an A3 booklet
-
Why does using ColumnText result in "The document has no pages" exception?
); column.go(); document.close(); pdfDoc.close(); } When I run this code, I get the following error: ExceptionConverter
-
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
-
How to convert colored images to black and white?
the resulting bytes to create an Image object. Image img = makeBlackAndWhitePng(new PdfImageXObject(stream)); Now we have an iText Image
-
How to draw a line every 25 words?
I create a PDF using iText. The content consists of text and I need to draw a line to delimit this text every 25 words
-
How to continue field output on a second page?
= form.getField("body").getWidgets().get(0).getRectangle().toRectangle(); First, we need to create a template of the first page which
-
Installing iText 7 pdf2Data for Java
the compatibility matrix https://kb.itextpdf.com/home/it7kb/compatibility-matrix to ensure the version you specify when adding the add
-
Installing iText 7 pdf2Data for .NET
https://kb.itextpdf.com/home/it7kb/compatibility-matrix to ensure the version you specify when adding the add-on's dependency matches the
-
Chapter 2: Adding low-level content
https://github.com/itext/i7js-highlevel/tags/.NET https://github.com/itext/i7ns-samples/tags). When we talk about low-level content
-
Questions about PDF in general
Not LTV-enabled mean? How to protect a PDF with a username and password? How to hide the Adobe floating toolbar when showing a PDF
-
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
-
Part I - Overview and Simple Cases
though the CNG RSA key class does allow selecting RSASSA-PSS when creating raw signature values. For RSASSA-PSS CMS signatures
-
Creating Table of Contents using events
Example written in answer to the question Click How can I add titles of chapters in ColumnText? createtocincolumn <div data
-
Do we license per functionality /feature?
iText 7 Core includes about 500 functions which we license as a single SDK. This includes creation, merging, tagging, digital
-
Chapter 1: Introducing basic building blocks
https://github.com/itext/i7js-highlevel/tags/.NET https://github.com/itext/i7ns-samples/tags). When I created iText back in the year 2000
-
What does "Not LTV-enabled" mean?
as validation data). If the document is stored and the signatures are to be verifiable long after first created, in particular
-
Chapter 1: Introducing basic building blocks | .NET
https://github.com/itext/i7js-highlevel/tags/.NET https://github.com/itext/i7ns-samples/tags). When I created iText back in the year 2000
-
Getting started
and design PDFs with iText or iTextSharp? How to underline text with a dotted line? How to add a full line break? How to create
-
.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
-
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
-
iText 7: Building Blocks
https://kb.itextpdf.com/home/it7kb/ebooks/itext-7-jump-start-tutorial-for-net/chapter-1-introducing-basic-building-blocks-net). In that c
-
pdfRender: BufferedImage as output format
BufferedImage as well. Meaning it is now possible to create an in memory image object when converting from PDF using pdfRender, which
-
Fail-safe processing of Outlines without Parent link
throwing non-descriptive errors (a NPE, and in other cases entering into an endless loop) when performing operations like merging
-
Why is the page size of a PDF always the same, no matter if it's landscape or portrait?
()); System.out.println("Feel the difference:"); show(pdfDoc.getPage(2).getPageSizeWithRotation()); pdfDoc.close(); We’ve created
-
pdfHTML: support for CSS4 device-cmyk example
() https://www.w3.org/TR/css-color-4/ function, which is a feature from the CSS Color Module Level 4. How it works To create a PDF
-
Page events
while creating a PDF document? How can I add an image to all pages of my PDF? How to add a rectangle to every page
-
Release iText Core 7.1.13
also made important changes regarding how word-wrapping is handled in the context of languages that use special scripts
-
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
-
Installing iText free trial for Java and .NET developers
version”, when not using the licensing library or when using an invalid/expired license; “Trial version”, when using
-
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
-
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 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
-
How to render certain HTML entities (such as arrows) to PDF?
https://stackoverflow.com/users/378386/aggsol When we discussed fonts in chapter 6, we mentioned that Symbol and ZapfDingbats don't play
-
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 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
-
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 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
-
Why is my content overlapping with my footer?
i m using document.newpage(), but I want the new page to be created automatically instead. I create header/footer through
-
Release iText 7.1.2
https://jira.itextsupport.com/browse/DEVSIX-1869] - Investigate PDF becoming corrupted when merging documents totaling >4GB and fully com
-
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 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 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
-
How to position text relative to page?
. Please help, I don't know how to properly use mediabox and cropbox and I'm new to iText. Posted on StackOverflow on Jul 13
-
How to draw lines on an image?
control. How is this done? Posted on StackOverflow on Apr 10, 2015
-
Release pdfHTML 3.0.5
in the specification when and how an intrinsic aspect ratio should be handled, we did our best to offer as wide support
-
PDF Portfolios
contain multiple files integrated into a single PDF. Files in a PDF Portfolio can be in a wide range of file types created
-
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
-
Before we start: installing iText 7
to import iText 7 in Eclipse to create a Hello World PDF? https://www.youtube.com/watch?v=sxArv-GskLc& How to import iText 7
-
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
-
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
-
Absolute positioning of lines and shapes
without storing a file on the server side? How to add a border to a PDF page? How to create a PDF with a Cartesian grid? How do I
-
Inspect a PDF
numbers? How can I find the border color of a field? How to get the UserUnit from a PDF file? How to read PDFs created
-
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 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
-
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
-
Table events
in the same cell? How to create a table with rounded corners? Is it possible to attach multiple layout events to a PdfPCell? How
-
How to check for an event and remove it?
removeAllHandlers(). Click How to check for an event and remove it? if you want to see how to answer this question in iText 5. page_event
-
Content parsing, extraction and redaction of text
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 redactions? How
-
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 change the properties of an annotation?
in Java. You'll need to apply small changes to the methods if you want to use them in C# code. Click How to change the properties
-
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 add an image to an existing PDF using AffineTransform?
. However: you can't see it because the dimension of the image is 1 user unit by 1 user unit. I've made an example to show you how
-
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 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 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
-
How to modify the size of annotations and make them read-only?
1. Is it possible to disable the options dropdown list for annotations(text,stamp etc.)? If so, how? 2. Can the size
-
Release iText 7.1.8
that was incorporated into this release. XFDF examples To demonstrate the new XFDF functionality we've created the following Java and .NE
-
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
-
Release pdfOptimizer 2.0.2
https://itextpdf.com/node/15181/ is the addition of support for the Decode array when processing images. As noted in Table 89 of the PDF
-
Support for linearGradient Color Scheme in Layout, CSS and SVG
for how to use this functionality with pdfHTML, we've created a separate article
-
Chapter 2: Defining styles with CSS
> Gloria is an out-of-work party girl forced to leave her life in New York City, and move back home. When reports surface
-
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 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
-
Improving SVG to PDF conversion
to adversely affect document creation. The first bug was causing SvgConverter to create invalid graphics instructions
-
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 does a PdfPCell's height relate to the font size?
. Click How does a PdfPCell's height relate to the font size? if you want to see how to answer this question in iText 5. font_size
-
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
-
Setting of choice form field using setValue Method
New for iText Core 7.1.11 is a change to how form fields are handled, specifically when /TI value is present, and when using
-
Release iText 7.1.3
not to create a separate plugin and to include it in the core of iText. iText Core/Community 7.1.3 for Java
-
Chapter 1: Hello HTML to PDF
https://kb.itextpdf.com/home/it7kb/installation-guidelines/installing-the-itext-license-key-and-license-key-library-for-java-and-net. The
-
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
-
Release pdfXFA 2.0.10
throws unexpected exceptions when processing XFA. If you need to process XFA documents, we have a related blog post that may
-
Release iText Core 7.1.12
https://github.com/itext/itext7/pull/40: If line.start <=0 then continue replacing whitespaces otherwise it is a GlyphLine which has been
-
Release iText 7.1.9
, such as enhanced text extraction, better left-to-right (LTR) text direction when pdfCalligraph is used together with pdfHTML, improved S
-
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 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 change a background Image into a watermark by altering the opacity?
mentioned above to see the difference. My example is written in Java, but it's very easy to port this to C#. Click How to change
-
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 to strike through text using iText?
, iText has made a couple of decisions for you: where do I put the line? How thick is the line? If you want to make
-
What does PDF 2.0 stand for?
system. Learn more about how to create and edit PDF 2.0 documents with iText 7
-
Release pdfHTML 4.0.5
-on for Java and .NET to create PDF from HTML (and associated CSS). A new feature for pdfHTML 4.0.5 is support for the vertical
-
pdfHTML: Support for linearGradient in CSS and SVG
here we shows how it works when using pdfHTML. Below are two quick examples which demonstrate this functionality. CSS Example: Link
-
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
-
Installing the iText license key and license key library for Java and .NET
.x.y © 2000—2021 iText Group NV”, followed by a suffix. This suffix is: “AGPL version”, when not using the licensing library
-
Release pdfXFA 2.0.7
posts that may be interesting to you: How to modify XFA documents before flattening
-
Release pdfXFA 3.0.1
on forms when flattening. This is in case they do not match, so that the input does not get discarded. You can configure
-
Release pdfXFA 3.0.4
break data binding, resulting in missing fields in the flattened PDF. Now, pdfXFA will be more resilient when flattening XFA
-
Release pdfCalligraph 3.0.1
Release date: April 11, 2022 pdfCalligraph is our iText 7 add-on which provides advanced typography support when creating PDF
-
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
-
Page events for headers and footers
How to create a table with 2 rows that can be used as a footer? Click How to add HTML headers and footers to a page
-
How to rename named destinations in existing PDF files?
and new names in a Map named renamed. I use this map to change the destinations of the Link annotations on the first page. Click How
-
How to introduce a rowspan?
"); In your case you'd need cell = new Cell(1,6); for the cell with value Deloitte. Click this link if you want to see how to answer
-
pdfOffice: enabled parallel conversion
how you could create threads to run concurrently. During testing with simple mock files and 2 threads, we already noticed
-
Flexbox suport in pdfHTML
. Gallows humor. Best kind there is." </p> <p> "When did they last hang a man in this state?" asked Shadow. </p> <p> "How the hell
-
How do I use pdfRender in a .NET environment?
parameters when utilizing pdfRender's CLI infrastructure. pdfrender screenshot.jpg Note that --license is required, and is used
-
Release iText 7.1.1
] - Verify signature tests and samples. [DEVSIX-1213] - Support nice API / create convenient example for unencrypted wrapper
-
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 does iText Group count processes/files?
for purposes of our volume licensing: Opening a PDF file and extracting the text on the second page. Creating a single invoice
-
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
-
How to add blank pages to an existing PDF in java?
. If you don't need these settings, iText 7 provides a simple method: pdfDoc.addNewPage(); Click this link if you want to see how
-
How to convert an ASP or JSP page to PDF?
responsibility to get the HTML from your choice of framework. If you have an ASP file, run it through your ASP framework to create
-
Release pdfCalligraph 3.0.2
Release date: January 16, 2023 pdfCalligraph is our iText 7 add-on which provides advanced typography support when creating
-
pdfOffice: improved conversion of docx files containing embedded videos
in the resulting PDF documents. Below is a Java example showing how to do this: Java public static void main(String[] args) throws
-
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
-
Basic Concepts (Glossary)
at the time a new PDF file is created, and it's permanent in the sense that it won't change when the PDF is updated. The second
-
Part IV - Appearances
that are not base fields of the form field hierarchy. Creating Signatures With Appearances When you create a signature, you can
-
What is the difference between iText, JasperReports and Adobe LC?
will). iText is a library that can be used by developers to enhance their web and other applications with PDF functionality: create PDF
-
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
-
Is it possible to set a different alignment for text on the same line in the same cell?
know how to do it. Posted on StackOverflow on Sep 15, 2015 https://stackoverflow.com/questions/32593183 by user2866205
-
Release iText 7.1.5
https://repo.itextsupport.com/webapp/#/artifacts/browse/tree/General/releases/com/itextpdf/typography/2.0.3 - for .NET https://www.nuget.
-
Release iText 7.1.6
a line at an hyphen used to denote a minus sign. [DEVSIX-2659] : When creating a digital signature the iText Library does
-
Can I generate a PDF from a URL instead of from a file on disk?
, we have created reports that existed only in memory as a byte[]. In that case, we used a ByteArrayInputStream. We can also use
-
How to use System Font in iTextSharp with VB.net?
have the file arial.ttf in your C:\windows\fonts directory, then creating the Font object is as easy as this: PdfFont font
-
Release pdfXFA 2.0.9
use-cases. Having said that, we'd also like to point you to an XFA-related blog post that may be interesting to you: How
-
Release pdfXFA 2.0.11
Release date: July 5, 2021 The pdfXFA 2.0.11 release contains a fix when handling XFA files which contain empty rich text
-
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
-
Release pdfOffice 1.0.0
created in Office 97 through Office 2019 and the latest Office 365 updates. In this first release it can convert Word
-
How To find internal links in a PDF file?
if you want to see how to answer this question in iText 5. faq Published by Scroll Versions from this space and version Latest
-
Changing the zoom factor in a link destination
We create a file with specific /XYZ destinations and we change the zoom factor of these destinations. These examples were
-
Render data as table
Examples written in answer to the questions: Click How to create a table based on a two-dimensional array? Click How can I
-
.Changing the zoom factor in a link destination vLatest
We create a file with specific /XYZ destinations and we change the zoom factor of these destinations. These examples were
-
Support of proper word wrapping in languages with special scripts
In release 7.1.13 of the iText Core layout API, we have made some important changes regarding how word-wrapping is handled
-
Release pdfXFA 2.0.12
in an infinite loop when tabs were present in the XML. The second was where a JS property could not be read if the value was null
-
How to convert HTML containing Arabic/Hebrew characters to PDF?
/fonts/noto/NotoSansHebrew-Regular.ttf" }; We'll create a FontProvider instance that only uses these font files, and we'll use
-
What is the difference between getPageLabels and getPageLabelFormats?
(); The PageLabelNumberingStyleConstants enumeration in iText 7 can be used when creating page labels like this: pdfDoc.getPage(4).setPage
-
Release pdfRender 1.0.2
. This means it is now possible to create an in memory image object when converting from PDF using PdfRender, which in some
-
Release pdfHTML 4.0.3
Release date: July 5, 2022 pdfHTML https://itextpdf.com/node/241/ is an iText 7 add-on for Java and .NET to create PDF from
-
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
-
iText 7.1 - Migration guide for Java
changes that you need to do or you need to take into account when moving to 7.1.0. 1. Updating the version using Maven / Gradle
-
iText 7.1 - Migration guide for .NET
changes that you need to do or you need to take into account when moving to 7.1.0. 1. Updating the version using NuGet Update
-
Raw images
This example was written in answer to the question Click How to create unique images with Image.getInstance()? rawimages <div
-
Drawing a Grid
Example written in the context of the question Click How to create a PDF with a Cartesian grid? grid <div data-pym-src
-
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
-
Why does ColumnText ignore the horizontal alignment?
side and some on the right side. For some reason iText seems to ignore the alignment entirely. For example: // create 200x100
-
Why is my cell event not triggered?
https://stackoverflow.com/users/208687/richard In iText 7 we create Cells like this: Table table = new Table(2); Cell leftCell = new
-
What is the PdfPTable.DefaultCell property used for?
find some changes in creating tables. PdfPTable and PdfPCell don’t exist anymore, we use Table and Cell. You should use addCell
-
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
-
Release iText 7.0.1
documentation, examples and Q&A items that were still work in progress when 7.0.0. was released. iText 7.0.1 Core for Java and .NET
-
Which PDF filters are used to encode data?
, because that's the standard compression for PDF. Image streams use other filters when applicable, for instance: JPEG images
-
Why aren't my fonts getting registered?
) { Log.Info("**** Found registered font: " + fontname); } When I run it (using Mono on a CentOS box), the log shows only the core
-
Argument not specified in iTextSharp
in .NET start with upper case, so when people ask you to use Java code as pseudo code and to convert Java to .NET, you need to change
-
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
-
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
-
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
-
Release pdfXFA 3.0.3
process could get stuck in an infinite loop when tabs were present in the XML, and an issue where an XObject could shift position
-
Creating a custom Type 3 font
logo <div data-pym-src='https://itext.jdoodle.com/embed/itext'
-
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
-
Release pdfOffice 2.0.4
involving creating pages per cell when all cells should have been rendered on one page. Various improvements to text flow handling
-
Can I convert an HTML form to a PDF?
) https://api.itextpdf.com/pdfHTML/dotnet/latest/classi_text_1_1_html2pdf_1_1_converter_properties.html#afeca6138fbda92c63947179d8d09aefe,