iText Knowledge Base
Search in spaces:
-
How can I log the number of documents / bytes I've processed?
Counter at a time for each JVM. Click How can I log the number of documents / bytes I've processed? if you want to see how to answer
-
Logging mechanism
These examples were written in the context of the question Click How can I log the number of documents / bytes I've processed
-
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
-
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 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 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 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 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
-
How to add a page number in the header of a PDF/A Level A file?
); canvas.endMarkedContent(); I use this second approach to add several elements. Click How to add a page number in the header of a PDF
-
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 number of characters in a field?
(); Now you can get the int value of maxlen. Important note: not every field has a /MaxLen value. Click How to get the number
-
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 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
-
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
-
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
-
How to convert colored images to black and white?
PNGs and replacing them in the document (the PNG is much smaller than a JPG for black and white format). I've tried varieties
-
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 convert PdfStamper to a byte array?
= response.getOutputStream(); baos.writeTo(os); If you want a byte[], you can simply do this: byte[] pdfBytes = baos.toByteArray(); I
-
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 can I read Roman page numbers?
of an ebook can have page numbers in the Roman number format. I would like to read these page numbers (instead of the indexed
-
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 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 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 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
-
How to create a document with unequal page sizes?
); Rectangle two = new Rectangle(700,400); I am creating the PDF like this: Document document = new Document(); PdfWriter writer
-
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
-
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 add blank pages while concatenating several PDFs using PdfSmartCopy
concatenating files using PdfSmartCopy? I know PdfWriter can easily add blank pages, but it isn't made for merging a large number
-
Volume Counter FAQs
of " + entry.getValue().getTotalVolume()); } } How can I count the number of PDF reads and writes in iText 7? The DefaultEventCounter
-
Part I - Overview and Simple Cases
bytes. Often this would be done using BouncyCastle classes but other cryptography libraries can also be used; maybe other
-
How to add a rectangle to every page of a document?
the pgCnt anywhere. How can I specify that I want the rectangle on page number pgCnt, so I can add the rectangle on every page
-
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
-
Why do I get an "InvalidPdfException: PDF header signature not found"?
Is there some other way around this issue, that can allow reading of the pdf despite this problem? I have some code that reads
-
How to use Cyrillic characters in a PDF?
for the text in the sample PDF, I see the following PDF syntax: How double-byte characters are stored inside a PDF As I explained
-
Chapter 7: Handling events; setting viewer preferences and printer properties
; this way, we can use it as many times we want and the bytes of the image will be added to the PDF document only once. Creating
-
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
-
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
-
.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
-
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
-
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
-
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
-
How to preserve high resolution images in PDF?
is in Java, but you can easily port it to C#. I created the Document based on the scaled dimensions of the Image. Don't let
-
Chapter 7: Creating PDF/UA and PDF/A documents | .NET
(e.g. a header, a page number). A line of text needs to know if its a title, if it's part of a paragraph, and so on. We can add
-
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 font information and embed the actual font while merging the files into a single PDF?
document, I want to insert actual font needed by the PDF. I create different PDFs and then concatenate them into a single PDF. My
-
Chapter 5: Manipulating an existing PDF document | .NET
were adding the footer, hence we only added the current page number. Now that we have an existing document, we can add "1 of 4
-
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
-
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
-
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
-
Chapter 6: Reusing existing PDF documents
the origPdf to release the resources of the original document. We can use the same functionality to tile a PDF page. Tiling PDF
-
How to decrypt a PDF document with the owner password?
original question sounds like "How can I decrypt a PDF document with the owner password?" That is easy. The DecryptPdf
-
Chapter 3: Using ILeafElement implementations
that accepts a page number as a parameter when creating a document from scratch, but that method can also be used when adding
-
How to create a TOC when merging documents?
I need to create a TOC (not bookmarks) at the beginning of this document with clickable links to the first pages of each
-
How to right-align text in a PdfPCell?
corresponds to the number of row) so the result looks like this. You can choose the method you like more
-
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
-
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
-
Chapter 6: Reusing existing PDF documents | .NET
) and we close the origPdf to release the resources of the original document. We can use the same functionality to tile a PDF
-
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 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 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 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 can I use regular and bold in a single String?
. Click How can I use regular and bold in a single String? if you want to see how to answer this question in iText 5. paragraph
-
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 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
-
Chapter 2: Adding content to a Canvas or a Document
lines of text, there is no way we can predict how many pages will be needed for the full document. How did we guess that we'd end
-
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 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 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
-
Chapter 4: Creating reports using pdfHTML
. We found out how we can create bookmarks in an automated way, and we learned how to create PDF/A documents. By doing so, we
-
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
-
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 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
-
Why are PDF files different even if the content is the same?
Can someone please explain to me what kind of differences there are between files and the reason why the PDF format has
-
How to convert an A4 size PDF to a PDF booklet?
to the following question: How to convert an existing A4 PDF document to an A3 booklet? I have more or less the same requirement, but I
-
How can I find the border color of a field?
Is there anyway of finding the border color of a specific field in my PDF? I could get AcroField.Item, but I don't see
-
How to encrypt PDF using a certificate?
We need to encrypt a PDF with a certificate. I've found something using iText some months ago, but I cannot find it any more
-
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 rotate a page while creating a PDF document?
I can set the size of the page to landscape but the content is still oriented left->right while I would like it to be bottom
-
Questions about PDF in general
is the same? How to get the page number of an arbitrary PDF object? What is the size limit of pdf file? How do I rotate a PDF
-
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
-
How to fill out a PDF file programmatically? (Dynamic XFA)
I have a dynamic XFA Form that I can fill out manually using Adobe Acrobat on my computer. Using iTextSharp I can read what
-
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 continue an ordered list on a second page?
I am currently creating the document by creating ColumnText objects that are placed at specific coordinates. The content
-
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 convert an existing A4 PDF document to an A3 booklet?
I want to convert an existing A4 PDF document into an A3 PDF using Java. Since I am new to the iText API, I wonder if anyone
-
Can I generate a PDF from a URL instead of from a file on disk?
reports that existed only in memory as a byte[]. In that case, we used a ByteArrayInputStream. We can also use an InputStream
-
How to rename named destinations in existing PDF files?
I would like the named destinations in all the documents to be the same. I've been using named destinations in PDF files
-
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 set initial view properties?
. Document Options: Show = Bookmarks Panel and Page Page Layout = Continuous Magnification = Fit Width Open to Page number = 1 Window
-
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 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
-
Chapter 1: Introducing basic building blocks
optional instead of mandatory. I achieved this by introducing the concept of a Document to which a developer can add Paragraph
-
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
-
Chapter 1: Introducing basic building blocks | .NET
optional instead of mandatory. I achieved this by introducing the concept of a Document to which a developer can add Paragraph
-
How do I change the border color of a PdfPCell?
How do I change the border color of a PdfPCell? if you want to see how to answer this question in iText 5. tables cell_border
-
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
-
Manipulating existing PDFs
? How to watermark PDFs using text or images? How can I crop the pages of an existing PDF document? 2020-07-07_13-46-56_How
-
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
-
Where can I download the license key library?
How to download the iText 7 or iText 5 license key library manually, or using Maven or NuGet. Important! As of the release
-
How to extract embedded streams?
to extract that same array. How can I do this? Posted on StackOverflow on May 17, 2015
-
How to allow page extraction when setting password security?
setting all the flags that are documented in ISO-32000-2, but they didn't result in setting the Page Extraction to Allowed. I have
-
How to define different border types for a single cell?
); the bottom and right get drawn with solid line. When I remove the setBorder() I get all borders dotted. How can I draw a cell
-
Release iText Core 7.2.0
change in this release of iText 7 is the new Unified License Mechanism, where we can have independent licenses for iText 7 Core
-
Chapter 4: Making a PDF interactive | .NET
are deprecated in PDF 2.0. With iText, you can add all of these annotation types to a PDF document, but in the context
-
How to generate 2D barcode as vector image?
a PdfFormXObject instance and wrap it inside an Image. I can then add this Image to the document just like any other image. The main
-
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 set up a table display?
something like this: I can determine the total number of lines in the table in advance if that makes any difference. Does anyone have
-
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 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
-
Chapter 4: Making a PDF interactive
, two of which are deprecated in PDF 2.0. With iText, you can add all of these annotation types to a PDF document
-
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 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 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 to create a list without indentation?
the label and the content of a list item by default in iText 7. Your question is: how can we remove this indentation. So at first I
-
Chapter 3: Generating PDF based on Media Queries
on the screen, but if it's your intention to create a PDF document for printing, you can define "Print" as the media device description
-
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
-
How to use a Digital Signing Service (DSS) such as GlobalSign, with iText 7
code snippet shows how you can call it: <div data-csharp-libs="itext7:latest.release" data-hide-execute="true" data-java-libs
-
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 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 get the rendered dimensions of text?
or by defining a custom split character. I've written a small proof of concept to show how you could implement custom "truncation
-
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 display indian rupee symbol?
, for instance, the double-byte rupee character can be interpreted as two separate bytes representing two different characters
-
Do I need a license for Windows fonts when using iText?
that are proprietary in the sense that you can not redistribute them, but they allow you to embed the font in documents
-
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 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
-
Interactive forms
? How can I find the maximum character limit for a text field? How can I create a Reader enabled PDF that can be signed in Adobe
-
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 can I load a font from /WEB-INF/resources/fonts/foobar.ttf?
As far as I can see, it should be not found in resources by iText's FontFactory. class. The question pretty much says it all
-
Basic Concepts (Glossary)
. Those records should be used to store metadata, such as the digest message of the bytes of a PDF document. Concepts related
-
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
-
Release pdfHTML 3.0.4
ones in the coming releases. You can refer to the examples section to get insight into how flexbox can be already used for PDF
-
What is the size limit of pdf file?
a slow connection, the end user will have to wait forever to get the full file. There is no way you can predict how the browser
-
Part III - PKCS#11
drivers from Java and .Net, and then we use those ways of access with a number of example devices. How to Address PKCS#11 Drivers
-
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 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 draw a line every 25 words?
as shown in the following image: https://itextpdf.com/sites/default/files/HiSHy.png I'm aware there's a way of that I can extract text
-
Why are the AcroFields in my document empty?
", pdfReader.AcroFields.Fields .Select(x => x.Key + "=" + pdfReader.AcroFields.GetField(x.Key)).ToArray()); } How can I read
-
How to define spacing and leading in PdfPCell objects?
(p); As you can see in the resulting pdf, you define the space between the lines using the setFixedLeading() method. I've used
-
How to remove text from a PDF?
Is it possible to remove all text occurrences contained in a specified area (red color rectangle area) of ??a pdf document? I
-
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
-
Chapter 3: Using renderers and event handlers | .NET
, but we'll save that for another tutorial. We'll finish this chapter with an example that demonstrates how we can automatically
-
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
-
How to crop out a part of PDF file?
I have to remove the top part of each page from a PDF. I managed to do this with CROPBOX, but the problem
-
How to format a field as a currency?
as a percentage). Now I need to learn how to format numbers. This is what I've tried: Stream os = new FileStream(PDFPath
-
How to use a text extraction strategy after applying a location extraction strategy?
I used the following code to get data in PDF from a particular location. Rectangle rect = new Rectangle(0,0,250,250
-
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
-
Chapter 3: Using renderers and event handlers
-c03e01_newyorktimes example shows how this is done. PdfDocument pdf = new PdfDocument(new PdfWriter(dest)); PageSize ps = PageSize.A5; Do
-
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
-
How to distribute the radio buttons of a radio field across multiple PdfPCells?
() method and I've created my own custom cell events to render text fields and check boxes in PdfPTables. However, I can't seem
-
Font examples
How can I use regular and bold in a single String? How can I load a font from /WEB-INF/resources/fonts/foobar.ttf? Why do I
-
Why is the text I extract from an English PDF page garbled?
i a cel ra csea ewerh " eth lweoh is ermo nath eth ms u fo sti rtasp ". Can anybody please help me out what could
-
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 find out the current cursor position on a page?
I'd like to execute a command to tell me how much height has been consumed thus far in the document (for the current page) so I
-
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
-
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
-
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 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
-
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
-
How to change the spacing between words and characters?
); document.close(); } How can I change this code to get a result like in figure 2? Posted on StackOverflow on Jun 16, 2015
-
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
-
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 6: Using fonts in pdfHTML
document. An a character can be mapped to different visualisations of the letter a, for instance 'a', 'a', 'a' , or even 'Î
-
How to use System Font in iTextSharp with VB.net?
Can someone help me with writing the code to use a system font? I'm using Itextsharp to convert text files to PDF documents
-
pdfOptimizer: Support added for Font, Image, Color Space optimization
(); /* Here we instantiate a FileReportBuilder which we can use as a log of the efficacy of our optimization. Security level
-
How to rotate and scale pages in an existing PDF?
doesn't work, which I suspect means I'm doing it wrong), but I have basically no idea how to properly scale the source page when
-
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 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 allow a Unicode subscript symbol in a PDF without using setTextRise()?
and superscript characters, is there a way I can display them in PDF? I searched and found that: the setTextRise() method is used
-
.How do I set parameters back to the default value? vLatest
I am using absolute positioning when writing text in a PDF document using iTextSharp. It only have a single BaseFont instance
-
How do I set parameters back to the default value?
I am using absolute positioning when writing text in a PDF document using iTextSharp. It only have a single BaseFont instance
-
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 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
-
Chapter 4: Adding AbstractElement objects (part 1)
in the previous chapters showed that we can make some really nice PDF documents, but there's always room for improvement. Figure 4.4
-
How to add an In Reply To annotation?
. It needs a reference to the parent popup. Like /IRT 16 0 R. How do I find this reference? Posted on StackOverflow on Feb 11, 2015
-
.How to add a shading pattern to a custom shape? vLatest
I have drawn an equilateral triangle as follows using iText canvas.setColorStroke(BaseColor.BLACK); int x = start.getX(); int
-
How to add a shading pattern to a custom shape?
I have drawn an equilateral triangle as follows using iText canvas.setColorStroke(BaseColor.BLACK); int x = start.getX(); int
-
How to attach files to a PDF?
can't seem to reference them as links within the PDF. iText in Action suggests I can do this as annotations or document level
-
Why can't I set the font of a Phrase?
); Paragraph p = new Paragraph().add(redText); doc.add(p); pdfDoc.close(); } I used Courier font, but you can set any font you
-
How to get a font from an array?
you can create a PdfFont from a byte[], using the createFont() method. Suppose that fBytes is a byte[], then you'd have
-
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
-
Why do I get a font embedding error when creating PDFA/1a?
, but it isn't. You can check this by using that font in any other PDF that isn't PDF/A: if you go to Document Properties > Fonts, you'll
-
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 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
-
Why is the page size of a PDF always the same, no matter if it's landscape or portrait?
i = 0; i pdfreader.getNumberOfPages(); i++) { document = PdfStamper.getOverContent(i).getPdfDocument(); document.getPageSize
-
How to stamp image on existing PDF and create an anchor?
I have an existing document, onto which I would like to stamp an image at an absolute position. I am able to stamp the image
-
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 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
-
Chapter 5: Adding AbstractElement objects (part 2)
the RoundedCornersTableRenderer right before adding the table to the document. This way, we can also keep our TableRenderer implementatio
-
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 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
-
What's an easy to print "first right, then down"?
can handle a PdfPTable containing more rows than fit on a page, but can't handle more columns than fit on a page. So I split
-
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
-
How to write a Zapfdingbats character at a specific location on a page?
I want to put a check mark using Zapfdingbats on a specific location in my PDF document. What I achieved so far is this: I can
-
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 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 make a single letter bold within a word?
); It returns a Text instance (iText 7 does not have Chunks anymore). Now I can construct a Paragraph like this: Paragraph p = new
-
How to add a background image to a cell?
, but how can I stretch the image? Please check the PositionContentInCell
-
How to hyphenate text?
I generate a PDF file with iText in Java. My table columns have fixed widths. Text that is too long for one line is wrapped
-
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 add text as a header or footer?
https://stackoverflow.com/users/4308508/hiasl The problem you report can not be reproduced. I have taken your example and I create the Te
-
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
-
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 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 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 to generate and design PDFs with iText or iTextSharp?
document with iTextSharp with code (i.e not loading external files)? I want the final result to look similar to a web page
-
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 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 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 do I use pdfRender in a .NET environment?
to specify the location of your pdfRender license file. The following is a list of the image file types which a PDF can be rendered
-
How to change the text color of an AcroForm field?
the document. Changing the color of a field (or other properties) would require changing the XML and iText(Sharp) can not do that. If I
-
How to create a table based on a two-dimensional array?
; i < 2; ) { I've provided a more generic solution because it's more elegant to have generic code. Click this link
-
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
-
How to extend the page size of a PDF to add a watermark?
I want to add a watermark to a document that doesn't cover any of the existing text (not even if the watermark is transparent
-
Chapter 6: Creating actions, destinations, and bookmarks
similar to one of the two methods that were just explained. How can I create a link that opens a PDF in a new browser window or tab
-
How to find the absolute position and dimension of a field?
And is the opposite possible: if I know the position, can I get the name of the field? Given an field name, is it possible
-
Advantages of using Blockchain for Signing PDF documents
with the unique ID pair of a document as the primary key for each record. Optionally, we can add metadata to the signature records
-
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 create a link to launch an external program?
I am using iTextSharp to create PDF files. Can I use iTextSharp to create a link in pdf that will allow me to launch a program
-
.How to create a table based on a two-dimensional array? vLatest
; i < 2; ) { I've provided a more generic solution because it's more elegant to have generic code. Click this link
-
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
-
How to show an image at a text field position?
I have a PDF document which has AcroForm text fields. Now I want to insert a signature image in one of the those fields. I
-
Why can't I embed a font due to licensing restrictions?
allows fonts to travel with documents. Embedded fonts can only be used to print, preview and in some cases edit the document
-
How to add a table on a form (and maybe insert a new page)?
"); for (int i = 1; i As you can see, in iText 7 we create a DocumentRenderer and specify the area for printing the content
-
How to resize an Image to fit it into a PdfPCell?
result: So I have the following 2 questions: Can I resize the Image size into my code or do I have to do this with an image editor
-
Can I convert an HTML form to a PDF?
There is limited support for converting HTML forms to a PDF document. If you have an HTML file with text fields that you want
-
How to adapt the position of the first line in ColumnText?
is the desired placement. Is there anything I can do to tell iText not to put any space between the top of the highest glyphs (D and Z
-
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
-
Volume Counter installation guide
the iText namespace ("com.itextpdf" for Java and "iText" for .NET) then you can check for the following logging messages: The 'itext
-
How to fit a String inside a rectangle?
the content of the strings, the content is incomplete. How can I avoid that content gets lost? Here's the related code
-
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
-
Why does using ColumnText result in "The document has no pages" exception?
I want to use ColumnText to wrap text in a rectangle, but it tells me the document has no pages. I want to use ColumnText
-
How to draw lines on an image?
I am trying to draw lines on image that needs to be added to a document, just like we draw graphics on paint event of any
-
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
-
Blockchain for PDF Documents
. These issues and many more can now be solved by Blockchain. This eBook focuses on how you can use Blockchain in combination
-
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 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 merge forms from different files into one PDF?
(); for (int i = 0; i As you can see, the renameFields() method creates a new document in memory and rename the field names using
-
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 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 get the color properties of an AcroForm field?
. Is there any way we can get color information from the fields? I created the AcroForm fields in the PDF using the following Adobe
-
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 merge PDFs and add bookmarks?
I am merging multiple PDFs together into one PDF and I need to build bookmarks for the final PDF. For example, I have three
-
How to read bookmark titles?
I am working with a single PDF containing multiple documents. Each document has a bookmark. I need to read the bookmark names
-
Installing the iText license key and license key library for Java and .NET
https://www.nuget.org/packages/itextsharp.licensekey/. I get "signature corrupted" This can mean a few things: The license key file was c
-
How to check a check box?
I've tried so many different ways, but I can't get the check box to be checked! Here's what I've tried: var reader = new
-
How to update a PDF without creating a new PDF?
I need to change the value of a field in an existing PDF file. I am using PdfReader, PdfStamper and AcroFields and that's
-
When is the content flushed to a PDF File by iTextSharp?
I assumed that Document.Add() flushed content to the PDF file (the file stream) immediately, but it looks like that's
-
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
-
What does "Not LTV-enabled" mean?
iText to sign and timestamp PDF documents. It works very well. But I recently switched from Acrobat Pro X to XI and now I see
-
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
-
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 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 create a JavaScript action to open the attachments panel?
which opens the attachments panel? Not right away, but when the user presses some text? I know the writer.setViewerPreferences
-
How to add a table in the top-right corner of the page?
in an attempt to reproduce your problem: Table in upper-right corner As you can see, I can't reproduce the problem: the table is shown
-
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 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
-
Is it possible to set a different alignment for text on the same line in the same cell?
, the second one on the right, and everything must be in one line. I've tried used Paragraphs, Chunks and Phrases but I don't
-
How to introduce a custom font weight in iText 7?
Is there a way to set font weight as a number? I can set bold font like this: iTextSharp.text.Font font_main = new
-
How to find out which fields are required?
that the best solution will be to use iText library. I can read file, and read AcroFields from a document but is there any possibility
-
pdfRender: BufferedImage as output format
be overridden with logic to decide how and where the BufferedImage object should be stored. Take a look at the example below
-
Why does ColumnText ignore the horizontal alignment?
(new Paragraph("entry6")); ret = ct.Go(); I've set the alignment of the 2nd column to Element.ALIGN_RIGHT but the text appears
-
Part II - Proprietary APIs and Custom Providers
class from part I one can then sign PDFs like this: X509Certificate2 certificate; using (X509Store store = new X509Store
-
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
-
Release iText 7.1.11
files now has a closer behavior to how a web browser would render the content. If you would like to maintain the previous behavior
-
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 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
-
Release iText 7.1.1
] - Panose string: 10 instead of 12 bytes. [DEVSIX-1519] - pdfHTML: Fix @font-face name resolving. [DEVSIX-1689] - IOException
-
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
-
Why is my cell event not triggered?
I've added the cell to the table; which is why I need to set the cell renderer after the cell has been added to the table. Posted
-
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
-
Use cases
could use the principle for every document in the supply chain. A document that starts off as a quote request can spawn different
-
Release iText 7.1.0
changes. These are focused in a few areas of iText functionality and thus will only impact a select number of use cases. Read more
-
Chapter 1: Hello HTML to PDF
In this chapter, we'll convert a simple HTML file to a PDF document in many different ways. The content of the HTML file
-
What does TextPositioning in pdfOCR do?
above. You want the cell in a table with a number to be as limited as possible. You can see it from the example below, where
-
How to parse multiple HTML files into one PDF?
pdf. If you have three single-page PDF document, PdfMerger can merge them into a single PDF with three pages, taking the pages
-
.Why does the cell background color affect the color of other lines? vLatest
desired page in the document (I've used the first one) and draw content directly to it. Before you start you should use saveState
-
Why does the cell background color affect the color of other lines?
desired page in the document (I've used the first one) and draw content directly to it. Before you start you should use saveState
-
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
-
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 does iText Group count processes/files?
Files are counted based on one open, close, or edit to a PDF file. For example all of the following would count as one process for
-
Chapter 2: Adding low-level content | .NET
these methods in iText) you can draw paths and shapes. Let’s take a look at a small example: -406 20 m 406 20 l S This is PDF syntax
-
.Chapter 2: Adding low-level content | .NET vLatest
these methods in iText) you can draw paths and shapes. Let’s take a look at a small example: -406 20 m 406 20 l S This is PDF syntax
-
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 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 to add blank pages to an existing PDF in java?
I have a normal PDF file, I want to insert blank pages at the end of this PDF using iText, without changing the existing PDF
-
How do I create a separate OCR layer?
https://api.itextpdf.com/pdfOCR/dotnet/latest/classi_text_1_1_pdfocr_1_1_ocr_pdf_creator_properties.html) class. With it, you can define:
-
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
-
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
-
Chapter 5: Custom tag workers and CSS appliers
the text. However, we can use this HTML file to create a PDF document with QR codes instead of the text. See figure 5.4. Figure 5.4
-
Release iText 7.1.3
to 3.0.3. The August 2018 release of iText contains two new modules in the core, the underlying work to support a number of new
-
Using iText 7 and AWS KMS to digitally sign a PDF document: Part 1
This example was written for the article "Using iText 7 and AWS KMS to digitally sign a PDF document
-
How to hide the Adobe floating toolbar when showing a PDF in browser?
) that appears and disappears depending on mouse movement. Is there a way to suppress this toolbar? I can control the PDF document (it's
-
Chapter 2: Adding low-level content
these methods in iText - you can draw paths and shapes. Let's take a look at a small example: -406 0 m 406 0 l S This is PDF syntax
-
Inspect a PDF
annotation? How to extract embedded streams? Why do I get an InvalidPdfException: PDF header signature not found ? How can I read
-
Why does my header overlap with my content?
, but unfortunately, it overlaps with the rest of my content. How can I avoid this? Question inspired by the posts on StackOverflow dated
-
Option to disable AGPL-usage warning messages
be honored to add it to our list of AGPL projects built on top of iText 7 and we'll explain how to remove this message from your
-
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
-
Actions and annotations
to set the BaseUrl of an existing PDF document? How to change the author name for comments? How to add a printable or non
-
Release iText Core 7.2.1
years there is still so much interest in improving the iText library. You can also expect other changes such as a number of bug
-
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 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
-
Which PDF filters are used to encode data?
I am very keen to know which PDF filters are used by iTextSharp to encode the data so that it can decode the data properly
-
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 tell iText how to clip text to fit in a cell?
of the string which fits. Can I control this clipping algorithm? For example: Print a suffix of the string rather than a prefix
-
How to draw a borderless rounded rectangle?
Is it possible to have a rounded Rectangle with no border? I create rounded rectangles and rectangles with border sizes of 0f
-
How to nest tables without extending the inner table?
How can I avoid that the smaller table stretches to fit the cell of the outer table? Additionally: how do I align the inner
-
How to set the zoom level of a PDF using iTextSharp?
); writer.SetOpenAction(action); doc.Close(); But I am getting the error "the page 1 was request but the document has only 0 pages
-
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
-
Release iText 7.0.4
https://jira.itextsupport.com/browse/DEVSIX-1366] - How can we change the default leading of a document? [DEVSIX-1371 https://jira.itexts
-
Using iText 7 and AWS KMS to digitally sign a PDF document: Part 2
This example was written for the article "Using iText 7 and AWS KMS to digitally sign a PDF document
-
How to 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
-
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 change a background Image into a watermark by altering the opacity?
I want to make my background image in iText transparent. Here is my code for the image: string root = Server.MapPath
-
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
-
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
-
Release pdfXFA 3.0.1
); If you need to process XFA documents, we have a related blog post that may be interesting to you: How to modify XFA documents
-
pdfHTML: Processing of extremely long elements
leak from happening. You can test out the issue by using the example code and resources below. When running the sample on an older
-
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 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
-
Release iText Core 7.1.15
to the flexbox support that we've added to pdfHTML 3.0.4, there are also an number of substantial changes which explicitly affect
-
How to get specific types from AcroFields? Like PushButtonField, RadioCheckField, etc
far so good, but then comes the second question: How do I find the check type? How do I change it? That question reveals a lack
-
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
-
How to shrink pages in an existing PDF?
of the pages and I lose all interactive features. Is there another way I can shrink pages? Posted on StackOverflow on Aug 18
-
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 give an image rounded corners?
I want to get the image width and height and make the edges of the image curved. I'm using iTextSharp to export images
-
How to only read text from a constant location on PDF pages?
(currentText); } pdfReader.Close(); } return text.ToString(); But how can I only restrict it to a specific location? Posted
-
How to create and apply redactions?
) does not seem to work. In iTextSharp I can create simple text annotations like this PdfAnnotation annotation
-
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 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
-
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 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 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
-
Digital Signatures Hub
Research Engineer Matthias Valvekens at FOSDEM 2021, we discuss how you can leverage PDF to build secure, yet user-friendly document
-
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 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
-
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
-
Release pdfXFA 3.0.2
states. You can check the code example linked below to learn more. If you need to process XFA documents, we have a related blog
-
How to fill XFA form using iText without breaking usage rights?
If I choose the XML manually by clicking 'Import data' from Adobe Reader, form is filled properly, so I guess
-
Getting started
text using iText? How to set the page size to Envelope size with Landscape orientation? How can I generate a PDF/UA compatible PDF
-
Release pdfHTML 3.0.1
properties https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties can often improve your CSS code readability
-
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
-
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
-
How to make a field not required?
I am trying to make a field not required using iText. I know that I can make a field required using something like below
-
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
-
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
-
How to use multiple fonts in a single cell?
be a little smaller than the text input from the windows form. Currently I'm using cells and was wondering if I can use 2
-
How to format a field as a percentage?
I use iText from C# code. I use AcroFields to populate a form with data, but I lose my formatting. I am using the following
-
How does a PdfPCell's height relate to the font size?
PdfPCell and font size? I am making a PDF with pages of size A3, A4 and A5. I need to know the relation between Font size
-
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 change width of single column of table?
name| | | As you can see the word "Medicine" is split into "Medicin" and "e". I want to avoid this by changing the width
-
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
-
What does PDF 2.0 stand for?
system. Learn more about how to create and edit PDF 2.0 documents with iText 7
-
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
-
Fail-safe processing of Outlines without Parent link
Background As stipulated in the PDF specification, an outline item is required to have a parent link. The parent of a top-level item is
-
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
-
Release pdfXFA 3.0.0
to you: How to modify XFA documents before flattening
-
Release pdfHTML 3.0.3
the <pattern> element which is used to define a graphics object that can be "tiled" to cover an area, and the support of SVG defined
-
Is it safe to remove XFA?
Are there any issues that can come up of removing the XFA format from a PDF form? If I don't drop XFA, I can see the fields
-
What is the difference between iText, JasperReports and Adobe LC?
I want to know the difference or comparison between different PDF creation / generation techniques. For Example: iText, Adobe
-
Part IV - Appearances
that the signature indeed is on-page, in particular in case of third-party documents. Alternatively you can use the predefined location
-
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 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
-
How to create a clickable polygon or path?
Is anyone out there able to create a clickable annotation that has an irregular shape? I know I can create a rectangular one
-
How to add an image watermark to a PDF file?
# and iTextSharp to add a watermark to my PDF files: Document document = new Document(); PdfReader pdfReader = new PdfReader
-
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 check if a font is bold?
I have an application, that extracts headings out of pdf files. The documents that the application is supposed to work
-
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 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
-
Where is the origin (x,y) of a PDF page?
I want to position text at some specific place in the document. However, I cannot figure out where to find the origin
-
pdfHTML: Creation and/or merging of outlines for documents
With pdfHTML 3.0.0 (released with iText Core 7.1.11) we improved the creation and/or merging of document outlines. Details
-
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
-
Release iText 7.1.10
https://itextpdf.com/en/products/rups(oof, I really had to take a breather there. It's a lot of goodies!) Head on down to the Release
-
How to avoid an exception when importing a TIFF file?
begin with EOL code word. I can open the tiff file in any image viewer, so it's valid. Posted on StackOverflow on Apr 22, 2015
-
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
-
How to put text above a barcode instead of under the bars?
to introduce bar codes with text below the bars like this: I need the text to be above the bars as shown in this screen shot: How can I
-
Why is my content overlapping with my footer?
I want the content that overlaps to automatically move to the next page. I am using iTextSharp to generate PDF documents
-
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
-
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 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 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
-
.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 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 change the zoom factor in link annotations?
I want to change only zoom property of links. This is what I currently have: int n = reader.getNumberOfPages(); PdfDestination
-
How to create a table with only vertical borders?
It is possible with iText 7 to create a table with vertical lines only? I have a table with vertical and horizontal lines
-
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
-
Chapter 2: Defining styles with CSS
such as [blockcode]<i>[/blockcode] and [blockcode]<font>[/blockcode] see 1_no_css.html
-
Release iText 7.1.5
https://www.nuget.org/packages/itext7/7.1.5 kernel We can now also read MMType1 fonts (we treat them like regular Type1 fonts) We now sup
-
Release pdfHTML 3.0.2
of inline text by adding the text-transform: capitalize property and provide more control over the document conversion process
-
How to create a custom dashed line separator?
Using the DottedLineSeparator class, I am able to a draw dotted line separator. Similarly, is it possible to draw continuous
-
Deploying iText 7 Suite SDK/API on Amazon Web Services
version. Use the desired port mapping 8080(host): 8080 (container). Enable AWS CloudWatch logs to gain visibility over the container
-
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
-
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
-
Using iText 7 and AWS KMS to digitally sign a PDF document: Part 4
This example was written for the article "Using iText 7 and AWS KMS to digitally sign a PDF document
-
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
-
.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
-
Does a PDF file have styles, headers and footers?
for PDF/A Level A and PDF/UA documents. A majority of the PDF files you can find in the wild aren't tagged (or aren't tagged
-
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
-
Using iText 7 and AWS KMS to digitally sign a PDF document: Part 5
This example was written for the article "Using iText 7 and AWS KMS to digitally sign a PDF document
-
Which languages are supported in pdfHTML?
This is not a new question. The answer can be found in chapter 6
-
Evaluating JS with pdfHTML
have a copy of the chromedriver.exe file in my 'Debug' folder, as such I can pass "." as an argument and Selenium
-
Release pdfXFA 2.0.10
be interesting to you: How to modify XFA documents before flattening
-
Release pdfXFA 2.0.11
fields. If you need to process XFA documents, we have a related blog post that may be interesting to you: How to modify XFA
-
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
-
Release iText 7.0.3
-1228 https://jira.itextsupport.com/browse/DEVSIX-1228: Copy in Smart Mode: Documents with many pages take up huge memory space
-
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
-
Why aren't images added sequentially?
The order of the elements on paper is not the same as the order that I used to put the element in the document via
-
How to get the author of a "free text" annotation?
Is it possible to get the author of a free text annotation using iText? I can retrieve the /Type and /Contents, but I can't
-
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
-
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 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
-
Why does the function to concatenate / merge PDFs cause issues in some cases?
, File outputFile) throws DocumentException, IOException { Document document = new Document(); FileOutputStream outputStream = new
-
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
-
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
-
Why do I get an "System.IO.FileLoadException: Could not load file or assembly" error?
In my .NET project I get an "System.IO.FileLoadException: Could not load file or assembly" error. What could be causing
-
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
-
Flexbox suport in pdfHTML
. It is currently in the W3C's candidate recommendation stage, although has been around for a number of years now and has proven
-
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 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 do the measurement systems in HTML relate to the measurement system in PDF?
, however; there is no universal definition of a point. ISO 32000-2: 7.7.3.3 Page objects UserUnit: A positive number that shall
-
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
-
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 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
-
Release iText Core 7.1.14
which can be "tiled" to cover an area. In addition, we also added the support of font-relative units for SVG and fixed the stroke
-
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
-
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
-
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
-
Release iText 7.0.1
iText 7.0.1 is our first functional product update. It's a maintenance release that fixes a number of minor bugs, re-syncs
-
How do we define an application?
Good question! In a service-oriented architecture environment, this can be complex. Is a web-based customer portal a single
-
Why iText and Blockchain?
a digital document that didn't look like a paper document, The mobile web changed this mentality: content can look differently
-
Absolute positioning of lines and shapes
a rectangle with color? How to set the line width of a clipping path? How to draw a borderless rounded rectangle? How can I serve a PDF
-
Release pdfXFA 2.0.7
posts that may be interesting to you: How to modify XFA documents before flattening
-
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
-
Tables
to maintain a paragraph's indentation inside a table cell? What is the PdfPTable.DefaultCell property used for? How can I convert
-
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
-
How to align AcroFields?
getting proper PDF, but I want to change the alignment of some fields. I am using the following code. fields.setFieldProperty
-
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 set a fixed background image for all my pages?
I want to apply the background image to all of the pages, but it is only showing up on the last page. Why is that? On Button
-
How to add an inner table surrounded by text?
I am trying to add a table surrounded by text to an outer table, but the inner table disappears and I can't seem to fix
-
Release iText 7.1.6
quadratic Bézier path) commands Transparency support - colors can have an alpha component, and objects can have a fill-opacity
-
Absolute positioning of text
to a text pattern with every x-step? How to rotate a paragraph? How to divide a page in N parts so we can fill each
-
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 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
-
Release pdfOffice 2.0.0
conversion results. For example, we have resolved an issue relating to page numbering where a source Word document contained
-
How to use an image as list symbol?
I know that SetListSymbol (from the ITextSharp library) expects a string as a parameter, but is it possible to use an image
-
Release pdfOCR 1.0.2
improvements which allow you to process documents more precisely. These are: Refinement of the symbol position based on the HOCR data
-
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 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
-
Release iText 7.0.5
as Open Source software under the AGPL software license. You can find the repositories here: pdfHtml: Java
-
Clearer exception messages when Outline Dictionaries break PDF specification rules
https://en.wikipedia.org/wiki/PDF. We've added some additional checks to our library in order to improve our logging in these cases. Inst
-
pdfOffice: Spreadsheet To PDF Support
Since the first release of pdfOffice, we have received a growing number of customer requests to support conversion of .xlsx
-
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
-
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
-
How much does it cost to upgrade iText 5 to iText 7?
Customers who have a commercial license for iText 5 Core, and who are current support and maintenance subscribers can upgrade
-
Installing iText 7 pdf2Data for .NET
or install it with the Install-Package itext7.pdf2data NuGet Package Manager command. Example of how pdf2Data can be used in code
-
pdfHTML: Custom ResourceRetriever
); HtmlConverter.ConvertToPdf(new FileInfo(src), new FileInfo(dest), converterProperties); } } }</div> </div> You can also provide
-
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
-
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
-
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 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
-
Before we start: Overview of the classes and interfaces
a table to a document before you've completed adding all the Cell objects. By doing so, you can reduce the memory use: all the table
-
Installing iText 7 pdf2Data for Java
> </dependency> Example of how pdf2Data can be used in code: // Make sure to load license file before invoking any code
-
How to draw a borderless table in iTextSharp?
anymore, you should use Cell instead. By default, each cell has a border. You can change this default behavior by changing
-
How to change the author name for comments?
, is applied? You can do this manually through the properties box, but thi Does anyone have a script which will change the name
-
pdfOffice + iText Core Annotations Example
frontiers for your company's document workflow, thanks to its capabilities for accurate conversion of MS Office documents to PDF
-
How to add an image to an AcroForm field?
adding images. How is this done? Posted on StackOverflow on Apr 17, 2013
-
Using iText 7 and AWS KMS to digitally sign a PDF document: Part 3
This example was written for the article "Using iText 7 and AWS KMS to digitally sign a PDF document
-
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
-
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
-
Scaling large HTML content to render onto smaller PDF page sizes
content to the required page size. To do this, we can take the following steps: Convert your HTML to a default page size
-
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
-
Release pdf2Data 2.1.9
https://kb.itextpdf.com/home/it7kb/examples/pdf2data-grouping-of-extracted-values-in-xml showing how this works but if you are familiar w
-
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
-
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
-
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
-
Release pdfHTML 3.0.5
an impression of how nice they look now. Moreover, in this release you can expect a bunch of bugfixes and further performance improvement
-
iText 7: Converting HTML to PDF with pdfHTML
NOTE: We are continually updating our features- and have some new features that are not included in this eBook yet. You can
-
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
-
Release pdfOCR 1.0.0
repository https://github.com/itext/i7n-pdfocr), so feel free to head on over there, and check out (pun intended), how we brought
-
Why do I get a BouncyCastle NoClassDefFoundError?
I want to encrypt my PDF but there seems to be an error. Here is the code: PdfReader reader = new PdfReader("my.pdf
-
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
-
Release iText 7.1.4
license. New event types can be sent to license counting service. RUPS 7.1.4 Fix lingering concurrency problem for Mac. pdfDebug
-
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
-
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 key. This
-
How do I get a free trial?
Click here https://itextpdf.com/en/get-startedto request your free 30 day trial. free_trial itext_7_suite faq Changed non-existent
-
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 to your
-
How do I renew my license?
Annual subscribers are sent a series of reminder notices starting 60 days before the annual subscription expires. Contact an iText sales
-
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
-
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
-
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
-
Release iText 7.0.6
strong random number generator (RNG) like "java.security.SecureRandom" in place of this PRNG. [DEVSIX-1715] - Update licensekey
-
.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
-
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
-
pdfHTML: Bézier Curve Improvements
are calculated and displayed within PDF documents. The screenshot below shows some HTML + CSS that utilizes Bézier curves. As we can
-
pdfHTML: Fixed Behavior for <input> Tags with Negative Numbers
box. More information about <input> tag can be found here https://www.w3schools.com/tags/tag_input.asp. Howver, when the tag had
-
How to solve an UnsupportedCharsetException when using itext-asian.jar?
of the exception that is thrown can be found in the following lines: public static final String[] tempString = { "KozMinPro
-
pdfOCR: How to OCR an Image to PDF/A-3u?
/A compliant document (more specifically, PDF/A-3u), with just a few lines of code. don't forget to specify the path to your
-
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