Questions tagged [itext]

Library to create and manipulate PDF documents in Java and C#. Use this tag for code using iText versions up to 5.5.x. For iText versions from 7.0.0 onwards a separate tag "itext7" is available. Remember to also add the tag for the language you're using.

Filter by
Sorted by
Tagged with
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
0 answers
36 views

Sign embedding to PDF, Document has been altered or corrupted since it was signed problem

I want to write two services. First service is responsible to generate the hash of pdf and send that hash to second service. Second service is responsible for signing that hash and returning it to ...
Farid Huseynli's user avatar
0 votes
0 answers
44 views

iText7 pdf merging with azure blobs

I am trying to merge multiple pdfs in an Azure function. The pdfs are held in an Azure Storage account and I am trying to use memory streams to handle the copying of the blobs and merging into one pdf ...
f_olivere's user avatar
0 votes
1 answer
34 views

Convert a Panel to a PDF Document in C# Windows

I want to print out a panel in my form to a pdf file. I've tried using iText7 library as show in the code below. using System; using System.Data; using System.Windows.Forms; using iText.Kernel.Pdf; ...
Hex Heager'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
19 views

Bug in iText Xtra [closed]

I have encountered a bug in version 5.5.13.2 of iText Xtra. When attempting to remove text content from a PDF, it throws a ClassCastException error. When I use PdfCleanUpProcessor cleaner = ...
hui's user avatar
  • 1
0 votes
0 answers
17 views

PdfAnnotation Underline

I have completed highlight and reduction using itext library so now what i want is underline using itext library how to achieve this functionality can anyone help out from this. In PdfAnnotation.java ...
Partheeban Devaraj'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
1 answer
31 views

Create a iTextPdf PdfPtable in Java with one row without a border

I am trying to generate a table in my pdf document that should have two rows. The first row should not be split in columns but the second row should be split in two columns. Something that looks like ...
julien carax's user avatar
0 votes
0 answers
18 views

ITEXT 2.7 PDF cant Display Chinese Characters

BaseFont CNFont= BaseFont.createFont(pathTotff, BaseFont.IDENTITY_H, BaseFont.EMBEDDED); Font font = new Font(CNFont, 24); private static void addChineseText(Document document, Font font)...
Christopher Chua's user avatar
0 votes
2 answers
63 views

Uncaught TypeError with iText pdf2Data

I've installed iText pdf2Data version 4.3.2 on a clean Ubuntu 22 VM using the provided helper scripts as instructed here. The installation works an I can login and start the creation of a new template....
PierreR's user avatar
  • 11
0 votes
1 answer
40 views

Deferred pdf signature with iText and nexU

