Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
35 views

Android: Change Display name for PDF file when Opened

I am trying to open a PDF file named external_source.pdf from the res/raw folder in Android Studio and display its name as External Source.pdf.Currently with the below the title of the pdf file when ...
prat's user avatar
  • 647
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://...
TobiasGriese's user avatar
0 votes
0 answers
81 views

Embed font-files .ttf into an already existing Pdf in Java

I need to embed a .ttf-File into an existing Pdf in Java. Now I would prefer both Pdfbox and openpdf, but I am open to any suggestion. The Java-webservice is to open the Pdf, then insert the .ttf ...
Schlomo Dumbo's user avatar
0 votes
0 answers
38 views

How can I determine if a row in a table is the last one on a page using the OpenPdf library?

I am creating a new document and displaying data in the form of a table. As I populate the table with data, some of the rows formed are subheadings, which must not be the last row on the page. How can ...
Igor K's user avatar
  • 1
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 ...
Arun Gowda's user avatar
  • 3,440
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 ...
Arun Gowda's user avatar
  • 3,440
1 vote
0 answers
173 views

Quarkus: Dependency can't find resources

I'm trying to generate a PDF in my Quarkus application using https://github.com/LibrePDF/OpenPDF. Locally everything works fine, but after building the application I get the following exception: 2023-...
Thessi's user avatar
  • 11
1 vote
1 answer
164 views

OpenPDF margin mirroring set to true, but all pages have same margins

I am using OpenPDF 1.3.30 and trying to create a document with margin mirroring. I called document.setMarginMirroring(true) before opening the document, but I am still getting a document where all ...
Neil's user avatar
  • 337
0 votes
1 answer
205 views

Openpdf maven install gives error, but compile step was successful

I am trying to install an open pdf build locally using Eclipse. I cloned the GIT repo to a local folder and opened the project. I set up a run configuration with these maven targets: clean compile ...
Neil's user avatar
  • 337
1 vote
1 answer
262 views

How to convert an OutputStream created by OpenPdf (java library) to readable and downloadable via http response (http4s, scala) pdf document?

I want my http-service (Scala, http4s, Ember) to receive a http-request, create a pdf document using OpenPdf library and make a http-response to user's browser with this pdf document. User should see ...
Stanislav's user avatar
0 votes
1 answer
367 views

OpenPDF shrink PDF

Setup: Creating OpenPDF from multipage TIFF with adding each TIFF page as com.lowagie.text.Image ... com.lowagie.text.Document pdfDocument = new com.lowagie.text.Document(); com.lowagie.text.Image ...
hiaclibe's user avatar
  • 696
0 votes
0 answers
29 views

Adding form fields and encrypt PDF (in one go)

I want to add several (acro) form fields to a pdf and afterwards encrypt it. Each single operation does work however if I do both I get the following error: Content was already written to the output. ...
Lonzak's user avatar
  • 9,796
1 vote
1 answer
428 views

Multi Language Support in OpenPDF Java

In OpenPDF if any of the text is with language other than English (Korean / Chinese) is showing as empty. I have tried with creating custom font by downloading the otf file from google fonts but no ...
Rakesh Pradhan's user avatar
2 votes
0 answers
169 views

How to embed OCR text from TIFF images into PDF documents using Java and OpenPDF?

I have scanned paper documents and OCR'ed them into text. I am creating PDF documents from groups of the TIFF images. I am using Java and OpenPDF. How can I embed the text behind the tiff image ...
user8862290's user avatar
2 votes
0 answers
288 views

When using openpdf, can I add a Paragraph in the Paragraph with style attributes?

