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.

For more on iText, see here.

For more on the differences between iText 5 and iText 7, see here.

2125 questions
0
votes
1 answer

PdfDocument to byte[] using PdfMerger iText7

I've a requirement, where I am generating different pdf' using iText 7.1.11. I am using PdfMerger to merge all pdf's on the fly. I am able to generate pdf successfully at my local system, but the application needs to send bye[] in response. The…
Amol Bais
  • 332
  • 1
  • 6
  • 30
0
votes
1 answer

filling dynamic XFA form with dynamic content with itext 7

I would like to know if there is a way to access events on xfa forms with dynamic content, i have my xml generated, works when setting the values for some nodes but for those nodes where the value is on dependency with others and is setted with an…
0
votes
1 answer

While creating pdf in asp.net facing problem

i am using visual studio 2019 with C#.when i try to create a pdf document it is successfully created, but when it is opened by Response method it show error message "Acrobat reader could not open file because it is not supported file type". enter…
sahib
  • 21
  • 1
  • 3
0
votes
2 answers

How can I Bold one Word in a Line in iText 7?

I can set text bold using iText 7 like so: parExecSummHeader2.Add(new Text(subj).SetBold()); ...but when I try to combine a "normal" (non-bolded) bit of text with a bolded part, it doesn't work. I have this, which prints the line all "regular" (no…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
0
votes
1 answer

Missing PDF pages when converted from HTML

When i try to convert Html to Pdf using itext. It is only showing blank pages, pdf content is missing.please help Document document = new Document(); PdfWriter writer = PdfWriter.getInstance(document, new…
0
votes
1 answer

How can I Combine Regular and Italicized Text in the same line in iText 7?

I have code like so to write out a line of text: Paragraph parExecSummHeader = new Paragraph(); . . . parExecSummHeader.Add("AUTHOR PROFILE ANALYSIS OF " + docNameOnly); I want the value in docNameOnly to be italicized. Based on an old post here…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
0
votes
1 answer

iText7 superimpose overlay two PDF as one new issue

I'm trying to superimpose or overlay two A4 PDF pages as one page in a new A4 PDF I've tried reversing the order of the source docs, checked they are really A4, but each time I run it the second object is always added approx 10mm to the right and…
kalpha
  • 45
  • 7
0
votes
0 answers

Apply CSS to HTML string with iText7 pdfHTML

I am feeding HTML code stored in a string variable into iText7's pdfHTML plugin; how can I get my CSS to work correctly with it? Here's the details: I have an HTML file that serves as a template for the document I want to create in my .NET…
bmurrell30
  • 565
  • 8
  • 23
0
votes
1 answer

iText7 - Add text to the bottom of existing pdf

I need to add some text content to the bottom of an existing .pdf document with iText. I have a working method, but the new content is displayed in the top-left corner, overlapping the existing content: public PdfDocument…
dzenesiz
  • 1,388
  • 4
  • 27
  • 58
0
votes
2 answers

How to apply background color to table cell with round corners in iText7?

I am drawing the table with round corners. The table is dynamic and can grow to multiple pages. Now I want to apply some background color to cells. Each cell can have its own different color (not hard coded). But the issue is when I apply background…
0
votes
1 answer

Set width of space with iText 7

Is there a way to set the width of all spaces in a Paragraph in iText 7? So for example when showing the text "Hello world spacetest" I would like to be able to set the space between "Hello" and "world", and the space between "world" and "spacetest"…
MTilsted
  • 5,425
  • 9
  • 44
  • 76
0
votes
2 answers

Using iText 7 and Powershell to write text/lines/boxes to PDF

I've managed to create a blank PDF using PowerShell and iText 7. I would like to write some text, lines and boxes to the newly created PDF, but can't find any information on how to do this. Here is what I have so far, which is my attempt to write…
Makawide
  • 13
  • 5
0
votes
1 answer

How to apply round corner border to table (single page / multipage)?

I want to apply round corner border to a table. This table is dynamic. That means it can grow up to multiple pages or can accommodate in single page. If table comes in single page, then outermost corner of all four corner cells should be drawn as…
0
votes
1 answer

GetElementResult() null iText 7

I am converting html to pdf and trying to get the tag coordinates to be able to locate the example text.

example text

private class CustomSpanTagWorker :…
jonathan
  • 57
  • 6
0
votes
0 answers

How to convert strong html elements into span elements iText 7?

this is my code but I don't know if it's ok. Help public class CustomTagWorker : DefaultTagWorkerFactory { public override ITagWorker GetCustomTagWorker(IElementNode tag, ProcessorContext context) { …
jonathan
  • 57
  • 6