Questions tagged [itext7]

Library to create and manipulate PDF documents in Java and C#. Use this tag for code using iText version 7 and higher. Use the "itext" tag for older versions up to 5.5.x. Remember to also add a tag for the language you're using.

Filter by
Sorted by
Tagged with
0 votes
1 answer
21 views

C# - iText7 - Watermarking (stamping) HTML over PDF

This proved to be pretty difficult, as I cannot wrap my head around this being a newbie in C#. I have this function: ... var font = PdfFontFactory.CreateFont("assets/fonts/default.ttf", ...
GettingPleasure's user avatar
0 votes
0 answers
35 views

How to add table of contents into title page in itext7 with c#?

I want to insert a TOC in a Cell on my title page. I need to generate the content first, before I know what the data of the TOC is. But, when I add content to the cell, it just stays blank in the ...
Thompson's user avatar
0 votes
1 answer
52 views

IText pdf reader throwing exception "IndexOutOfBoundsException"

I am using IText pdf reader to read pdf file but for few of the pdf file I am getting "IndexOutOfBoundsException". below is the code com.itextpdf.text.pdf.PdfReader reader = new com.itextpdf....
Babu's user avatar
  • 442
0 votes
1 answer
14 views

Implementing HTML Element Pagination with Java iText Library

I am working on an iText report where I need to transfer HTML content to another page in a PDF document when it overflows an iText rectangle. The HTML code is obtained from a contenteditable div and ...
NekoStalker's user avatar
0 votes
0 answers
35 views

Itext8 TextMarginFinder strange output coordinates

FOA: I'm using recent IText8 core apis, which are very similar to 7 version AFAICS. As per documentation the class TextMarginFinder should help me to find, between all textboxes in my pdf, the maximum ...
Black.Jack's user avatar
  • 1,888
0 votes
0 answers
20 views

How can I render 2 table side by side in a PDF report using itext 7.2.5

I want to render 2 tables side by side using itext 7.2.5 (java) without using nested tables. enter image description here Can you help us on how we can design it using itext 7.2.5 without using nested ...
Shishir Peeru's user avatar
0 votes
0 answers
17 views

itext7 with pdfocr in .net core application. compatibility problem

I need to read PDF image in .net core 6 application. i am trying it with itext7 and pdfocr but i am getting error Severity Code Description Project File Line Suppression State Warning ...
Kamran Shahid's user avatar
0 votes
0 answers
10 views

iText ignores SVG attribute overflow="visible"

I work with itext7-dotnet 8.0.2 and I want to add SVGs to my PDF. My program gets the SVG from a service and I noticed that some symbols were missing in the PDF that were displayed normally when I ...
Dietrich Zerr's user avatar
0 votes
0 answers
71 views

"Unknown PdfException" by iText7 when TimeStampToken is not present in the embedded Pkcs7 UnsignedAttributes section

I'm using itext7-dotnet 8.0.2 and I'm getting an "Unknown PdfException" from PdfPKCS7 constructor when the Pkcs7 has an unsigned attributes section without a TimeStampToken attribute: iText....
riccardo's user avatar
0 votes
0 answers
11 views

How to render all rows of a table in header of every page correctly, if middle row data overflowed then subsequent rows are not rendered at all

I am generating a pdf where we have Header(variable height) every page. Header is getting generated with IEventHandler. Issue is when the table content of any row is large then subsequent rows are not ...
danishahmad's user avatar
0 votes
0 answers
46 views

Converting PNG to PDF. The Image is larger than 1 page and is getting cut off

This code uses iText7 to convert an image to pdf. The image is larger than 1 page and is getting cut off. How would I convert the image that it spans more than 1 page in the pdf and is not cut off. I ...
sara's user avatar
  • 1
0 votes
1 answer
82 views

Form fields cannot be found until the PDF file is saved again in Acrobat

I am using iText 7 (version 8.0.2) to fill in form fields in an existing original PDF (from a third party). Now I have encountered a strange problem. The form fields cannot be found. However, if I ...
Sam's user avatar
  • 113
0 votes
0 answers
18 views

Pkcs12Store without constructor

Good morning. I have been trying for many days to transfer my signature process, which used iTextSharp, to iText7. The main error it gives me is when trying to use Pkcs12Stores, because it tells me ...
Noemí's user avatar
  • 1
0 votes
1 answer
100 views

itext7: Getting a 'cannot find file' error when attempting to read a PDF document

I have been trying to solve this all day and I seem to be getting nowhere. I am trying to use itext7-dotnet to read a pdf document. All the examples and tutorials that I can find for PowerShell are ...
Ralf_Reddings's user avatar
0 votes
3 answers
91 views

c# iText7 how to set the position of the top left corner of a paragraph

I wan't write a paragraph in the pdf file so that the top left corner of the paragraph is exactly positioned at the top left corner of the page 100,100.The code: var targetPdfPath = "100x100.pdf&...
zhusp's user avatar
  • 173
0 votes
0 answers
58 views

Pulling PDF form fields/values in C# using iText7 and memory streams

