Hello Mehmet,

PDFBox is low level so yourself needs to set the start X coordinate at 1.5cm. 1 pdf unit is 1/72 inch so 1.5 cm would be 1 / (10 * 2.54) * 72 * 15.

Note that the y 0 coordinate starts at the bottom.

Spacing is also done by you, either by setting the y value or by calling setLeading and newLine.

See the EmbeddedFonts.java example in the examples subproject in the source code download or
https://svn.apache.org/viewvc/pdfbox/branches/2.0/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFonts.java?view=markup

Tilman

Am 04.08.2022 um 16:59 schrieb Mehmet Fatih ÇİN:
Hello,
  I want to get information about a subject. How can I set the page margins of 
the PDF to be 1.5 cm, for example, and I want the text to appear in a single 
line spacing, how can I do this?


Mehmet Fatih ÇİN


E-Mail Adress: mfatih...@outlook.com.tr





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to