Questions tagged [openhtmltopdf]

This tag is to be used when asking questions about the openhtmltopdf Java library to convert an HTML to PDF.

This tag is to be used when asking questions about the openhtmltopdf Java library to convert an HTML to PDF. Check the wiki for more info.

72 questions
1
vote
0 answers

openhtmltopdf dont add fonts

I trying to add fonts to my pdf but without success, I using this code to generate public static void main(String[] args) throws Exception { try (OutputStream os = new FileOutputStream("/Users/fabio/Downloads/pdf/out2.pdf")) { …
Fabio Ebner
  • 2,613
  • 16
  • 50
  • 77
1
vote
0 answers

Out Of Memory error while converting large HTML file to PDF

I am working on an assignment wherein I need to create an HTML file and convert the HTML file to PDF. I am using Thymeleaf and flying-saucer-pdf to get this done. The Thymeleaf part works fine and creates the HTML file. However, the PDF creation…
user864309
  • 226
  • 2
  • 11
1
vote
1 answer

Place image outside of CSS @page margin/padding when generating pdf using Openhtmltopdf

I'm generating paged pdf document out from html using Openhtmltopdf. My issue is, that I need to place image on the edge of the page, outside of @page margin. Under all circumstances, playing with visibility, padding/margin, negative margin of child…
Václav
  • 365
  • 2
  • 15
1
vote
1 answer

openhtmltopdf can't load the font while running from docker container

I have the following setup: @Value("classpath:fonts/Poppins-Regular.ttf") private lateinit var regularFont: org.springframework.core.io.Resource ... private val regular: FSSupplier by lazy { FSSupplier {…
nKognito
  • 6,297
  • 17
  • 77
  • 138
1
vote
0 answers

HTML to PDF conversion using OpenhtmlTopdf with ByteArrayOutputStream

I am trying to convert HTML to PDF as encoded string. I am using openhtmltopdf library. I don't want to create a new file in users environment, so I am using ByteArrayOutputStream. Following is my code: Document document = Jsoup.parse(html,…
NoOne
  • 141
  • 1
  • 10
1
vote
0 answers

How to avoid empty header/footer rows on new page in openhtmltopdf?

I am using openhtmltopdf to generate paginated tables rendering in a pdf document, Below template rendering extra header and footer in an additional page, which shouldn't be, as there are no more rows left.