I am getting a "PDF header not found" error when trying to use iText7 but working purely with loading the pdf via memorystreams rather than a file path for it saved on a server. Is this not ...
Irish Redneck's user avatar
-1 votes
0 answers
35 views

Digital signature on PDF using IText7 in C#

Can anyone please provide me an example on how to digitally sign PDF in c# using IText7? Thanks in advance Yielded successful result on Itextsharp. Now I want to migrate go itext7 but the solutions ...
Ankita Chavan's user avatar
0 votes
1 answer
45 views

ITEXT 7 Accessibility check Alternate Text

How can I get the Accessibility, Alternate Text properties from a pdf using Itext 7 similar to what is displayed using Accessiblitiy tools link Adobe Pro?
Andre Rubnikowich's user avatar
1 vote
0 answers
46 views

Mobile Signature problem. Document has been altered or corrupted since it was created

i am developing a mobile signature application with .net and Itext. The problem is when i add the sign to the pdf file it says document is altered. When i parse the responce XML i can get the user ...
tolgahan özden's user avatar
0 votes
1 answer
69 views

How to Find PDF Text with a Given Color and Replace it

I want to find text with a given color and then replace it with a new color. I know Acrobat can do this, but it breaks the tag tree when low-level edits are made. I want to use iText to automate this ...
Mytho's user avatar
  • 38
1 vote
1 answer
45 views

How can I add named destination to a pdf file, on a specific line, that is containing a specific string with itext7

How can I add a named destination to a pdf file, on a specific line, that is containing a specific string, with itext7 ?
Mdarende's user avatar
  • 527
0 votes
0 answers
28 views

IText7 Second page content going(overwriting) to first Page

i am first time using iText7 library and manages to create some design on first page,After adding second page in same document, when i am creating table and other content all reflecting to first page....
Maveric's user avatar
  • 21
0 votes
0 answers
18 views

iText7 failed to generate PDF

Use iText7 to generate PDF. When adding table elements, the program will throw an exception if the cell content of the table is too long. enter image description here Using iText7-core version 7.1.15....
PanBiao's user avatar
0 votes
1 answer
29 views

How do I work around a font issue in text extraction using iTextSharp Core?

I'm trying to extract text from this PDF file: http://www.in.gov/legislative/iac/T03270/A00200.PDF The error I'm getting: PDF Extraction Error Dictionary doesn't have supported font data. iText....
richardtallent's user avatar
0 votes
2 answers
109 views

PDF417 Barcode Generate in Editable PDF

I am working on the use case where end user fill the pdf document and click the push button to generate the barcode with field values… I am looking for the solution in PDFBox or IText7 or Aspose…. I ...
Asvinth Saravanan's user avatar
0 votes
0 answers
39 views

:before :after pseudo elements CSS not getting rendered in my PDF

Below are my dependencies that I am using to convert thymeleaf template to PDF. <dependency> <groupId>com.itextpdf</groupId> <artifactId>kernel</...
Vaibhav Varade's user avatar
0 votes
0 answers
28 views

Additional margin when filling XFA forms with itext7 instead of itext5

I'm upgrading a simple tool to fill XFA PDF forms with itext. The idea is simple, all formatting related information (font name / font size / aligning / margins / etc) is stored in the form. I only ...
Peter N's user avatar
  • 31
0 votes
0 answers
70 views

iText7. When using HtmlConverter.ConvertToElements to convert a <li> the font size assigned is not working

I am using iText7 to generate pdf documents. In one of the parts i need to show some data stored in HTML so I am using pdfHtml HtmlConverter.ConvertToElements(). When the HTML string is comming with ...
Oscar Vazquez's user avatar
0 votes
0 answers
89 views

iText 7 (v8.0.1) C# - How to add a image to every page of a pdf

I would need some help. I use the 8.01 versioen of iText7. The pdf I need to work on is not a physical file but are bytes. The image to apply is an image object. I have searched a lot and tried ...
Claudio's user avatar
  • 53
0 votes
1 answer
146 views

Sign a pdf using itext 7 version 8.0.X

We are using iText7 version 7.X dotnet for the last few years to digitally sign PDF's. It is working great (and still does) but iText7 released a new verison (with the somewhat confusing name version ...
Hagay Goshen's user avatar
0 votes
2 answers
55 views

How can I create In memory PDF byte from itextpdf without creating actual file in filesystem

I am refering to below code in itextpdf to create PDF from html. I have added iText core library and pdfHTML add-on to our project dependencies. itext-html-to-pdf-using-java import com.itextpdf....
Vish's user avatar
  • 348
1 vote
0 answers
31 views

iText7: How do I left align and right align two paragraphs on the same line without word wrapping?

I am trying to accomplish the same thing that was asked here: How to align two paragraphs to the left and right on the same line? However, the question was asked 8 years ago and the answers are out of ...
MrZoraman's user avatar
  • 431
1 vote
1 answer
66 views

c# Splitting a pdf file with PdfSplitter in itext7 will double the file size?

Splitting pdf files with PdfSplitter in itext7 will cause the file size to double, split into several files will multiply several times, is there any way to avoid it. If you merge these files again, ...
zhusp's user avatar
  • 173