When I add a paragraph in the paragraph, some style attributes including alignment are not applied to the paragraph inside. I need it to use a paragraph with a title and body and use it repeatedly. (...
Jang's user avatar
  • 23
1 vote
1 answer
93 views

How do I show U+0104 with openpdf?

I am trying to create a pdf using openPDF. If I try to print certain characters like Ą (U+0104) they are not shown on the pdf which is produced. I have set the Chunk font to Times New Roman using a ....
Stephen's user avatar
  • 11
1 vote
1 answer
445 views

How to display email address in Thymeleaf by using <th:utext>?

I have to display below text in thymeleaf, but it fails to display and not sure the reason and the resolution for this. Below is the text which is coming from JSON format and I am parsing this json ...
Veera's user avatar
  • 409
0 votes
0 answers
357 views

Gettin Exception java.lang.ClassCastException: java.lang.String cannot be cast to com.lowagie.text.Element when generated pdf using openpdf-1.3.30.jar

I have replaced itext-2.1.0.jar with openpdf-1.3.30.jar because of the securities risks present in itext. I'm getting the below error when pdf is getting generated: java.lang.ClassCastException: java....
Harshita Joshi's user avatar
2 votes
0 answers
221 views

OpenPDF (itext) not able to read existing signature

On creating a instance of PDFReader for the given PDF, openPDF (itext) is not able to read the signature name. But if using newer version of openPDF, I can see the signature name. Also, If I open the ...
tulak.hord's user avatar
0 votes
1 answer
2k views

OpenPDF with html

I need help for converting html content to a pdf. I am currently using OpenPDF 1.3.30 to generate my pdf file in Java. I have a vue component that uses Vue Editor which is a rich text editor wrapper ...
Gullian Van Der Walt's user avatar
1 vote
1 answer
1k views

How to write Arabic text in a PDF using OpenPDF and Java

I use OpenPDF to generate a PDF from a Spring Boot application. Everything works fine when I use French or English alphabets, but when I write in Arabic nothing is displayed. I read that I have to use ...
ayada's user avatar
  • 501
-1 votes
1 answer
444 views

How to make an image float above the text in OpenPDF to realize the seal function?

I found that OpenPDF's Image.class seems to have only 6 image positioning methods, and among them, there is only the option to add the image below the text (that is Image.UNDERLYING), but there is no ...
etherealss's user avatar
0 votes
2 answers
505 views

Java - openpdf - Break word with hyphen

We are using openpdf 1.3.26 template 2.1 to generate PDF from HTML and CSS. I have a div with the following style .text-block{ display:block; text-align:justify; word-...
Farabi Abdelwahed's user avatar
1 vote
1 answer
3k views

how can open pdf file in flutter

I need to add code to open a pdf file in the flutter project, this is my code: grid.draw( page: document.pages.add(), bounds: const Rect.fromLTWH(0, 0, 0, 0)); final fileName = 'Output${...
student's user avatar
  • 47
1 vote
2 answers
189 views

Load a font in OpenPDF using Clojure

I'm trying out OpenPDF in Clojure. I manage to make a simple document, but there are font problems. Here's some failing code: (ns invoice.download.pdf (:require [clojure.java.io :as io]) (:...
Lars Melander's user avatar
0 votes
0 answers
740 views

How to merge multiple PDF/A files and generate new PDF/A in java

I want to merge multiple PDF/A files and generated a new PDF/A file using java. I tried it with OpenPDF using PdfCopy class but it produced pdf document which does not conform to the PDF/A-1a standard....
Dnyaneshwar Rathod's user avatar
0 votes
0 answers
275 views

Failed to read encrypted file using unlocked PDFReader using openPDF library java

I have tried to unlock pdf reader but still got bad user password Exception in thread "main" com.lowagie.text.exceptions.BadPasswordException: Bad user password at com.lowagie.text.pdf....
Fairuz Yassar's user avatar
0 votes
1 answer
470 views

Header not showing in PDF document

I am trying to add a header to each page in my document. I am using OpenPDF 1.3.29 installed through Maven. Here is a test program: package test; import java.io.FileOutputStream; import com.lowagie....
Neil's user avatar
  • 337
2 votes
0 answers
992 views

How to style as css in OpenPdf?

I'm migrating from Itext to OpenPDF because of license. In Itext we were able to use String to represent HTML and CSS elements, then just make the HTMLWorker.parseToElementList that works perfectly, ...
José Cleyton's user avatar
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 ...
Igor Bljahhin's user avatar
0 votes
0 answers
663 views

PDF File generated by PdfWriter is showing blank page

I have code to merge between 2 pdf files using the library OpenPDF like this public byte[] mergePDF(byte[] pdf1, byte[] pdf2) throws IOException { ByteArrayOutputStream os = new ...
Fairuz Yassar's user avatar
0 votes
0 answers
318 views

OpenPDF not showing SetRowspan

Trying to move from iText 5.x.x to OpenPDF version. I added the latest openpdf to my maven. <dependency> <groupId>com.github.librepdf</groupId> <artifactId>openpdf&...
GaryR's user avatar
  • 1
0 votes
0 answers
133 views

PDF form fields: Separate/Extract widget dictionary from field dictionary

According to the PDF spec it is possible to merge the widget dictionary and the field dictionary when there is only one associated widget annotation. Is there some support by iText / openPDF to ...
Lonzak's user avatar
  • 9,796
0 votes
2 answers
1k views

OpenPdf/PdfBox automatically generate table of contents

In my current java/springboot project, I need to create a PDF dynamicaly containing paragraphs, images and tables. And I also need to add the table of content of this document. I'm wondering if there ...
David ROSEY's user avatar
  • 1,775
0 votes
1 answer
446 views

How to export pdf data with dynamic Object in openpdf java

I'm trying to use openpdf for dynamic field. Maven: <dependency> <groupId>com.github.librepdf</groupId> <artifactId>openpdf</artifactId> <version>1.3.8&...
mehnet ali's user avatar
1 vote
0 answers
2k views

Add Digital signature to PDF using openPDF

Could anyone provide a example of how to add digital signature to PDF using openPDF. I have looked at the openPDF gitHUb link https://github.com/LibrePDF/OpenPDF/wiki/Signing and tried to use what is ...
Deepthi KV's user avatar
3 votes
1 answer
210 views

PDF formfield radiobutton syntax latex3 generation

I stumbled over the following PDF since my PDF library has problems with it. It contains what I would call a peculiar interpretation of the PDF specification thus the radiobutton is not working ...
Lonzak's user avatar
  • 9,796
0 votes
1 answer
414 views

Detect PDF form field radio button (radiobutton) shape / style

I need to programmatically categorize which shape a pdf form field radiobutton has. Therefore I created a test pdf using *crobat. I added a radiobutton group where each widget is using a different ...
Lonzak's user avatar
  • 9,796
0 votes
1 answer
463 views

PDF Formfield font size: Default appearance vs. appearance stream

I extract the font size of a form field to get the information about its size (using iText). This works well for most of the documents however for some I get a font size of 1 because in the appearance ...
Lonzak's user avatar
  • 9,796
0 votes
2 answers
3k views

How to open pdf file in new tab in asp.net(vb)?

I want to show my pdf file in new tab when I click the button of gridview. How can I display? Please someone help me . This is my code. 'my gridview button click event Protected Sub btnDisplay_Click(...
Su Myat Kyaw's user avatar
0 votes
0 answers
609 views

Java OpenPdf - Find special character in pdf : U+FB01

I need to find the character fi : <span>&#64257;</span> inside of a pdf that's causing a bug with PdfBox when I try to read it in java. java.lang.IllegalArgumentException: U+FB01 ('fi') ...
César Castro Aroche's user avatar
2 votes
1 answer
1k views

Insert blank page in pdf with OpenPdf

Hi I working on simple function which marge all jpg files and save them to pdf (with openpdf). Each image should be fitted to page, and between them I want to have one blank page. I already have: def ...
Kuba Wenta's user avatar
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): <!...
zolv's user avatar
  • 1,892
-1 votes
1 answer
87 views

Spring Java : PDF download only works with idm

i need to download a pdf with OpenPDF using the following controller method as a web service : @CrossOrigin @ApiOperation(value = "Generate Customer Request PDF ") @PostMapping(path =...
MK S2M's user avatar
  • 5
0 votes
1 answer
1k views

I need to open PDF file in new window using angulat 10 or javascript. But I also need to change name pf the file before opening it

I'v tried to use this code (it seems to be posted everywhere): const objectUrl = URL.createObjectURL(blob) a.href = objectUrl a.download = 'archive.zip'; a.click(); But it only downloads file. I need ...
Stas's user avatar
  • 1
1 vote
2 answers
818 views

Adding certification / docMDP signature using openPDF

I just stumbled over the following code in openPDF while creating a docMDP: private void addDocMDP(PdfDictionary crypto) { PdfDictionary reference = new PdfDictionary(); PdfDictionary ...
Lonzak's user avatar
  • 9,796
-3 votes
1 answer
853 views

Open PDF Automatically After Downloaded

I have a webview app that have pdf download feature for downloading pdf file from some different websites. I would like to know how to open the pdf immediately after downloaded. I haven't got a pdf ...
Gedanggoreng's user avatar
0 votes
0 answers
870 views

Header and footer block on every page of PDF using OpenPDF

I would like to create an invoice PDF using OpenPDF. It needs a header and footer on each page. I'm using Thymeleaf to generate the content for the pdf. My question is then how to add a header and/or ...
Lars Bak's user avatar
1 vote
0 answers
237 views

Wrap Text in openPD

Is there a way to wrap text around an image in openPDF? or around other text? I'm trying to mesh two texts onto one page (texts which may contain pictures), but one text may be larger or smaller then ...
Doragon's user avatar
  • 367
-1 votes
1 answer
1k views

Java Spring Boot Webfux (Reactive) - Export Data as .pdf

I am using openPDF library to export list as pdf through HttpServletResponse. However, HttpServletResponse is not supported in Webflux, so could someone please guide me in how I would write this in a ...
Orange's user avatar
  • 31