I am trying to integrate a client pdf signature in web browser with iText 8 following the European Comission digital signature services implementation (the demo web app can be found here https://ec....
Alexandru Popa's user avatar
0 votes
0 answers
16 views

Convert word or Html to PDF without using Itext

Hi I have an requirement to convert word or html to PDF without using Itext. I have tired with PDFBox but i couldn't able to achieve since my document or html contains text, tables and images and in ...
Lokesh Deena's user avatar
1 vote
0 answers
27 views

How to set underline using PdfContentByte

I want to make the text underline and I can position it. I tried 2 methods, pdfcontentbyte and chunk but it couldn't give me the result that I wanted. By using pdfcontentbyte, I can't get the ...
syaq's user avatar
  • 11
-1 votes
0 answers
56 views

Losing signature box when flattening a XFA PDF with iText (pdfXFA)

When flattening a signed XFA PDF with iText 7 in Java as explained in this link, the result PDF has lost the visual representation of the signature. ¿Is it posible to obtain it flattened with the ...
Jeff's user avatar
  • 1
0 votes
0 answers
32 views

Error generating pdf with iText.Html2pdf C#

I have the function below that creates a pdf in C#. However, when executing the HtmlConverter.ConvertToDocument() function I receive the following error message System.NullReferenceException: 'Object ...
livisghton araujo's user avatar
0 votes
0 answers
26 views

IText html to pdf not working in css of nested ol li list

i have to create html from pdf with header html,footer html and water mark parts so i am using PdfWriter all css works except nested ol li below is the code : fileName = fileName.replace(" ",...
Varun Raval's user avatar
0 votes
0 answers
59 views

How to correctly use '[iText.Kernel.Pdf.PdfDocument]::new()' to read a simple PDF document?

So I was finally able to correctly load itext and avoid getting the errors I was getting HERE. Add-Type -path 'C:/itext_2/itext.8.0.2/lib/netstandard2.0/itext.kernel.dll' Add-Type -path 'C:\itext_2\...
Ralf_Reddings's user avatar
0 votes
1 answer
102 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
0 answers
16 views

Cannot display Chinese words after iText flattenFields methods? How to create PdfFont() with 2 TTF font files?

I am using iText PDF ligrary to create PDF with following steps: Manually create a PDF with form fields (e.g. text box) with input Chinese words Some input Chinese words are rendered by PMINGLIU.ttf ...
Michael's user avatar
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
0 votes
0 answers
21 views

Image alignment using after doing a document Conversion

private static void DownloadAndConvertToPDF(FileInfo originalFileInfo, string fileLocal, string filePdfName) { try { try { if (originalFileInfo.Extension.Equals(&...
Matheus Machado Coli'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
30 views

How can I put each image on a different page with the itextpdf library?

I am using the ItextPDF library to create pdf from images, this is my function who does all the work: private fun pdf(name: String, tamanio: PageSize, listOfURIs: List<Uri>) { Log.d("...
Hugo Jiménez's user avatar
1 vote
0 answers
70 views

Digitally sign pdf in c#

I would like your advice since I am a while now stuck on this. I am trying to digitally sign a pdf from my .NET application. I have found many examples and libraries that do this by importing the file ...
konkouts's user avatar
0 votes
0 answers
33 views

C# .NET 6 IText 8 Fill rectangle with back color

I just can't find how to do the following: private void DrawOutSideFrame(ref PdfCanvas gfx) { iText.Kernel.Geom.Rectangle Rectangulo = new(X, Y, RSize.X, RSize.Y); gfx.Rectangle(Rectangulo)....
Valentín Elizondo's user avatar
0 votes
0 answers
46 views

I had some trouble while trying to sign in pdf file with itextsharp, invalid signature [duplicate]

I found a lot of code in Stackoverflow and I combined all of them into my case, I tried to find the answer, but after all, I didn't get that. This is the result after I ran my code and opened the PDF ...
Hoàng Trung Nam's user avatar
0 votes
0 answers
31 views

Java : Superscript not registering in PDF Exporter

Why is unicode not displayed in the PDF. I am using the following code. My system out is giving me the correct response but PDF does not have the superscript. Document outputDoc Paragraph pdfParagraph ...
Tanu's user avatar
  • 1,294
0 votes
0 answers
30 views

C# ItextSharp multiple PDFStampers to one output file

I have a requirement where I have multiple PDF files in a folder, I want to read them all file by file, do some manipulation to each file and output them into one output file. I can get the code to ...
Ben Bodie's user avatar
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
40 views

How to read Translation Matrix from xRef Stream using PDFBox

I have a PDF from which I want to read the Translation Matrix for a particular Text Annotation. Using iText RUPS I can see that the /AP key have a /N entry that points to an xRef stream Looking to ...
TheMulittle's user avatar
0 votes
0 answers
38 views

iTextPDF html2pdf problem with special characters

I have a problem with special polish characters like "Ś Ą Ż Ć" in html to pdf using iTextPDF html2pdf library. I checked and the file test.html is encoded in UTF-8. My version: ...
Mamut2000's user avatar
0 votes
0 answers
22 views

Merged document from 2 pdfs is rotated horizontally/sideways using iText v5 pdf

i am merging 2 pdf documents into one using Java and iText v5, in that one is Scanned image copy of PDF so iText is unable to read the content in a way it is since this is image, hence Merged document ...
Prasanna's user avatar
0 votes
0 answers
43 views

itextPDF digital signature on PDF doc

I am having issue creating digital signature for PDF document from byte array that is signature. I wrote this code and got stuck on what to do next: public void sign(String src, String dest, ...
Goran's user avatar
  • 35
0 votes
1 answer
68 views

Clickable link in pdf to open up different file types in iText 5

I tried to make a clickable link in iText 5 for pdf managing using java, So that once the link in the pdf is clicked, it will open up the expected file-type which can be an image, pdf, .csv etc. Note ...
Always_Beginner's user avatar
1 vote
0 answers
25 views

ITextsharp 5.5 crashes when reading a file (but ITextsharp 4.6.1 not crashes )

We work with Itextsharp in version 5.5 There are damaged pdf files that do not open in this version but open in version 4.6.1. The code: public static async Task<byte[]> FlatPdf(byte[] pdfFile)...
Gad Cohen's user avatar
0 votes
0 answers
27 views

How can I cast GridView to table in pdf with additional columns and custom layout

I have a class that extends IPdfPageEvent named ImportExport. There is a static method in this class: public static void ExportToPDF(GridView gv, string Title, string Filter, int[] ColToRmove, string ...
Bannyk's user avatar
  • 1
0 votes
1 answer
34 views

iText 5.5.13 - Not able to add space at top of page

I am migrating PDF support code originally using iText version 2.0.7 to 5.5.13. I am having trouble positioning my page content in the correct place on the page. Here's a piece of code (works as ...
SBParks's user avatar
  • 75
0 votes
0 answers
33 views

CSS and Image is not rendering in generated PDF - Flying Saucer

I want to make a PDF for my webpage using Flying Saucer to generate a PDF. With this below code I am able to generate a PDF but without any style and css. HTML source code, <link rel="...
ezhil's user avatar
  • 1,015
0 votes
0 answers
37 views

CSS classes not getting applied while converting HTML to pdf using iTextPdf

I am using thymeleaf template in spring boot to create pdf. My thymeleaf template is getting rendered correctly if I open the genrated HTML on browser. But when PDF is generated some of the CSS styles ...
Vaibhav Varade's user avatar
0 votes
3 answers
74 views

Link to remote PDF file fails under Android

I'm using iText 5 to generate a PDF file with a link to a remote file and using the following code: import com.itextpdf.text.Chunk; import com.itextpdf.text.Document; import com.itextpdf.text.pdf....
Wolfgang Stolzenburg's user avatar
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
12 views

How to place a table to the right of an image in iText7

In creating a pdf file using iText7, I am trying to get a table to sit to the right of a chart. Currently they are taking up the correct sizing but the top of the table on the right is in line with ...
user2005143's user avatar
0 votes
0 answers
32 views

iTextSharp error The document has no pages. When using XMLWorkerHelper

I am trying to create PDF document from html. When I use HTMLWorker of iTextSharp, it produces pdf file with formatting issues. So I created the V2 version as follows using XMLWorkerHelper instade of ...
Ali Shan's user avatar
  • 459
0 votes
1 answer
76 views

C# Migration to iText 8 - flip/mirror PDF

can you help me to translate the function below from iTextSharp 5.5 to iText 8.0.1? This function is used to open a PDF, create a mirror, add a black frame and save the document to a new output file ...
DiGi's user avatar
  • 21
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
0 votes
0 answers
72 views

iText check pdf integrity

I want to validate relevant details of a pdf such as document hash signed, certificate validity and any changes to document after signing. To validate certificate, I can use pkcs7 to verify. However ...
tulak.hord's user avatar
0 votes
1 answer
47 views

iTextSharp not protecting PDF with password

I am using iTextSharp 5 and trying to password protect already existing PDF file but it is not working. When I double click on new password protected file then Microsoft Edge simply opens without ...
Frank Martin's user avatar
  • 3,197
0 votes
0 answers
20 views

How to add the image in the PDF from URL in android java

I am using this library implementation 'com.itextpdf:itext7-core:7.1.15' implementation 'com.itextpdf:layout:7.1.15' I want to add the image in the header of the pdf document String Url = "https:/...
IT Student's user avatar

1
2 3 4 5
264