0 votes
1 answer
39 views

iText7 Array of Tables

the code snippet will compile but when run a NullReferenceException is thrown. It says "object not set to an instance of an object". The code is created using .NET Core 3.1 on VS2019. I ...
Mat52's user avatar
  • 21
0 votes
1 answer
28 views

iText7 OfficeConverter with Indic languages

I am trying to convert a document(.docx) using iText (trial mode) which contains the text in the TAMIL and KANNADA languages. When PDF is prepared, the output is boxes and language characters are not ...
Vishal Kumar's user avatar
0 votes
1 answer
20 views

Why I can't center the footer of a PDF with ITEXT pdf 7?

I'm trying to build a pdf generator and I must add 2 different footers based on the tipe of file im generating. One has just a text that says "This PDF is a sample". The other one is ...
asdrubalo's user avatar
0 votes
0 answers
40 views

Set paragraph absolute/relativ position in table cell with itext7

I am currently trying to add a paragraph to a cell and give it an absolute/relative position within the cell. My experience now shows that when I insert multiple paragraphs into a cell, they are ...
Kevin V's user avatar
  • 129
0 votes
0 answers
25 views

iText 8.0.1 not giving correct current cursor position

I am using iText 8.0.1 and following this knowledgebase item to get the current cursor position How to find out the current cursor position on a page? But, it is not working as I expect. I am getting ...
Neil's user avatar
  • 185
0 votes
0 answers
33 views

Font family not recognized when there is a space in the name

I have a .NET 6 application and it runs in a container where I installed the google fonts in the system fonts folder. With that I put the DefaultFontProvider to also get the system fonts. I have ...
VerXm's user avatar
  • 1
2 votes
0 answers
51 views

IText 8.0.1 How to make table lines flush with edges of table?

I am using iText 8.0.1 and I noticed that when I add a table to my document, many times the lines of the table extend slightly past the edges of the table. Here is a sample class: package com....
Neil's user avatar
  • 185
0 votes
0 answers
96 views

Problem generating PDF with iText7 version 8.0.1 in a .NET 7.0 Web API

This is my code [HttpGet("generar")] public IActionResult GenerarPdf() { // Create a new MemoryStream to write the PDF into it. using (MemoryStream stream = new MemoryStream()...
Alexis252's user avatar
0 votes
1 answer
105 views

.NET 6 PDF page by page to one high PNG or JPG file - Converter in 2023

Guys i started implementation of PDF Converter. I need to convert for example 15pages of PDF to one, high PNG/JPG file, to use OCR tools that are prepared for it. My problem is that techniques that i ...
Kamil's user avatar
  • 802
0 votes
0 answers
26 views

iText7 HtmlConverter.ConvertToPdf how to scale text to fit within div container

I have different areas in different fixed sizes which contains some text. What I want to achieve now is to show the text in the largest size possible with or without linebreaks. For example: The text ...
Marvin Klein's user avatar
  • 1,501
-1 votes
1 answer
35 views

itext7 - how to get document signed content?

I'm looking for something like getSignedContent on PDFBox to get the Signed content of the file (not the signature). Return the signed content of the document. This is not a PDF file, nor is it the ...
Thiago Sayão's user avatar
0 votes
0 answers
17 views

itext7: Div height calculate not correct?

I use Canvas to draw Text content in rectangle Div. However, Text content is truncated even though there is still enough space left in Div. The Div rectangle has dimension width: 111 and height: 78 ...
kieuanhvu's user avatar
  • 108
0 votes
1 answer
118 views

How to apply a qualified electronic seal to a PDF document using iText 7 and an external trust service provider?

I am currently in the process of a applying a qualified electronic seal to a pdf document, using IText7 library and an external signature service. But I have problems now when using the iText7 ...
BubbaZanetti's user avatar
0 votes
1 answer
174 views

Digital Signature using itext7 and boundy castle (.net razor pages)

At the moment I wanted to create a digital signature using itext7 and boundy caste on .net razor pages. I found a old tutorial : https://viewbag.wordpress.com/2019/12/24/pdf-digital-signatures-itext7-...
slim's user avatar
  • 3
0 votes
0 answers
47 views

how to hide pdf form field with IText 7

I tried to hidden a form field in pdf using latest Itext 7, but could not find any solution. I've searched the web, got example like that: using (PdfReader reader = new PdfReader(src)) { using (...
zhe li's user avatar
  • 11
0 votes
0 answers
85 views

How to change Encoding in PDF after converting SVG to PDF?

I've created a converter API which is converting SVG files into PDF. Application using iText v8.0.1. My SVG file have encoding= utf-8 <?xml version="1.0" encoding="utf-8" ?> ...
Tommy's user avatar
  • 11
0 votes
0 answers
35 views

I want to use the IEventHandler of iText 7 to be able to add the same Paragraph to every header when creating a new page

This is my code package com.genpdfwithitext.genpdfwithitext import com.itextpdf.kernel.events.Event import com.itextpdf.kernel.events.IEventHandler import com.itextpdf.kernel.events.PdfDocumentEvent ...
Jirapat Chookleeb's user avatar

1
2 3 4 5
43