iText Knowledge Base
Search in spaces:
-
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 underline text with a dotted line?
(using the constructor of DottedLine). Click How to underline text with a dotted line? if you want to see how to answer
-
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
-
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
-
Is it possible to set a different alignment for text on the same line in the same cell?
In one cell and on the same line, I must add two text (name and date). The first snippet of text must be on the left page side
-
How to 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 maintain a paragraph's indentation inside a table cell?
at the level of the Paragraph are preserved. Click How to maintain a paragraph's indentation inside a table cell? if you want to see
-
How to add a full line break?
I use itextsharp and I need to draw a dotted line break from the left to the right of the page (100% width) but I don't know
-
How to add an image and text to the same cell?
https://stackoverflow.com/users/5064085/semil-sebastian In iText 7 we use Cell instead of PdfPCell and Table instead of PdfPTable. I’ll w
-
How to get text and image in the same cell?
= Element.ALIGN_MIDDLE; table5.AddCell(cell); } How could I insert the number of the image at the left corner of cell? Posted
-
How to align two paragraphs to the left and right on the same line?
(alignment); cell.setBorder(Border.NO_BORDER); return cell; } Click How to align two paragraphs to the left and right on the same line
-
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 tell iText how to clip text to fit in a cell?
fit into the cell." in a cell that is too small. We add the content using a CellRenderer and overriding the draw() method
-
How to add a background image to a cell?
scaleToFit() method to stretch the image. Without this line, you’ll get the following result: Scaled image in cell How can I position
-
How to strike through text using iText?
I have 2 numbers one above the other, but the first one must have an Strikethrough. I'm using a table and a cell to put both
-
Table and cell events to draw borders
These examples were written in answer to questions such as: Click How to use a dotted line as a cell border? Click How
-
Chapter 5: Adding AbstractElement objects (part 2)
" to TextAlignment.RIGHT for the second cell. This time, we use the setTextAlignment() method at the level of the Cell (line 6-7). We comp
-
Chapter 3: Using ILeafElement implementations
(5).trim()); document.add(p); } In line 1, we use our CsvTo2DList utilities class to create a resultSet of type List>. In line 2
-
Chapter 3: Using renderers and event handlers | .NET
a background color, nor did we define what the borders should look like. The default values were used. By default, a cell doesn't have
-
Chapter 3: Using renderers and event handlers
. We use a custom RoundedCornersCellRenderer() in line 7. In line 8, we define a padding for the cell content, and we set
-
How to add inline spacing in a PdfPCell?
I need to add space between two parts of a line in a PdfPCell. Chunk chunk = new Chunk("Received Rs(In Words
-
How to add two images in one cell?
to add multiple images to a single cell is by using add multiple times: Table table = new Table(1); table.setWidthPercent(50
-
.Why does the cell background color affect the color of other lines? vLatest
I'm creating a PDF where I add some text to each page as well as 2 lines that are drawn using the following method: private
-
Why does the cell background color affect the color of other lines?
I'm creating a PDF where I add some text to each page as well as 2 lines that are drawn using the following method: private
-
How to create a table in which the cells have different widths?
https://stackoverflow.com/users/5684405/mcs So you want to use iText to create a table that looks like this: Table with cells of differen
-
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 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
-
pdf2Data: Add support for tables using ASCII line symbol separators
In previous versions pdf2Data would fail to recognize tables that use horizontal lines that are drawn using ASCII graphics
-
How to get rid of the top padding in a PdfPCell?
wasted space. But I always seem to have extra space at the top of the cell. This is best illustrated by using
-
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 convert a CSV file to a table with a repeating header row?
(BufferedReader br = new BufferedReader(new FileReader(DATA))) { String line = br.readLine(); // The last argument defines which cell
-
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 set the line width of a clipping path?
= ImageDataFactory.create(imgSrc); Image imgModel = new Image(img); float width = imgModel.getImageScaledWidth(); Click How to set the li
-
Chapter 4: Adding AbstractElement objects (part 1)
shows how it's used. BufferedReader br = new BufferedReader(new FileReader(SRC)); String line; Div div = new Div(); while ((line
-
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 can I use regular and bold in a single String?
I have a String that consists of a constant part and a variable part. How do I get the variable to be formatted using
-
How to create a nested column?
of the cells by using a padding, but those are details. What matters is: how to organize the cells? I've written this small
-
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 resize an Image to fit it into a PdfPCell?
the image (which is what you want). If you want to scale the image, you could use this: Cell cell = new Cell(); cell.add(img[0
-
How to create a list without indentation?
will show, how we can receive the list with indentation. That's a matter of adding a single line to your code: List list2 = new
-
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 set up a table display?
; } Using this method will make your code easier to read and maintain. This is how we create the document and add the table: public
-
How to keep specific words together on one line?
doesn't even fit a line). P.S. Note that there are no Chunks in iText 7. We use Text instances as atomic parts of paragraphs
-
How to create a table with 2 rows that can be used as a footer?
the background of a cell using the setBackgroundColor() method. Take a look at the TableFooter
-
How to create a table with only vertical borders?
the vertical lines. If you are using iText 7 note that now we use Table instead of PdfPTable and Cell instead of PdfPCell. You should
-
How to use Cyrillic characters in a PDF?
assumption. You should use a font file such as Arial.ttf (or pick any other font that knows how to draw those glyphs). Your fourth
-
How to change the line spacing of text?
, it will be 20, and so on. You cannot combine fixed and multiplied leading. You can use only one of them. Click How to change the line
-
How to hyphenate text?
in the cell. But hyphenation is not used. The word "Leistungsscheinziffer" is shown as: Leistungssc //Break here heinziffer My
-
How to format a String resulting in a two-column display?
will adapt to accommodate the content. Note that we use Table and Cell classes in iText 7, not PdfPTable and PdfPCell. Solution #2: use
-
How to rotate a paragraph?
than single line. I cant use table cells either, because the rotation method only allow degrees that are multiples of 90
-
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
-
How to add an image to an existing PDF using AffineTransform?
Why does it work If I use the commented line without the transform, but with the AffineTransform, it does not show up
-
How to use an image as list symbol?
this: Image as a bullet Click How to use an image as list symbol? if you want to see how to answer this question in iText 5. images
-
Why is my cell event not triggered?
behavior of creating/drawing the cell. If you use setNextRenderer() method after adding a cell to the table, it would be triggered
-
How to add "continue on next page" / "continued from next page" to a table?
use Table instead of PdfPTable and Cell instead of PdfPCell. These are the relevant parts: Table table = new Table(5); Cell cell
-
.How to add "continue on next page" / "continued from next page" to a table? vLatest
use Table instead of PdfPTable and Cell instead of PdfPCell. These are the relevant parts: Table table = new Table(5); Cell cell
-
How to create a table based on a two-dimensional array?
); Note that we use Table and Cell classes, because PdfPTable and PdfPCell don't exist in iText 7. The result will look like
-
Argument not specified in iTextSharp
(Border.NO_BORDER); return cell; } Click Argument not specified in iTextSharp if you want to see how to answer this question
-
Tables
a table with only vertical borders? Is it possible to set a different alignment for text on the same line in the same cell? How
-
.How to create a table based on a two-dimensional array? vLatest
); Note that we use Table and Cell classes, because PdfPTable and PdfPCell don't exist in iText 7. The result will look like
-
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
-
Release iText 7.1.1
and new line feed produces incorrect result. [DEVSIX-1662] - Using Leadings Cause Paragraphs to Cross Cell Border. Task [DEVSIX-561
-
Chapter 1: Introducing basic building blocks | .NET
to create a PdfFont instance. You can do this by obtaining a font from the PdfFontFactory (line 5). We use this font object
-
How to nest tables without extending the inner table?
that there are no PdfPTable and PdfPCell classes anymore, you should use Table and Cell instead. Click How to nest tables without extendi
-
Chapter 1: Introducing basic building blocks
a PdfFont instance. You can do this by obtaining a font from the PdfFontFactory (line 5). We use this font object to change the font
-
How to create a table with complex borders?
); drawContext.getCanvas().stroke(); super.draw(drawContext); } } This renderer is used like this: cell = new Cell().add(innertable
-
Chapter 4: Creating reports using pdfHTML
class using the following parameters (line 4): a PdfDocument (Java
-
Adding links in a table cell
=https://github.com/itext/i7js-examples/blob/develop/cmpfiles/sandbox/tables/cmp_link_in_table_cell.pdf>cmp_link_in_table_cell.pdf</a><br/
-
How to add text to an image?
image to a Cell. This Cell will scale the image so that it fits the width of the page. To add the watermark, we use a cell renderer
-
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
-
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
-
How to allow a Unicode subscript symbol in a PDF without using setTextRise()?
to change the displacement of the text with respect to the current line, I cannot use it as I don't know which characters
-
How to draw a borderless table in iTextSharp?
use either cell events or table events, or a combination of both. Click How to draw a borderless table in iTextSharp? if you want
-
Chapter 7: Creating PDF/UA and PDF/A documents
) and a PdfOutputIntent. This output intent tells the document how to interpret the colors that will be used in the document. In line 10,
-
Chapter 7: Creating PDF/UA and PDF/A documents | .NET
close the document. Figure 7.4 demonstrates how using the Table class with Cell objects added as header cells, and Cell objects
-
How do I use pdfRender in a .NET environment?
https://itextpdf.com/en/products/itext-7/convert-pdf-to-image-pdfrender as it does for Java, we do provide a command-line version meaning
-
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 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 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 to add a table in the top-right corner of the page?
7 PdfPTable and PdfPCell classes don’t exist anymore. Use Table and Cell instead. I wrote the RightCornerTable
-
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 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 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 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
-
iText 7 Core: Fixing incorrect height calculation
represented by the bounding box area should be accurate as they can be used to calculate the size of the enclosed content
-
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 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 distribute the radio buttons of a radio field across multiple PdfPCells?
. We use Cell and Table instead. Click this link if you want to see how to answer this question in iText 5. forms tables
-
How to right-align text in a PdfPCell?
: https://itextpdf.com/sites/default/files/rAi47.png Alignments in Cell Click this link if you want to see how to answer this question in
-
How to create a table with rounded corners?
https://stackoverflow.com/users/1833945/andreanobili In iText 7 this is done using cell renderers. You should set such renderer
-
How to add a table as a header?
float[] { 1F }); PdfPCell cell; tabHead.WidthPercentage = 100; cell = new PdfPCell(new Phrase("Header")); tabHead.AddCell(cell
-
Absolute positioning of lines and shapes
vertical gradient in iTextSharp? How to add an image to an existing PDF using AffineTransform? How to fill a rectangle with color
-
How to add an inner table surrounded by text?
, we compose the Cell object of different elements and add it to the main table. Here is the result: Screen shot Note that we use
-
How does a PdfPCell's height relate to the font size?
7 we can work with cells in composite mode only, so we can not work with leading and Ascender / Descender. These values depend
-
How to truncate text within a bounding box?
using: PdfContentByte.showTextAligned(); I'd like to know how I can stop the text overflowing a given region when writing
-
pdfHTML: Line Height property support
inline elements. Browsers use logic to calculate the maximum line height independent of the font, and the minimum value required
-
How to set background image in PdfPCell in iText?
There is no PdfPCell class in iText 7. You should use Cell instead. To set your own custom background you need to extend CellRenderer
-
How to encrypt PDF using a certificate?
. Click How to encrypt PDF using a certificate? if you want to see how to answer this question in iText 5. certificate_encryption
-
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 draw a borderless rounded rectangle?
and 1f. For the rounded rectangles there is still a visible border when the line width is set to 0f, but this is not true
-
Fit text in cell
to tell iText how to clip text to fit in a cell? clipcentercellcontent <div data-pym-src='https://itext.jdoodle.com/embed/itext' data
-
Flexbox suport in pdfHTML
; line-height: 127%; text-indent: 20px; } .bordered{ border: 1px dotted lightgray; padding: 10px; box-sizing: border-box; } .header
-
How to use the full size of a page?
you 13 by 128 user units to add content. This is somewhat consistent with what you experience. Click How to use the full size
-
How to use the font Verdana in PdfStamper?
application. Click How to use the font Verdana in PdfStamper? if you want to see how to answer this question in iText 5. fonts
-
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 to watermark PDFs using text or images?
. Click How to watermark PDFs using text or images? if you want to see how to answer this question in iText 5. watermark
-
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 set the zoom level of a PDF using iTextSharp?
I need to set the zoom level to 75% in a PDF file using iTextSharp. I am using following code to set the zoom level. PdfReader
-
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 divide a page in N parts so we can fill each with a different source?
How can I achieve this using iTextPDF in java? Example So the first half of the page would be in English while the second part
-
How to add blank pages while concatenating several PDFs using PdfSmartCopy
of files, which is why I'm not using it. I've read the answer to the question "How to add blank pages in exist PDF in java
-
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
-
How to delete attachments in PDF using iText?
in the Names dictionary: No embedded files in iText RUPS Click How to delete attachments in PDF using iText? if you want to see how
-
How to fill XFA form using iText without breaking usage rights?
in the PdfDocument constructor. Click How to fill XFA form using iText without breaking usage rights? if you want to see how to answer
-
Chapter 3: Generating PDF based on Media Queries
of a paragraph fit on a page, how to distribute the cells of a table on one or more pages, and where to draw the text
-
Cell and table widths
Examples that explain how to define the dimensions of a table, its columns and its cells. Click How to add a table in the top
-
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 merge forms from different files into one PDF?
and a PdfStamper that I am using to fill out a form. I now have to add another PDF to the end of the form I have been filling out
-
How to close a PDF file to recreate it? (File in use problem)
to recreate it? (File in use problem) if you want to see how to answer this question in iText 5. itext_7 itext_7_community itext_7_core
-
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
-
What does TextPositioning in pdfOCR do?
, but if you're OCRing a book, BY_LINES would be your safest bet. So what is the difference really? Putting it simply, it is how you
-
How to solve an UnsupportedCharsetException when using itext-asian.jar?
and require a font pack in Adobe Reader), you should use KozMinPro-Regular (without the otf). Click this link if you want to see how
-
How to use two different colors in a single String?
Paragraph(); p1.add(blackText); p1.add(greenText); doc.add(p1); doc.close(); } Click How to use two different colors in a single String
-
How to solve an UnsupportedCharsetException when using itext-asian.jar
). Just use the font file with an encoding that is supported by that font program. Click this link if you want to see how
-
Release iText 7.1.11
now have a CLI (Command Line Interface) wrapper around pdfRender, so you can use it outside of a Java only environment. iText
-
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
-
Chapter 6: Using fonts in pdfHTML
Up until now, we haven't spent much attention to the fonts that were used when we converted HTML to PDF. We know
-
How to use a text extraction strategy after applying a location extraction strategy?
> This will filter only the text where the PostScript font name ends with Bold or Oblique. This is how you use this filter: <div data
-
Alignment, indentation, leading and spacing in cells
Examples written in answer to questions such as: Click How to maintain a paragraph's indentation inside a table cell? Click
-
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 use a Digital Signing Service (DSS) such as GlobalSign, with iText 7
and provider of Identity Services. In this tutorial we will demonstrate how to use the GlobalSign API and iText 7 Core to sign a PDF
-
Why doesn't getDefaultCell().setBorder(PdfPCell.NO_BORDER) have any effect?
of the cell on the cell itself. Concept 2: you allow iText 7 to let the Cell use a Style object: Style style = new Style() .setBorder
-
How to invoke a page break for nested tables?
that there are no PdfPTable and PdfPCell classes anymore. We use Table and Cell instead. Click this link if you want to see how to answer
-
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
-
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
-
Table events
different border types for a single cell? How to add a table in the top-right corner of the page? How to get text and image
-
How to merge documents correctly?
Is there some way to detect the page size and then use that same page size for those documents? Or, if not, is it possible
-
How to embed a font only partially?
this line: font.setSubset(false); However, this value will be ignored in case you use the encoding Identity-H because that's how it's
-
.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 change the text color of an AcroForm field?
LifeCycle. I am able to fill the fields using iTextSharp but when I change the text color for a field it does not change. I
-
How to create a pushbuttonfield with double byte character text?
1 font Helvetica. This font doesn't know how to write Japanese. I used the font freesans.ttf. If you don't have that font, you
-
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 can I log the number of documents / bytes I've processed?
I want to log the number of documents I've processed using iText, as well as the number of bytes I've read or produced
-
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 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 create a clickable polygon or path?
QuadPoints ;-) Allow me to explain how QuadPoints are used by showing you the AddPolygonLink
-
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
-
Chapter 6: Creating actions, destinations, and bookmarks
)); list.add(li); } document.add(list); In line 21, we create a URI action using a link to IMDB and we set the action
-
How to fit a String inside a rectangle?
some strings, images and tables into my pdf file (there have to be several pages) but when I try to use ColumnText (I use
-
iText 7: Converting HTML to PDF with pdfHTML
pages to PDF, yet that was how many developers tried to use it. This caused plenty of frustration because HTMLWorker didn't
-
How to add an x-offset to a text pattern with every x-step?
with every printed line of the pattern to add a horizontal offset. Is there a way to increase the xStep parameter of the pattern? I am
-
How to merge PDFs and add bookmarks?
use the PdfOutline class like this: PdfOutline helloWorld = rootOutline.addOutline("Hello World"); helloWorld.addDestination
-
How to change the color of a circle annotation?
I am adding a SquareCircle annotation to an already existing PDF using iTextSharp in C#. Now I want to change the Fill Color
-
Font examples
https://github.com/itext/i7js-examples for Java and i7ns-samples https://github.com/itext/i7ns-samples for .NET (C#). How can I use
-
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
-
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
-
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
-
Support for linearGradient Color Scheme in Layout, CSS and SVG
for how to use this functionality with pdfHTML, we've created a separate article
-
How to resize a PdfPTable to fit the page?
, regardless of the amount of content in the cells. Is there a way to do this? I am generating a document that contains a table. I need
-
Chapter 2: Adding content to a Canvas or a Document
: Line 1: we define a PdfDocument, Line 2: we don't use a Document object, so we have to create each PdfPage in our own code, Line
-
How to reduce redundant code when adding content at absolute positions?
This is part of a vb.net http://vb.net app that uses the itextsharp library: Dim cb As PdfContentByte = writer.DirectContent
-
How to introduce a custom font weight in iText 7?
: you don't use Arial regular to which you apply a style, you switch to another font in the same family: Arial Bold. A font program
-
Chapter 2: Adding low-level content | .NET
(line 6). We’ll use this canvas object to create a sequence of PDF operators and operands. As soon as we’ve finished drawing
-
pdfOffice: Improved line space calculation
In pdfOffice 1.0.0 there was an issue where in certain cases extra line spaces would be added within specific sections
-
Chapter 7: Handling events; setting viewer preferences and printer properties
(PdfName.Rotate, rotation); } } The default orientation will be portrait (line 2), but we can change this default using
-
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 do I load a license key?
), you'll need to use version 1.x.y of the license key library. To load your license key, use the following line of code: Java
-
Why is my content overlapping with my footer?
); Now you have a bottom margin of 55 user units and the line you draw at 50 user units no longer overlaps. Note: I use the term
-
Release iText 7.1.4
for Pages entry in Catalog. Optional content requirements in PDF/A. Copying AcroForm fields with a dot in their name. Post-care
-
Absolute positioning of text
alignment? How to write a Zapfdingbats character at a specific location on a page? How to rotate a single line of text? How
-
Chapter 5: Manipulating an existing PDF document
use this array to update the options of the "shift" field (line 17). line 19-21: we create a new PdfFont and we use this font
-
Chapter 5: Manipulating an existing PDF document | .NET
than the form originally contained (line 8-15). We convert this List to a PdfArray (line 16) and we use this array to update
-
Image examples
types are supported by iText? How to use an image as list symbol? How to prevent images from resizing in a table cell? How to add
-
Chapter 2: Adding low-level content
with a default or specific page size, we create a PdfPage (line 3) with a specific PageSize (line 2). In this case, we use an A4
-
Chapter 6: Reusing existing PDF documents
), and we get its dimensions (line 4). We then add three pages to the new PDF document: We add an A4 page using landscape orientation
-
Chapter 6: Reusing existing PDF documents | .NET
(line 3), and we get its dimensions (line 6). We then add three pages to the new PDF document: We add an A4 page using landscape
-
Chapter 4: Making a PDF interactive
); If you want to create a PDF form using iText, you now have a fair idea of how it's done. In many cases, it's a much better idea
-
Chapter 4: Making a PDF interactive | .NET
)); form.AddField(button); If you want to create a PDF form using iText, you now have a fair idea of how it’s done. In many cases
-
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
-
How to prevent the resizing of pages in PDF?
. https://stackoverflow.com/users/2064134/cristi-b Please add the following line to your code. This line will make sure that the page
-
Underline and strike-through in a cell
This example was written in answer to the question Click How to strike through text using iText? simpletable6 <div data-pym
-
How do the measurement systems in HTML relate to the measurement system in PDF?
https://stackoverflow.com/questions/14586315/how-to-get-the-userunit-property-from-a-pdffile-using-itextsharp-pdfreader If you live in th
-
pdfHTML: Using emojis in iText
'> </div> In the link included below you’ll find more information related to what Unicode values are and how they are used
-
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
-
General questions about iText
specific words together on one line? Why do I get a message saying 1.not.found.as.a.resource? How to increase the accuracy
-
Which PDF filters are used to encode data?
are used to encode data? if you want to see how to answer this question in iText 5. filters compression itext_7 itext_7_suite
-
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 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
-
Page events
that can be used as a footer? How to add text as a header or footer? How to draw a line every 25 words?
-
Part IV - Appearances
the signers have different roles. The iText signing API does allow creating such a presentation. You have the choice of using one
-
Installing iText free trial for Java and .NET developers
. Loading a license will display a producer line on PDFs, which you can check to ensure you are using the correct license type
-
Use cases
blockchain client. It's easy to imagine how this system can be used to automate all kinds of workflows. Port of Antwerp The port
-
Chapter 1: Introducing fonts
().add(title).add(" by ").add(author); document.add(p); document.close(); In line 1, we create a PdfDocument using a PdfWriter
-
Advantages of using Blockchain for Signing PDF documents
of the system could be human beings, companies, or systems used within companies (such as a CRM, an ERP, a DMS
-
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
-
Using forms for reporting
A series of examples that allow you to create reports using forms. These examples were used to answer questions such as: Click
-
.Using forms for reporting vLatest
A series of examples that allow you to create reports using forms. These examples were used to answer questions such as: Click
-
How to define multiple actions for a PushbuttonField?
case with the upper while using methods. Click How to define multiple actions for a PushbuttonField? if you want to see how
-
Installing the iText license key and license key library for Java and .NET
on PDFs, which you can check to ensure you are using the correct license type. The producer line is (in the case of iText 7) “iText
-
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
-
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
-
pdfHTML: Support for overflow-wrap, word-break CSS Properties
Background: The word-break property is utilized to specify how line breaks are inserted within text elements. In the following
-
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 extract embedded streams?
filters are supported in iText. Take for instance /DCTDecode which is the filter used to store JPEGs inside a PDF. Why and how
-
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
-
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
-
How to create a new PDF file if a file name already exists?
then sort these names to find the name with the highest number. See How to list latest files in a directory using FileNameFilter
-
How to decrypt a PDF document with the owner password?
https://raw.githubusercontent.com/itext/i5js-sandbox/master/resources/pdfs/hello_encrypted.pdf that I will use in the first example demon
-
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 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 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
-
How to get the co-ordinates of an image?
How do I know whether the extracted image is the same as an image present in database, and the co-ordinates of the image
-
How to 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 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 print mathematical characters like ?, ?, ?, ?, ? ?, ??
use notations such as \u2208, \u2229, \u2211, \u222b, \u2206. That's not a must, but it's good practice. This is how it should
-
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
-
Why does my header overlap with my content?
. According to this value you will use this line: doc.setMargins(20 + handler.getTableHeight(), 36, 36, 36); The result looks like
-
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?
I am trying to find out which format a date of birth should have in a empty field in a PDF using iText. I can stamp the field
-
How to set initial view properties?
Options: Show = Document Title I tried to achieve this using the following code: PdfStamper stamper = new PdfStamper(reader, new
-
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
-
Release iText Core 7.2.0
in ParagraphRenderer Prevent empty producer line logic No list symbol indention for "Right to left" text Layout: Cell with big rowspan ca
-
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 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 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 apply color to Strings in a Paragraph?
positioned by iText, once positioned by ourselves by defining coordinates using a Rectangle: Colored text Click How to apply
-
What's an easy to print "first right, then down"?
on page 5 and cells N11 to Z15 on page 6. Click this link if you want to see how to answer this question in iText 5. faq Published
-
How to add an image watermark to a PDF file?
My problem is that in some PDF files no watermark is added although the file size increased. Why is that? I'm using C
-
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 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 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 display indian rupee symbol?
like this: ?). Note that it's very important to check if the font you're using knows how to draw the symbol. If it doesn't
-
How to choose the optimal size for a font?
() (if you didn't define a font for the Text, the default font Helvetica with the default font size 12 will be used). Click How
-
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 to check a check box?
iTextSharp.text.pdf.PdfReader(originalFormLocation); using (var stamper = new iTextSharp.text.pdf.PdfStamper(reader,ms)) { var
-
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
-
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
-
How to generate and design PDFs with iText or iTextSharp?
design? Originally I thought that I would use HTML markup to generate a PDF, but why even use a HTML markup or a template file
-
How to send a 'success' response back to Acrobat Reader from a java servlet?
or application/vnd.fdf? AFAIK both are possible. Note that you can also use an annotation instead of JavaScript. Click How to send
-
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 to stamp image on existing PDF and create an anchor?
, 100); image.setAnnotation(new Annotation(0, 0, 0, 0, 3)); content.addImage(image); stamper.close(); Any idea how to do
-
How to add a border to a paragraph?
I've created a Paragraph using iText. Now I have to add a border to this paragraph, not to the whole document. How do I do
-
How to get the UserUnit from a PDF file?
for your question: suppose you have an existing PDF, how do you find which user unit was used? Before we answer this, we need
-
Release pdfHTML 3.0.1
. This is a commonly used element in both CSS and SVG frameworks allowing for progressive transitions between colors in graphical objects
-
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
-
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 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 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
-
How to add a cover page to an existing PDF document?
to preserve these properties, it would be better to use PdfMerger class. Click How to add a cover page to an existing PDF document
-
Cell heights
These examples were written in answer to questions such as: Click How do setMinimumSize() and setFixedSize() interact
-
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
-
How to draw lines on an image?
control. How is this done? Posted on StackOverflow on Apr 10, 2015
-
How do I get an object if I have its indirect reference?
I would like to analyze the individual radio buttons. I am using iTextSharp to analyze a form enabled PDF. I know how
-
How to 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 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
-
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 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 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 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 can I read Roman page numbers?
Should I use labels or annotations to get Roman page numbers instead of indexed page numbers? In Adobe Reader, the first pages
-
How to rotate a page while creating a PDF document?
->top. I want to produce a PDF with pages in landscape. While I can set the size of the page to landscape using
-
How to create a complex PDF document?
and convenient way of doing that? I have tried XSL to PDF conversion HTML to PDF conversion using itext. the crude Java way
-
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
-
Where is the origin (x,y) of a PDF page?
are the /BleedBox, /TrimBox and /ArtBox. These have been defined for specific purposes, but they aren't used that often anymore
-
How do I add XMP metadata to each page of an existing PDF?
a GUID to each page's XMP using the stamper. Posted on StackOverflow on Feb 10, 2015
-
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 can I find the maximum character limit for a text field?
how many characters fit in case the form tells you that the content is added using a monospace font. Click this link if you
-
How to insert a "linked rectangle" with iText?
of PdfAnnotation, you can add it to a specific page using the addAnnotation() method. Click this link if you want to see how to answer
-
How to extend the page size of a PDF to add a watermark?
https://raw.githubusercontent.com/itext/i5js-sandbox/master/resources/pdfs/primes.pdf document. This is the source file we are going to u
-
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 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 create and apply redactions?
Is there any way to implement PDF redaction using iText? Working with the Acrobat SDK API I found that redactions also just
-
Forms module changes
extends AbstractTextFieldRenderer instead of BlockRenderer. We can create one-line push button by using public Button
-
How do I insert a hyperlink to another page in an existing PDF?
on that page. You can use the similar methods in iTextSharp. Click this link if you want to see how to answer this question
-
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 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 send a file to the server through a PDF?
this selected file to server? I'm dynamically creating some PDF files through my application, and I need to use several components
-
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
-
Release pdfXFA 4.0.0
to table cells, and one where content was drawn outside of the page area. If you need to process XFA documents, we have a related
-
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 add an image to an AcroForm field?
I'm trying to fill out a PDF form using the AcroFields class. I'm able to add text data perfectly, but I'm having issues
-
How to underline a portion of text in a text field?
I have an application that uses iText to fill PDF form fields. One of these fields has some text with tags. I need the text
-
How can I serve a PDF to a browser without storing a file on the server side?
send bytes directly like this. It's safer to create the file in memory using a ByteArrayOutputStream and to tell the browser how
-
How can I add titles of chapters in ColumnText?
this: And then add TOC to this document. I create the document using ColumnText and PdfPTable objects, but I can't add a Chapter to creat
-
How to create a link to a specific page number?
should take to 6th page. I know how to target any text of any PDF page using code: Anchor click = new Anchor("Click to go
-
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 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 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 add a watermark to a page with an opaque image?
Is it possible to add a watermark that will be transparent on top of an image? I currently use: PdfContentByte canvas
-
How to 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 JavaScript action to open the attachments panel?
This can be done using a JavaScript action. Use the following code in iText 7: public void createPdf(String dest) throws
-
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 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 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 remove text from a PDF?
, urx = 480, ury = 445] (where ll stands for lower-left and ur stands for upper-right). We can now use the following code
-
What does "Not LTV-enabled" mean?
, and Adobe Reader X and XI accept the addition and use it happily. Click this link if you want to see how to answer this question
-
How to generate 2D barcode as vector image?
Why are our barcode pages coming out completely black? I am generating 2D barcodes using iText API, but these barcodes
-
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
-
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
-
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
-
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 can I generate a PDF/UA compatible PDF with iText?
We have a number of dynamically generated PDFs on our site that were created using iText 2.1.7. However, we also have a large
-
How to check for an event and remove it?
, PdfDocumentEvent.REMOVE_PAGE, PdfDocumentEvent.END_PAGE) using hasEventHandler(String type) method. To remove an existing page event, yo
-
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 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 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 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 add a new form from an existing PDF template?
. I tried using PdfStamper but the resulting PDF is not template. Posted on StackOverflow on Sep 11, 2013
-
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 to make a single letter bold within a word?
at the second screen shot in my answer to the following question: How to use Cyrillic characters in a PDF?. You'll understand that your
-
How to get specific types from AcroFields? Like PushButtonField, RadioCheckField, etc
the appearance of existing element using: setCheckType(int checkType). Click this link if you want to see how to answer
-
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
-
How can I add a new AcroForm field to a PDF?
I have used iText to fill data into existing AcroForm fields in a PDF. I am now looking for a solution to add new AcroForm
-
How to 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 reorder the pages of a PDF file?
https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/stamper/ReorderPages.java example. There i
-
How to add text as a header or footer?
()) - 20) .showText("this is a footer") .endText() .release(); } } There is no ColumnText class in iText 7 anymore, so we use
-
How to get the page number of an arbitrary PDF object?
I am trying to find the page number of a PDF object using iText's Java API. The following code reads in the PDF file, and gets
-
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 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 avoid an exception when importing a TIFF file?
aren't used, you'll need to use one of the create() methods with the recoverImage flag set to true if you want iText to try
-
How to extract text and anchor information from a PDF?
I am looking for a method to extract the text as well as anchor information using iText. For example: the PDF content is "You
-
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
-
How to calculate the height of an element?
https://github.com/itext/i7js-book/blob/develop/src/main/java/com/itextpdf/samples/book/part1/chapter03/Listing_03_07_FoobarFilmFestival.
-
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 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 change the author name for comments?
over the annotations of a page and change the title (if it equals to "iText"). We use PdfDocument to persist the changed PDF
-
How to create a document with unequal page sizes?
https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/objects/UnequalPages.java example for you
-
How to create a TOC when merging documents?
destination. We use p followed by the page number as its name. We'll use these named destinations in an extra page
-
How to convert colored images to black and white?
", or "An error exists on this page" upon trying to open the resulting PDF. What am I doing wrong? I'm trying to compress PDFs using
-
How to crop out a part of PDF file?
. This is the current code I'm using to crop the page. PdfRectangle rect = new PdfRectangle(55, 0, 1000, 1000); PdfDictionary pageDict
-
Release pdfOffice 1.0.0
and PowerPoint files, with Excel support in development. Supported file types are doc, .docx, .dotx, docm, .dotm, .dot, .ppt, .pptx, .pot
-
How can I add an image to all pages of my PDF?
I have been trying to add an image to all pages using iTextSharp. The image needs to be OVER all content of every page. I have
-
How to disable the save button and hide the menu bar in Adobe Reader?
and file menu using below code stamper.setEncryption( null,null, PdfWriter.HideWindowUI, PdfWriter.STRENGTH40BITS
-
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
-
How to create an uncompressed PDF file?
about the compression used to output the individual PDF objects into the stream. Do you think this is possible with iTextSharp
-
How to attach files to a PDF?
= PdfAction.createGoToE(PdfExplicitDestination.createFit(1), false, target); You can use this action for an annotation, a Text
-
How to add text at an absolute position on the top of the first page?
How can I add text automatically to the 1st page, instead of the last? I have a script that creates a PDF file and writes
-
How to add 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 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 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 create a pop-up window to display images and text?
, PdfAction.JavaScript("app.alert('action!')", stamper.Writer)); The above code is used to display an alert and I want to customize
-
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
-
Adding backgrounds using page events
Examples written in answer to questions such as: Click How to change the color of pages? How to draw a border for PDF pages
-
Release pdfCalligraph 2.0.7
https://github.com/NightOwl888/ICU4N!), we now support correct line breaks with these languages. Don't forget that aside from iText 7 Cor
-
Release iText 7.0.5
] - Improve tagging for rows and cells in case Table model element role is set to null [DEVSIX-1466
-
pdfOffice - Example
supported file types are: .doc, .docx, .dotx, docm, .dotm, .dot, .ppt, .pptx, .potx, .pptm, .potm, .ppsx, .ppsm, .pot, .pps
-
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 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 to define the page size based on the content?
(); And then we can use received tableHeightTotal in creating a new document and setting zero margins to our document: Document doc2 = new
-
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 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
-
Which version of the license key library should I use?
This depends on which version of iText you are using: If you're using iText Suite version 7.2 (or newer) you'll need to use
-
How to make a particular sub-string Bold when converting HTML to PDF?
I am using iText in Java to convert a HTML to PDF. I want a particular paragraph which has some words as Bold and some as Bold
-
How to create a PDF with font information and embed the actual font while merging the files into a single PDF?
create PDFs using this code snippet: public void createPdf(String filename, String text, boolean embedded, boolean subset
-
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 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 add JPEG images that are multi-stage filtered (DCTDecode and FlateDecode)?
to use the first sample. Click this link if you want to see how to answer this question in iText 5. faq Published by Scroll Versions
-
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
-
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 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 continue field output on a second page?
to work it so that if the field's content overflows, then the program will use a second instance template as a second page
-
Images that use different filters
Read more about these examples in the Q&A entry Click How to add JPEG images that are multi-stage filtered (DCTDecode
-
pdfCalligraph: Support wrapping at word boundaries for languages which don't use spaces for word separation
Introduction Some languages don't use spaces to separate words and instead use spaces to only separate sentences. Languages
-
How to read bookmark titles?
code works for the top-level, but if you want to see all the titles, you need to use a recursive method that also looks
-
How to check if a font is bold?
of making text appear bold, and is it possible to detect it using iTextSharp? Posted on StackOverflow on Jan 21, 2015
-
How to allow page extraction when setting password security?
with the owner password. Please update your question as soon as you find a way to set this permission with Acrobat. I'm using Acrobat
-
How to add a printable or non-printable bitmap stamp to a PDF?
to viewer. You want to use an image instead of one of these predefined stamps. This is shown in the AddStamp
-
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
-
Release iText 7.1.6
in SVG. [DEVSIX-2545] : Avoid breaking a line at a hyphen when it is used as a date separator. [DEVSIX-2616] : Specific
-
Installing iText for Java
How to install iText Java version Thank you for your interest in our open-source PDF library, we hope you will enjoy using our
-
How to get the page width and height of a PDF document?
I have a PDF, and I want to get the width and height of each page using iTextSharp. This is what I have so far: string source
-
Alternatives to using a PdfPTable
Examples written in answer to the question Click How to format a String resulting in a two-column display? simpletable13 <div
-
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
-
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
-
Release iText Core 7.2.4
https://api.itextpdf.com/iText7/dotnet/latest/classi_text_1_1_kernel_1_1_pdf_1_1_tagutils_1_1_accessibility_properties.html) instead of o
-
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
-
Release pdfOffice 2.0.4
the pdfOffice add-on is currently only available natively for Java, you can access its functionality using the iText 7 Suite BYOL
-
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
-
How can I find the border color of a field?
when we look inside the resulting PDF using iText RUPS https://itextpdf.com/Products/itext-rups, and we take a look at the field
-
How to add alternative text for an image in Tagged PDF?
in an existing tagged PDF without changing anything else? I need to implement this feature in a program without using GUI
-
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
-
.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
-
Release pdfCalligraph 3.0.1
. In this 3.0.1 release we have made improvements to the support for Urdu (used in Pakistan and India), particularly when dealing
-
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
-
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
-
Cell borders (without cell or table events)
coloredborder <div data-pym-src='https://itext.jdoodle.com/embed/itext'
-
Interactive forms
create a Reader-enabled PDF using iText? How to format a field as a currency? How to create a pushbuttonfield with double byte
-
Manipulating existing PDFs
that use of extended features is no longer available? How to add a watermark to a page with an opaque image? How to watermark
-
pdfOCR: If your scanned document has a mixture of sections with paragraphs and tables, what is a recommended strategy here?
be better to use BY_WORDS or BY_LINE, we would recommend using the BY_WORDS strategy, as it would still allow you to group words
-
Release iText 7.0.6
using convertToElements() method of pdfHtml. [DEVSIX-1689] - IOException: Invalid code encountered while decoding 2D group 4
-
Release iText Core 7.1.15
performance of the layout module for better processing of extremely large block elements and correct rendering of a table's cells
-
Release iText 7.1.8
https://github.com/itext/i7ns-samples/blob/develop/itext/itext.samples/itext/samples/sandbox/acroforms/FillFormListXfdf.cs New features X
-
Actions and annotations
the zoom level of a PDF using iTextSharp? How to create a clickable polygon or path? How to change the properties of an annotation
-
Release pdfOffice 2.0.0
irregularly numbered pages, and also improved line spacing calculation for converted documents. Please see the example linked below
-
Release pdfHTML 5.0.0
a direct mechanism to specify a unique color for each line type, by using text-decoration-color you can achieve this effect. Release
-
Does a PDF file have styles, headers and footers?
headers and footers, just like they don't have paragraphs, section titles, table rows or table cells. Everything you see in a PDF
-
Questions about PDF in general
? How to close a PDF file to recreate it? (File in use problem) Why are PDF files different even if the content is the same? How
-
Content parsing, extraction and redaction of text
to remove text from a PDF? How to use a text extraction strategy after applying a location extraction strategy? Why can't I extract
-
Chapter 1: Hello HTML to PDF
. In this tutorial, we'll use an HTML String, a path to an HTML file, or – in chapter 4 – a path to an XML file along with the path to an
-
pdf2Data: Grouping of extracted values in XML
to versions prior to the release of iText pdf2Data 3.1.1. If you are using that version or later, see this updated article
-
ColumnText and the font ascender
For more info about this example, read the answer to the question Click How to adapt the position of the first line
-
.ColumnText and the font ascender vLatest
For more info about this example, read the answer to the question Click How to adapt the position of the first line
-
Release pdf2Data 2.1.11
on, pdf2Data is able to recognize tables which use ASCII horizontal line symbols as separators. Surprisingly, such ASCII-made tables
-
Release pdfHTML 4.0.5
-align CSS property for inline blocks. This property can be used to align inline-block elements vertically, for more details
-
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
-
Release iText Core 7.2.3
dimensions using exponent notation, and revised the way PDF streams with indirect references are flushed. Plus, we have the usual round
-
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
-
Before we start: installing iText 7
the jars from the Central Maven Repository. We have made some simple videos explaining how to do this using different IDEs: How
-
Digital Signatures Hub
of invoicing fraud. These issues and many more can now be solved by Blockchain. This eBook focuses on how you can use Blockchain
-
Release iText 7.1.5
/width/...) to a line even if in the end the chunk is moved to another line. [DEVSIX-2525] : FontProvider in layout cannot be used
-
Release pdfCalligraph 2.0.8
https://itextpdf.com/en/products/itext-7/itext-7-core by itself, you can also use pdfCalligraph https://itextpdf.com/en/products/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
-
Why do I get an "InvalidPdfException: PDF header signature not found"?
pdf files. The code fails at the line : iTextSharp.text.pdf.PRTokeniser.CheckPdfHeader
-
Page events for Chunks
These examples were written in answer to questions such as: Click How to draw a line every 25 words? dashedunderline <div data
-
List object in cell
A couple of List and ListItem examples. listincell <div data-pym-src='https://itext.jdoodle.com/embed/itext'
-
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
-
pdfOCR: How to OCR an Image to PDF?
PdfWriter(OUTPUT_PDF)) { ocrPdfCreator.createPdf(LIST_IMAGES_OCR, writer).close(); } } }</div> <div data-script-type="csharp">using
-
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 get the current page count?
: pdfDoc.getNumberOfPages(); Click How to get the current page count? if you want to see how to answer this question in iText 5. page_numb
-
I have been using iText 5 or 7 without a commercial license but never open sourced my application. What should I do?
using the iText SDK. We can work with you to help bring you into compliance. It may be possible for us to issue you a back-dated
-
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 do I create a separate OCR layer?
with all bells and whistles turned on (all previously listed options being used): don't forget to specify the path to your
-
Multiline fields
Examples with multi-line text fields. Click How to get the row count of a multiline field
-
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
-
pdfOCR: How to OCR an Image to PDF/A-3u?
", is); } }</div> <div data-script-type="csharp">using System.Collections.Generic; using System.IO; using iText.Kernel.Pdf; using
-
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 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
-
Inspect a PDF
https://github.com/itext, then they should target the latest version, and you can get access to specific versions by using the Tags
-
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
-
Release pdfCalligraph 3.0.0
, where diacritical and other marks are used to modify the sound or meaning of characters, complex glyph positioning becomes an issue
-
How to parse multiple HTML files into one PDF?
where answer #1 is preferred. Test data: in both answers, we are going to reuse HTML files we have used in previous examples
-
Chapter 2: Defining styles with CSS
In the previous chapter, we looked at different snippets of Java code. In this chapter, we'll use the same snippet for every
-
How to add a table on a form (and maybe insert a new page)?
https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/acroforms/AddExtraPage.java example writte
-
Adding images to a table
? https://kb.itextpdf.com/home/it7kb/faq/how-to-precisely-position-an-image-on-top-of-a-table Click How to add two images in one cell
-
Why is the text I extract from an English PDF page garbled?
of the glyphs differs for text on the same line). In that case, you can try the SimpleTextExtractionStrategy which will return
-
pdfOffice: enabled parallel conversion
statics. How it works To use the multithreading functionality, all you need to do is to call one of the OfficeConverter
-
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 make sure a check box is printed?
with this problem in iText 7. Click How to make sure a check box is printed? if you want to see how to answer this question
-
How to 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 extract a page number from a PDF file?
, not only with iText, Tika, PdfBox, or any other tool you might try). Click How to extract a page number from a PDF file
-
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
-
Release iText 7.0.3
https://jira.itextsupport.com/browse/DEVSIX-1231: Text Alignment using pdf2html : content is not justified DEVSIX-1233
-
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 render certain HTML entities (such as arrows) to PDF?
and FreeSerif are used instead. Special characters in a PDF The HTML code uses HTML entities to represent these special symbols
-
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
-
Which languages are supported in pdfHTML?
with a combination of Chinese and English text, you will only see the English text, unless you provide a font that knows how
-
Why 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
-
Release iText 7.0.8
when using brackets. [DEVSIX-1937 https://jira.itextsupport.com/browse/DEVSIX-1937] : Hyphenation - Paragraph width
-
Can I convert an HTML form to a PDF?
FileStream(dest, FileMode.Create, FileAccess.Write), properties); } Because of the line properties.setCreateAcroForm(true
-
How to convert HTML containing Arabic/Hebrew characters to PDF?
, and Hebrew in this text. We'll use a different font file for each of these languages. public static final String[] FONTS = { "src/main
-
pdfOffice: improved conversion of docx files with repeating table header on new page
of the cells in the table header. This has now been resolved. Below is a Java example demonstrating such a conversion: Java public
-
What is the size limit of pdf file?
I am using iTextSharp in a web application to generate PDF files. These PDF files contain .tiff images taken from a folder
-
pdfHTML: Support for linearGradient in CSS and SVG
https://kb.itextpdf.com/home/it7kb/examples/support-for-lineargradient-color-scheme-in-layout-css-and-svg we demonstrated how to use this
-
Which image types are supported by iText?
I want to add a PNG image to a PDF file, but I've read that PNG files aren't supported in PDF. Does this mean that I can't use
-
Why 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
-
Volume Counter FAQs
https://itextpdf.com/en/resources/faq/technical-support/itext-5-legacy/how-can-i-log-number-documents-bytes-ive-processed. How can I use
-
What is the difference between iText, JasperReports and Adobe LC?
LC, Jasper Reports, etc. I would like to know the exact advantage / disadvantage of using each of them. Currently I am using
-
How can I load a font from /WEB-INF/resources/fonts/foobar.ttf?
the server is configured to expand the WAR straight into memory instead of on local disk file system, or uses a virtual file system
-
How to add a border to a PDF page?
PageBorderEventHandler()); Click this link if you want to see how to answer this question in iText 5. faq Published by Scroll
-
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
-
Forms in iText Core 8.0.0
Creating form fields using AcroForms is now much improved with iText Core 8.0.0. Rather than needing to specify the exact
-
PDF and Digital Signatures
, non-repudiation, and the time of signing can still be validated on the long term. Let's find out how this works, step by step
-
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 much does it cost to upgrade iText 5 to iText 7?
jar (or DLL), we have split iText into several independent parts. You pay only for the parts you use, and your application only
-
iText 7: Building Blocks
building blocks are available and how they all relate to each other. Throughout the book, we'll use the following symbols
-
Release iText 7.1.2
https://jira.itextsupport.com/browse/DEVSIX-1807] - Producer line not set correctly [DEVSIX-1808 https://jira.itextsupport.com/browse/DEV
-
.How to add a border to a PDF page? vLatest
PageBorderEventHandler()); Click this link if you want to see how to answer this question in iText 5. faq
-
Installing iText pdfOCR for .NET developers
How to install pdfOCR .NET version Thank you for your interest in our OCR add-on - pdfOCR, we hope you will enjoy using our
-
Installing iText pdfHTML for .NET developers
How to install pdfHTML .NET version Thank you for your interest in our HTML and CSS to PDF converter add-on - pdfHTML, we hope
-
Installing iText pdfSweep for .NET developers
How to install pdfSweep .NET version Thank you for your interest in our pdfSweep redaction add-on, we hope you will enjoy
-
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
-
Release pdfHTML 3.0.5
of pdfHTML is the support of the attr() CSS function. This is used to retrieve the value of an attribute of the selected element
-
How do we define an application?
application, it could be argued that that is a single application. Your iText account executive can help clarify specific use cases
-
How to hide the Adobe floating toolbar when showing a PDF in browser?
built using iText), as well as the URL. Posted on StackOverflow on Oct 5, 2012
-
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
-
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
-
Installing iText pdfSweep for Java developers
How to install pdfSweep Java version Thank you for your interest in our pdfSweep redaction add-on, we hope you will enjoy
-
Installing iText pdfHTML for Java developers
How to install pdfHTML Java version Thank you for your interest in our HTML and CSS to PDF converter add-on pdfHTML, we hope
-
Installing iText pdfOCR for Java developers
How to install pdfOCR Java version Thank you for your interest in our OCR add-on pdfOCR, we hope you will enjoy using our
-
pdfHTML: support for CSS4 device-cmyk example
-dependent CMYK colors in pdfHTML 4.0.4 by using CSS syntax. We did this by allowing users to define colors using the device-cmyk
-
Why is iText embedding a font even when I specify not to embed?
Why does NOT_EMBEDDED option still embed the font ? I am using Noto fonts to create a PDF and evaluating embedding versus
-
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
-
Installing iText pdfOptimizer for .NET developers
How to install pdfOptimizer .NET version Thank you for your interest in our optimizer add-on - pdfOptimizer, we hope you
-
Release iText 7.1.3
processing by other iText tools. The libraries that currently use it are the SVG core module and the pdfHTML add-on. SVG: because
-
Why are PDF files different even if the content is the same?
using the exact same code, there will be small differences between the two resulting files. That's inherent to the PDF format
-
Why iText and Blockchain?
. https://federalnewsradio.com/management/2017/09/naras-draft-strategic-plan-leaves-pen-and-paper-records-management-in-digital-dust/ Prin
-
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
-
Flatten XFA using pdfXFA
flattenxfadocument <div data-pym-src='https://itext.jdoodle.com/embed/itext'
-
Part I - Overview and Simple Cases
with how iText builds a CMS signature container for your simple signature values and you want to do that yourself. In later
-
pdfHTML: Bézier Curve Improvements
Background: With the 7.1.16 release of iText Core and 3.0.5 of pdfHTML have come some improvements to how Bézier curves
-
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
-
Part II - Proprietary APIs and Custom Providers
” https://itextpdf.com/en/blog/technical-notes/using-itext-7-and-aws-kms-digitally-sign-pdf-document which explains how to use the Key Man
-
Chapter 5: Custom tag workers and CSS appliers
of a tag Up until now, we've always implicitly used the DefaultTagWorkerFactory (Java
-
Is it safe to remove XFA?
https://stackoverflow.com/users/3501223/user3501223 There are three types of forms in PDF: Forms using AcroForm technology. In this case,
-
Why aren't my fonts getting registered?
I have 156 TTF files under my /usr/share/fonts directory tree. Why aren't these being registered? I have a program using
-
Installing iText Community for .NET developers
How to install iText Community .NET version Thank you for your interest in our open-source PDF library, we hope you will enjoy