Questions tagged [pdfhtml]

Use the tag for questions about the iText 7 add-on that provides the ability to transform HTML and CSS content into a PDF.

68 questions
4
votes
0 answers

How to use @font-face in iText7 pdfHTML?

I have added a directory containing Roboto font to the FontProvider. The Pdf can find Roboto font, but it doesn't work as expected. It always uses Roboto-Black when I use font-weight: 900; font-style: Bold; and Roboto-Light instead of…
3
votes
0 answers

How to dynamically adjust the page margins according to the header / footer height

I'm using iText and pdfHtml to convert HTML pages to PDF. Though I'm having trouble getting each page to adjust to it's specific header or footer. Some of the headers / footers I'm using are taller than others, thus the content needs to start…
Zuzu_Typ
  • 97
  • 7
2
votes
0 answers

Implementing target-counter in CssContentPropertyResolver

I am trying to add a table of contents with page numbers to a PDF I am generating using Freemarker -> HTML -> PDF. The HTML/CSS are below ul.toc a::after { content: " Page " target-counter(attr(href url), page) }
2
votes
1 answer

Add footer to every page of an existing PDF in iText7 (.NET)

I am building a PDF at runtime in itext7.pdfHTML, using a template file. I want to add a footer to every page of the resulting PDF, which has two pages, but for some reason the footer only appears on the second page. I'm trying to build on this…
bmurrell30
  • 565
  • 8
  • 23
2
votes
1 answer

Adding Table of Content with pdfHTML in iText7

Using HTML file, I generated PDF file using iText pdfHTML. Now I want to add table Of Content(TOC) to the 2nd page. I saw the same question adding-toc-dynamically . But no answer for this. I tried the same scenarios as he followed. I want to know…
RedWhite
  • 29
  • 2
2
votes
3 answers

Timeout in Pdf-html when running on Google Cloud Function

We've created a Cloud Function that generates a PDF. The library that we're using is https://www.npmjs.com/package/html-pdf The problem is when we try to execute the .create() method it times out with the following errors "Error: html-pdf: PDF…
2
votes
1 answer

itext pdfHtml: set margins

I am using HTMLConverter to convert html to PDF and trying to set some margins. Existing code: ConverterProperties props = new ConverterProperties(); props.setBaseUri("src/main/resources/xslt"); PdfDocument pdf = new PdfDocument(new…
nkare
  • 397
  • 6
  • 17
1
vote
1 answer

itext7 pdfHtml Xamarin.Forms 'Value cannot be null. Parameter name: assembly'

When trying to generate a pdfHtml report in Xamarin.Forms using a .netStandard2 project, the exception System.ArgumentNullException: 'Value cannot be null. Prameter name: assembly. This is the code that is run: var assembly =…
rherzog
  • 51
  • 9
1
vote
0 answers

iText 7 pdfHTML extension doesn't implement all of my CSS when converting my html to pdf in my C# utility

I have the following HTML: