411 questions
0
votes
2
answers
57
views
HTML to PDF using flying Saucer Caron symbol not appearing
i am trying to convert an HTML file into a pdf. my HTML file has special chars like č ž (caron symbols).
the pdf is generated successfully however it seems that only the char 'c' with the caron symbol ...
0
votes
0
answers
42
views
How to stretch content on print page using flying saucer
I need to put an image to the bottom of last pdf page (but above page counter which is in bottom-right page margin box).
@page {
size: A4 landscape;
margin: 20mm 10mm 20mm 20mm;
@bottom-right ...
0
votes
0
answers
25
views
ITextRenderer SetPDFXConformance input values in Flying saucer? [duplicate]
I need to create a PDF/A3B from an HTML.
I'm using Java 22 and flying-saucer.
HTML parsing is OK and a "standard" pdf is created.
To set PDF/A conformance I need to use the ITextReader....
0
votes
0
answers
65
views
flying-saucer-pdf missing type DocumentException
I am trying to use flying-saucer-pdf to transform HTML to Pdf.
While following multiple tutorials: (which might be copied form each other...)
https://www.baeldung.com/thymeleaf-generate-pdf
https://...
0
votes
0
answers
104
views
java.lang.IllegalArgumentException: Font size too small: 0.0
please I have this error when I try to convert my html template to pdf.
I use the java flying-saucer-pdf plugin to convert my html files to pdf. But I have this error bellow which is returned on one ...
0
votes
0
answers
65
views
Alignment issue in table from HTML to PDF
Using Flying Saucer 9.1.18 (flying-saucer-pdf) to generate PDF from HTML/xml to PDF file in my java program.
I noticed that if I open the input xml in the browser, the text (Lorem ipsum etc) is all ...
0
votes
0
answers
94
views
Flying saucer not considering lower priority font family
I am using Flying saucer 9.x to generate pdf from HTML document.
I added ArialUnicodeMS font to support all the Asian languages. However, the font takes effect if and only if it is mentioned as first ...
0
votes
0
answers
178
views
Flying saucer not displaying indian languages properly
I am using flying saucer 9.x to generate PDFs from HTML. Indian languages like Kannada, Hindi or any other languages are not being displayed properly in the PDF.
Following is a simple html to ...
0
votes
0
answers
137
views
Java SpringBoot PDF Generation - Chinese Characters are getting skipped/missing
I am working on a java spring boot service that generates PDF file and uploads to FCP bucket.
No issues with PDF generation and uploading to GCS bucket. The issue is on generated pdf file, if we have ...
1
vote
2
answers
412
views
FlyingSaucer merge PDF doc after calling setDocumentFromString(html)
I'm using FlyingSaucer to create a PDF from HTML. It works well, but I'd like to append (merge) another PDF attachment to it as a separate page (or pages). The attachment will be a PDF.
My existing ...
0
votes
0
answers
155
views
Thymeleaf and Flying Saucer - Date in Footer Not Showing on Last Page
I'm using Thymeleaf along with Flying Saucer to generate a PDF document. In my PDF, I have a footer that includes a dynamic date. I want this date to be displayed only on the last page.
I have tried ...
1
vote
0
answers
408
views
Thymeleaf and flying saucer ignoring the css when converting to the pdf
I am trying to generate pdf using html, using thymeleaf and flying saucer library.
However the CSS is not being applied when pdf is generating.
Here is my pom.xml
<?xml version="1.0" ...
1
vote
0
answers
217
views
Does flying-saucer-pdf-itext5 support the max-width attribute of the img?
I added an attribute max-width to the img tag.
.half-img {
max-width: 283px;
}
<table>
<tr>
<td class="table-top">
<div class="number&...
0
votes
0
answers
188
views
CSS and Image is not rendering in generated PDF - Flying Saucer
I want to make a PDF for my webpage using Flying Saucer to generate a PDF. With this below code I am able to generate a PDF but without any style and css.
HTML source code,
<link rel="...
0
votes
0
answers
807
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 ...
1
vote
0
answers
102
views
Flying Saucer: Always having first blank page when setting background-image
I want to have a pdf with a background image on a fix number of pages (2 in the example, the 3 page should not have it). I got this working with the following template:
<!DOCTYPE html>
<html ...
2
votes
0
answers
320
views
xhtmlrenderer/Flying Saucer - UTF-8 Encoding not working
I am using Flying Saucer and xhtmlrenderer to produce PDFs from a String-HTML-Code.
The Html-String is:
<html>
<head>
<style type="text/css">
@font-face {
font-...
1
vote
1
answer
672
views
How to Create PDF with recurring logo using iText, HTML and thymeleaf
I am making use of HTML, thymeleaf and flying-saucer-pdf
I have the code at following link to convert html to pdf: https://github.com/Naresh-Chaurasia/html-pdf-generation-1x
HTML: https://github.com/...
2
votes
1
answer
450
views
White border around my background when generating a PDF certificate from an HTML template with FlyingSaucer
I need to generate PDF certificates after completing courses. These pdf's generating by HTML template with Thymeleaf. Everything is OK through converting, but in result appear white border around the ...
0
votes
2
answers
1k
views
How to handle page breaks for a long table for html to pdf conversion using java
I have a thymeleaf template which I'm using to convert to pdf in java using flying saucer. The pdf that is getting generated has a long table and during page breaks the table is getting continued on ...
0
votes
0
answers
546
views
flying saucer itext 9.1.22 not rendering image in the pdf
We recently upgraded flying-saucer-itext from 9.1.15 to 9.15.22, and the images are no longer rendering. We are using Docusign 3.23 SDK to fetch the signature images and try to render those in our app....
1
vote
1
answer
270
views
How can I enforce an even PDF page count with FlyingSaucer?
I am working on a Grails project that uses the Flying Saucer library (via the Rendering plugin) to generate PDFs. I need those PDFs, which can have arbitrary lengths, to be forced to have an even page ...
0
votes
0
answers
80
views
Generated pdf using Flying Saucer and Itext PdfReader Exception: com.itextpdf.text.exceptions.InvalidPdfException: PDF header signature not found
I got the following Exception when I try to create and instance of PdfReader from a pdf file generated using flying saucer
Exception:
com.itextpdf.text.exceptions.InvalidPdfException: PDF header ...
0
votes
1
answer
314
views
java.lang.NoClassDefFoundError: javax/xml/transform/TransformerConfigurationException
I am using dummy html string and trying to create the pdf from that...
once it tries to create ITextRenderer object, I am getting the "java.lang.NoClassDefFoundError: javax/xml/transform/...
1
vote
0
answers
766
views
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 ...
0
votes
0
answers
156
views
Spring Thymeleafs Template Engine error during template parsing
I can see there are a few question already asked in there, but still I can't find any solution to fix my issue. I am using Spring boot Thymeleafs Template Engine to parse value attribute with Spring ...
1
vote
0
answers
363
views
How to create a pdf from html, without any page break?
I am creating a pdf from HTML using ITextRenderer in java. I want the pdf document to have only a single page. I tried using the below configs in the CSS file
* {
page-break-inside: avoid;
}
@page ...
2
votes
1
answer
678
views
Flying Saucer: Arabic text in the footer of generated PDF is positioned incorrectly
I am using Flying Saucer to generate PDF in my project for long time already. My documents have header and footer repeated on each page. Everything is working fine.
Now I got a requirement to add ...
0
votes
0
answers
220
views
HTML to PDF using flying saucer: bold text is blurry
I am using flying saucer (xhtmlrenderer) 9.1.22 to create PDF files from HTML content,
but the bold text in PDF looks blurry.
this is my code snippet:
ITextRenderer renderer = new ITextRenderer();
...
3
votes
1
answer
1k
views
UTF-8 characters not shown in the PDF generated from html template via flying saucer and thymeleaf
I'm trying to generate a pdf contains Chinese UTF-8 characters via flying saucer and thymeleaf. But the generated pdf just ignore all the Chinese characters (latin is fine). Here is the Thymeleaf ...
1
vote
2
answers
4k
views
Field templateEngine in '....' required a bean of type 'org.thymeleaf.TemplateEngine' that could not be found
So i'm trying to generate a pdf file from a thymeleaf template but I get this error when running my app.
***************************
APPLICATION FAILED TO START
***************************
...
2
votes
2
answers
1k
views
UTF-8 emoji problem in PDF for Spring Boot
I am using Spring Boot to create and return PDF. There is an issue when my string content contains emoji and Unicode characters like "This is d£escript😭ion section😢😤😠😡🤬", then in ...
1
vote
1
answer
1k
views
using @font-face with flying saucer issue
I'm trying to convert an html to pdf using flying saucer pdf library, but I have an issue with the font I should have. It seems that the font imported is not recognized.
Below my html code:
<html&...
0
votes
1
answer
668
views
Thymeleaf and html css with flying saucer doesn't work with packaged jar
I have a thymeleaf html template with custom css styling and a 'flying saucer' to produce the pdf and download from the GET REST endpoint.
Here is the project folder structure of the project with ...
1
vote
1
answer
796
views
Saucer flying header and footer
I use the header and footer in saucer flying. It works well.
The current state works where I use the div with header or footer, I have from there until the end of the file header or footer.
I've tried ...
2
votes
2
answers
3k
views
Module reads package from both
I found something similar to my problem, but it is related to maven not gradle: java 9 unnamed module reads package [X] from both ... while debugging (with IntelliJ)
I finally decided to start using ...
1
vote
0
answers
694
views
Is there anyway to convert ITextRenderer to base64 encoded string?
Recently I want to create a util to convert the html into pdf (base64 encoded string) and then store the string into database. Therefore I had choose flying-saucer to do the work.
Below is the util ...
3
votes
2
answers
3k
views
HTML to PDF with cyrillic characters
I'm making a Spring Boot application. I want to generate PDF from HTML code:
String htmlString = "<!DOCTYPE html>\n" +
"<html lang=\"ru\">\...
0
votes
1
answer
2k
views
Spring Boot giving errors during template parsing using Thymeleaf
I'm currently trying to parse a PDF from thymeleaf html code. I've run into the issue that I get a error while using my parse function.
My maven pom I am using to parse the pdf is the following:
<!...
3
votes
1
answer
3k
views
FlyingSaucer with openpdf doesn't render flex box correctly
I want to render a PDF document using latest FLyingSaucer
build.gradle:
implementation 'org.xhtmlrenderer:flying-saucer-pdf-openpdf:9.1.22'
Input HTML document (almost a copy from W3 schools):
<!...
0
votes
1
answer
1k
views
Customize table pagination for Html to pdf conversion
I'm currently using openhtmltopdf to convert an html to pdf. The html has a table1(no header) with 3 rows, then some text and then table2(with a header) which can have many rows. Assuming table2 is ...
-2
votes
1
answer
359
views
How to make non-editable pdf using flying saucer
I am using Thymeleaf + Flying Saucer for generating PDF files. How can I make non-editable PDF using Flying Saucer?
2
votes
1
answer
1k
views
Flying saucer: rowspan and page-break-inside
I'm using flying saucer to convert html page to PDF. There're two huge columns that are rowspanned over whole section of the table. All columns have
table td {
border: 1px solid black;
page-...
1
vote
0
answers
193
views
flying saucer create blank page when set landscape?
I am using flying saucer to create pdf from html.
@page land { size: A4 landscape; }
.landscapePage {
page:land;
height: 14cm;
width: 30cm;
background-color: green;
}
<div ...
1
vote
1
answer
672
views
Generate landscape pdf using Flying Saucer?
I am using a flying saucer to generate pdf file. I want to the first page and the second page is in landscape mode and the rest is in portrait mode. So, I do this:
@page {
margin-top: 3.3cm;
...
4
votes
2
answers
532
views
Table of content java flying saucer?
I created an audit report using flying saucer to convert from HTML to pdf. And I want to create an table of content in the first page to know titleProduct belong which page? How do I do it?
<div th:...
1
vote
1
answer
2k
views
Flying saucer detect page break?
I have a productGroups List, inside each product group I have a list of product. I want to loop every item in productGroups and all product inside each productGroup.
So I have created a table to ...
0
votes
1
answer
898
views
How to move footer to the space of margin-bottom space used in @page
I have the following @page
@page {
size: 210mm 297mm;
background: white;
display: block;
margin-bottom: 15%; // eliminates the page size on the bottom
}
I need to show footer to this ...
2
votes
0
answers
449
views
How can I continue page number after pdf merging using flyingsaucer library in java
Use case : I need to merge pdf and the page number is continue after previous pdf merge.
Problem : On each pdf my page number reset to 1.
Each PDF Generate Code
byte[] generatePDFBytes = htmlpdfUtil....
0
votes
0
answers
85
views
Images downloaded from mysql data base does not show when rendrering them to pdf
I am working on a project with thymeleaf, Spring boot and mysql database.
I am saving images into database (Byte[]).
When getting them from the db, with byte[] converted into base64, It displays on ...