0

I was using the build in program from the jar to convert a text file to pdf. The text in the file is formatted to use the total page width. There are no margins in the test file. The pdf is created with margins. How can I create the pdf and retain the text to the side of the page. I use this pdf with the overlay to put the text on top of a form background for sending invoices with email.

java -jar pdfbox-app-2.0.19.jar TextToPDF -standardFont Courier

I expected the text to start at the left edge of the paper. I expected no margins at all. Full edge to edge. Like printing to a dot matrix printer. That is the input to the pdf.

Mike Wolf
  • 1
  • 1
  • 1
    You might want to explain more clearly what you did. Your *using the build in program from the jar* at best conveys a general idea but no specifics. – mkl Sep 05 '22 at 15:30
  • 1
    The `TextToPdf` PDFBox tool is very simple and does not offer details like customizable margins. instead, the margins are hard-coded at 40 default user space units. The focus of PDFBox is providing a versatile PDF library, the tools are hardly more than examples, some more and some less advanced. Thus, I would propose you change the `TextToPDF` code to match your expectations. – mkl Sep 05 '22 at 21:14
  • Yeah you could take the source code and change the 40 to something else But I doubt you'll be happy. – Tilman Hausherr Sep 06 '22 at 07:20

0 Answers0