Works! So that was easy.
No idea why I missed this in the first place, sorry.
Thanks Tilman!
Am 10.04.22 um 06:32 schrieb Tilman Hausherr:
Use the PDPageContentStream constructor with five parameters
Tilman
Am 09.04.2022 um 15:00 schrieb Tom Eicher:
Hello,
in my application I use pdfbox 2.0.22 to create documents.
I load a (customer supplied) template, then write my content
onto it. That works very fine.
But now one customer manager to produce a template where
my content is drawn mirrored (bottom-up) onto the document.
(Of course, a winword-created template PDF) - see attached.
Do I have chance to somehow reset any applied
transformations, rotations or similar so I can draw
on the document like I would draw on a blank page?
PDDocument doc = new PDDocument();
PDDocument templatedoc = PDDocument.load(templateInpuStrean);
PDPage page = doc.importPage(templatedoc.getPage(0));
PDPageContentStream contentStream =
new PDPageContentStream(doc, page, true, true);
contentStream.setFont(PDType1Font.COURIER, HEIGHTY);
contentStream.setLeading(OFFSETY);
contentStream.beginText();
y-=OFFSETY*16;
contentStream.newLineAtOffset(x, y);
contentStream.showText("Text Line 1...");
Any hints appreciated...
Thx&Cheers Tom.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org