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
11 views

Tag existing content in pdf

I know I can create tagged PDF using iText or GrapeCity or other libraries (I already done it), but I'd like to know if there is a way to tag an untagged PDF programmatically. I'm not talking about ...
S. F.'s user avatar
  • 1
-1 votes
0 answers
24 views

I have a pdf file with barcode. For some customers i need to disable the barcode. Is there any way to do so? [closed]

Remove or disable barcode in pdf file. I have some pdf files with barcode. For security reasons i need to make the barcode not readable for some customers. I checked with com.aspose.pdf and itext pdf. ...
Deepu Sasidharan's user avatar
0 votes
0 answers
23 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
0 answers
17 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,443
0 votes
0 answers
10 views

fabricJS i-text with Roboto-Regular fontFamily render different in ubuntu and window

<html lang="en"> <header> <meta charset="utf-8" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></...
rathod annu's user avatar
-1 votes
0 answers
19 views

itext sharp pdf form filler using C# [duplicate]

I am trying to fill pdf form using itextsharp pdf libarary and c#. I am getting this error below is my code private static void FillPDFForm() { const string pdfTemplate = @"C:\EPRO\...
lightcoder's user avatar
0 votes
0 answers
33 views

Create a PDF file from HTML specified via URL using Flying Saucer

Here is the code I am using to generate a PDF using "Flying Saucer". I downloaded the jar from https://mvnrepository.com/artifact/org.xhtmlrenderer/flying-saucer-pdf-itext5/9.0.1 and ...
ezhil's user avatar
  • 997
0 votes
0 answers
47 views

itext 7 signing problem pkcs1 to pkcs7 adobe reader shows document alterd error

I need to get a pkcs1 singature from a third party and create a pkcs7 singature in a class derived from IExternalSignatureContainer in itext 7 my problem is that the singature in adobe reader has an ...
Jóhann Hallgrimss's user avatar
0 votes
0 answers
20 views

Generate pdf byte array from image byte array with same size in java

