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
0
votes
0 answers

Create PDF with OpenHTMLPdf and Primefaces

I want to create a PDF based on Primefaces and OpenHTMLPDF: I have issues with the converting to my private org.primefaces.model.StreamedContent pdfTemplate; So I need help for the last 2 code lines I guess: ExternalContext externalContext =…
vished2000
  • 164
  • 1
  • 11
0
votes
1 answer

Unable to generate PDF using OpenHtmlToPdf

I am unable to generate PDF in Azure temp folder (D://home) using OpenHtmlToPdf when referencing external images in Free App Service Plan (Shared Infrastructure). However I am able to generate PDF if I am using a B1 or greater Appservice plan. I…
Bhanu Reddy
  • 205
  • 3
  • 12
0
votes
1 answer

GIF image only partially displayed

I got a strange issue with a GIF image in Java. The image is provided by an XML API as Base64 encoded string. To decode the Base64, I use the commons-codec library in version 1.13. When I just decode the Base64 string and write the bytes out to a…
marandus
  • 1,228
  • 1
  • 13
  • 21
0
votes
1 answer

Text-Align right, remove trailing whitespace in openhtmltopdf

I am using the open source project openhtmltopdf but I am facing the following issue: I have a p-tag inside an div-element. The tag has the property text-align: right. The text is aligned right, but when there is a break, because the width of the…
AnanasXpress
  • 111
  • 1
  • 12
0
votes
1 answer

How to add last page in PDF?

I am using OpenHtmlToPdf. Is it possible to add 1 page as last page of document. I have read all document but found noting. The following is the same code to generate pdf document. string html = Utils.ReadFile(@"C:\inetpub\wwwroot\pdf.html"); …
Kaushik Thanki
  • 3,334
  • 3
  • 23
  • 50
0
votes
0 answers

OpenHTMLToPDF build not hole document

I'm generating pdf file with OpenHTMLToPDF. Using Velocity to render html and then to pdf with OpenHTMLToPDF. In this document there are 2 pages and first one is good but second is empty, but html which came to my render method is also ok. I cannot…
0
votes
0 answers

Conversion of html to pdf using java

I want to convert html response to pdf file using JAVA. But the problem is that the HTML page contains some JSON part which creates a problem and throws an error while converting it to pdf. So, I want some possible solution in java to convert a…
0
votes
1 answer

Instantiate IWebContext inside JmsListener in Spring

I have a Spring app running as a rest api. Let's assume that at some point, a message with some info is generated and stored in a AWS SQS queue. When JMSListener is called, Im trying to generate a pdf report with thymeleaf and openhtmltopdf. I'm…
CiDsTaR
  • 322
  • 2
  • 10
0
votes
1 answer

all the text on the pdf is rendering as squares/blocks □

Why is my output being generated with just squares? I'm attempting to convert html to a pdf, and I'm getting a weird output, where all the characters are squares, as in the following: My function is below: public static class…
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062
0
votes
1 answer

How to fix an error during generating PDF: PdfBoxTextRenderer.getWidth(PdfBoxTextRenderer.java:300)

I use openhtmltopdf library to convert my html templates to PDF: try (OutputStream os = new FileOutputStream(filePath); PDDocument doc = new PDDocument()) { for (String html : htmlPagesWithValues) { …
Taras Melnyk
  • 3,057
  • 3
  • 38
  • 34
0
votes
1 answer

Using Pure HTML, how do you trigger OpenHTMLtoPDF/PDFBox to generate bookmarks or table of contents in the navigation menu?

We're trying to add bookmark or table of contents metadata to a PDF that is generated from HTML. How do you signal PDFBox/OpenHTMLtoPDF to create the bookmarks/TOC?
Header One
Header Two for…
ScrappyDev
  • 2,307
  • 8
  • 40
  • 60
-1
votes
1 answer

Different headers when printing

I need to export multiple HTML files into a single PDF one. I'm using @page rules to apply a header. I need to : Display the pagecount ( page n out of total) Display a different title in the header for each original HTML document What I tried…
1 2 3 4
5