I am trying to generate pdf byte array from image array and then storing in google bucket. Everything is working fine except resultant pdf page size. Input image size is reasonable (can be viewed ...
Aamir Sheraz's user avatar
0 votes
1 answer
25 views

what could cause the Exception iText.Kernel.PdfException: 'Unknown PdfException.' when calling GetEncodedPKCS7?

Until "2023-09-19" everything worked fine. Today, the exact same code fails always with the error SocketException: No connection could be made because the target machine actively refused it ...
joao salgado's user avatar
0 votes
0 answers
26 views

in Itext 5 my second page has far (white space) from my first page

I used Itext5 to create a PDF. Because the text is in Persian, I used a table to write. But now there is a big gap between the first and second paragraphs that I added to the project. I don't want ...
saeedbayat's user avatar
1 vote
2 answers
38 views

Issue with images when converting HTML to PDF using itextPDF

I'm converting html to pdf using itextPDF, everything works as expected but for one of the GIF image after conversion to pdf only the skeleton of the image appears. This is a static GIF image not ...
hitesh's user avatar
  • 11
0 votes
1 answer
69 views

Create a PDF file from HTML specified via URL

I would like to generate a PDF and Image file from HTML specified via URL(page) and send it to an external system. I need to perform this generation logic in java. The most popular and widely used ...
ezhil's user avatar
  • 997
0 votes
1 answer
33 views

Testing the presence of a string in a PDF file with iText 7 (8.0)

I'm currently doing some basic benchmark (generate, split, merge, read, compress) to choose a C# Pdf library to use in my project. I'm trying to extract text from a pdf File and checking if the text ...
aurelienjo's user avatar
0 votes
1 answer
18 views

iTextSharp merge pdfs with bookmarks

I am trying to Combine pdfs and create bookmarks. If I start the merger with a pdf already with bookmarks this code works fine but if I start with a single paged pdf with no bookmarks it does not work....
Hack.Sign's user avatar
0 votes
0 answers
16 views

iTextSharp.5.5.13 C#, I have to add elements until I run out of space, if I run out I add the total and continue on another page

I have a PDF that adds a header above and below the PC via event while in the middle I have a table in which I have to insert elements that have various attributes so the columns have dynamic size, ...
Marius Bodnarescu's user avatar
0 votes
0 answers
23 views

How to compress pdf file to reduce file size using itext5?

I'm using itext5 to generate html to pdf like this: // step 1 Document document = new Document(); // step 2 PdfWriter writer = PdfWriter.getInstance(document, new ...
Monica's user avatar
  • 1
0 votes
1 answer
64 views

iTextSharp 5.5.13.3 GetLicenseeInfoForVersion Issue

This is a very strange one, been using this Nuget package for years, never an issue. However on new PC my local project is having an issue with the following code: MethodInfo method = licenseKeyClass....
iggyweb's user avatar
  • 2,373
0 votes
0 answers
9 views

How to make ITextSharp ColumnText break only after reaching end of paragraph

I'm using ITextSharp to generate PDFs. A few of the texts I'm writing on the PDF are long, and need to be properly wrapped within a set area. I'm using ColumnText for this purpose, and defining a ...
Chaitanya Kulkarni's user avatar
0 votes
0 answers
27 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
28 views

How to append page with ITextSharp on existing PDF

I am a bit confused about the structure of ITextSharp API, because is not clear to me which object I should use (among many) to append pages to an existing document. It's important to me to write an ...
Skary's user avatar
  • 1,322
0 votes
0 answers
66 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
-3 votes
1 answer
36 views

Java itext: modify a PDF and set this background color: #2E506F [closed]

I have created this class , but I have an error when opening the pdf public class ModifyPDFWithBackgroundColor { public static void main(String[] args) throws IOException { String ...
Nuñito Calzada's user avatar
0 votes
1 answer
61 views

can I use a fdf file to digitally sign a file

I've got a request to sign a pdf file with an fdf file using .net and I cannot find any information on how to start or even if it's possible. To my understanding a fdf file, it's just a collection of ...
kolek's user avatar
  • 549
0 votes
2 answers
120 views

Extract signature image from PDF signed with Adobe Sign

I'm trying to extract the signature image from a PDF signed with Adobe Sign. Not sure how Adobe adds this image. I have tested in Java with iText and PDFBox. Normally when you traverse through the ...
krillov's user avatar
  • 89
0 votes
0 answers
46 views

How to set text-anchor: end; using iText7?

Im using iText7 for generating PDF from SVG files. After creating a PDF there is an issue with some of elements which changing their possitions on PDF document. After PDf document is created the value ...
Tommy's user avatar
  • 11
0 votes
1 answer
64 views

How to import FDF (Forms Data Format) document (has only the annots comments and no acroform fields) into pdf using itext7 c#

I am trying to import the fdf document which has only the annots comments not the acro form field using the itext7 c#. Please suggest or provide the code snippet Below is my FDF (Forms Data Format) ...
Kothandaraman's user avatar
0 votes
2 answers
37 views

unable to delete pdf created by using itext in java

I'm creating a duplicate pdf by taking an input pdf by adding some pic to header. i'm able to create the result pdf successfully i.e., duplicate pdf, but after creating this pdf, while trying to ...
raj's user avatar
  • 33
0 votes
0 answers
33 views

Issues with iText7 creating acrofield forms, saving the pdf. When i open it, it cant be recognized by itext as acroform, so it cant find fields

I have an application where I allow the user to draw rectangles on a pdf converted to png. I map the png coordinates of the rectangle that is drawn to the coordinates of the pdf (x,y, width, height) ...
Sam Stenerson's user avatar
0 votes
0 answers
36 views

When using iTextSharp to combine PDF files, an issue occurred where some pages were missing

I am a novice developer, Toru. I usually work with C# for development. I was tasked with creating a tool to combine PDFs. Due to operational requirements, I needed to script it in PowerShell. I ended ...
Toru's user avatar
  • 1
0 votes
0 answers
62 views

How can i fix overlaping elements in PDF generated using iText7 and canvas

Here we can see my Service that i use to generate PDF: public class PdfGeneratorService : IPdfGeneratorService { public byte[] GeneratePdfFromSvgFile(IFormFile svgFile, string colorMode) ...
Tommy's user avatar
  • 11
-2 votes
1 answer
59 views

Is there a way to disable the AGPL message in iTextSharp 5.5.11

I've inherited some code that uses iTextSharp 5.5.11 in a .NET console application. It opens and scans all the pdfs in a folder and extracts a couple of strings (a workorder number and a closed date). ...
Gary Dean's user avatar
0 votes
0 answers
58 views

iText7, All the fonts must be embedded. This one is not: Times-Roman

I tried to create method for converting SVG to PDF/A using iText7. All this code is wrote in C# on .Net platform. using (StreamReader reader = new StreamReader(svgFile.OpenReadStream())) { ...
Tommy's user avatar
  • 11
-1 votes
1 answer
62 views

If I use an AGPL program to create PDF and distribute that PDF only, should I need to open source the program? [closed]

My company's program uses iText, an AGPL library, to create a PDF. If we distribute that PDF only and not distrubute the program, should we need to open source it? And does AGPL also apply to the PDF ...
Horizon's user avatar
  • 79
0 votes
1 answer
25 views

Create pie chart, line chart, histogram of highchart's in pdf using java

I have to create a PDF that has nice and clean charts almost like UI. I have used highchart library to generate pie chart, line chart and other type of charts in UI. So far, I have found that I have ...
Nishant Kadivar's user avatar
1 vote
0 answers
53 views

characters are shifted horizontally when using itextpdf java API to generate PDF with large font size

I'm trying to generate a PDF containing a grid of letters, where each letter is centered in its cell in the grid (both vertically and horizontally), see attached PDF samples This works well when the ...
Itzik Stauber's user avatar
0 votes
1 answer
35 views

Simple iText7 v8.0.1 .net6 app works fine on Win10 but crashes on macOS Ventura with .net6

The console code below is intended to produce a password-protected copy of input PDF file pdfMaster.pdf and write it into the same directory as the input file. It works perfectly when I run it on ...
BenevolentDeity's user avatar
0 votes
2 answers
26 views

iTextSharp STRIKETHRU is not working correctly. STRIKETHRU the whole text

I'm trying to archive a text with a STRIKETHRU fragment I tried this approach and cannot figure out why it's not working desired output: blabla 123 blabla what I get: blabla 123 blabla My tech stack ...
kolek's user avatar
  • 549
0 votes
1 answer
33 views

My iTextSharp5 password protection doesn't seem to work

My goal is to add password protection to a copy of an arbitrary non-password protected PDF using iTextSharp5. I tried the code below, which I found in several places on the Internet. However, I can ...
BenevolentDeity's user avatar
0 votes
0 answers
36 views

itextpdf v8.0.0 bold text doesn't look same as that of v5.5.13.2 even same font name & size is used. Perticularly for small bold font sizes

We were already using itextpdf v5.5.13.2 due to vulnerability we have migrated to v8.0.0. Now after migrating to v8.0.0, even if we use same bold font with same size, the text looks stretched ...
sagar kulkarni's user avatar
1 vote
2 answers
29 views

How I can get recyclerView list to itext PDF?

I want to add recyclerView list to itext PDF document, recyclerview is created from user input, I didn't Know how many item will user add, and each item of recyclerView contain many text. How I can do ...
HGSu's user avatar
  • 25
0 votes
0 answers
26 views

how to printpreview and print SharpPDFLabel in vb.net

how to printpreview and print SharpPDFLabel in vb.net? As per the link with the documentation below : https://github.com/finalcut/SharpPDFLabel/tree/master but there is an error in the code below ...
roy's user avatar
  • 693
0 votes
0 answers
19 views

iText 8 does not entirely fill background of a cell with rowspan > 1 which splits to the next page

Only first row of the cell is filled with background color until next page. The remnant of the cell on the next page fills correctly. I think this old question with zero answers is related: iText - ...
Alex's user avatar
  • 1
0 votes
1 answer
48 views

How to add multiple signature in one PDF page

I am using itext7 in .net for handling e-signature on PDF page, I am using the below code and it works well with one time signing. however I want to add 3 signatures in one page, then I got an error &...
Giang's user avatar
  • 1
1 vote
0 answers
30 views

Telugu and Kanada language pdf generation using fpdf

I want to generate report in multiple languages. However, I derive the words to be displayed in the report from mySQL on fpdf. For other regional languages tamil, hindi, and malayalam i convert the ...
Rajalakshmi Kumar's user avatar
0 votes
1 answer
38 views

Get RecyclerView to itext pdf

I want to get recyclerView Items from activity to itext PDF, but I don't know the best way to do it. I tried to do that by taking abitmap for recyclerView and put it in the PDF,but it was of lower ...
ezz sab's user avatar
0 votes
0 answers
22 views

How to create java File for each page from a signgle pdf document in iText 7 or above?

I have a single pdf file with 10 pages, I need to split into 10 files, how can I do it in iText? I'm able to split the documents by page like below List<PdfDocument> splitDocuments = new ...
user3593900's user avatar
1 vote
0 answers
100 views

iText7 (Version 8.0.0) getting "dependency must be added" error when upgraded from .Net 6 to .Net 7 [duplicate]

var writer = new PdfWriter(stream); The above line throwing below exception in .Net7, working fine in .Net6 without doing any changes. NotSupportedException: Either itext7.bouncy-castle-adapter or ...
User's user avatar
  • 804
0 votes
0 answers
26 views

Compress PDF document/Reduce size of PDF using unity script in OnBase for Workflow

Trying to compress PDF using unity script in a 'OnBase workflow system work'. But, giving me an error Exception: iText.Commons.Exceptions.UnknownProductException: Product pdfOptimizer is unknown. ...
Teja's user avatar
  • 1
0 votes
1 answer
44 views

insert pdf with form into another pdf

I have a pdf with form and want to insert it into another pdf, its form has been filled, but inserted pdf's form shows no value. Codes as follow: using (PdfDocument pdfOutputDoc = new PdfDocument(new ...
zhe li's user avatar
  • 11

1
2 3 4 5
264