PDPageContentStream.AppendMode.APPEND
PDPageContentStream.AppendMode.OVERWRITE
PDPageContentStream.AppendMode.PREPEND
You can also use
AppendMode.APPEND
AppendMode.OVERWRITE
AppendMode.PREPEND
and press "fix imports" shortcut in your IDE (in Netbeans, it is
CTRL-Shift-i )
In your IDE, there's usually a shortcut to expand stuff. In Netbeans it
is CTRL-space.
Tilman
Am 26.05.2018 um 02:21 schrieb [email protected]:
I'm having a similar issue.
How do you use the AppendMode appendContent parameter?
On 2018/05/22 17:55:46, Tilman Hausherr <[email protected]> wrote:
Am 22.05.2018 um 19:47 schrieb A Brand:
I'm using version 2.0.4 .
Current version is 2.0.9.
I didn't see the options. Where do I put the 'append' option?
it's the third parameter in one of the PDPageContentStream constructors.
And set the very last parameter to true.
/**
* Create a new PDPage content stream.
*
* @param document The document the page is part of.
* @param sourcePage The page to write the contents to.
* @param appendContent Indicates whether content will be
overwritten, appended or prepended.
* @param compress Tell if the content stream should compress the
page contents.
* @param resetContext Tell if the graphic context should be reset.
This is only relevant when
* the appendContent parameter is set to {@link AppendMode#APPEND}.
You should use this when
* appending to an existing stream, because the existing stream may
have changed graphic
* properties (e.g. scaling, rotation).
* @throws IOException If there is an error writing to the page
contents.
*/
public PDPageContentStream(PDDocument document, PDPage sourcePage,
AppendMode appendContent,
boolean compress, boolean resetContext)
throws IOException
Tilman
Onward.
Don't Be Good. Be Great. Be Grateful.
Please note this message was edited for brevity and clarity.
Best regards,
Anthony McDonald
*602-456-9335*
http://www.idnkhtw.space
On Wed, May 16, 2018 at 6:44 PM, A Brand <[email protected]> wrote:
I'd like to add text to an existing pdf document. I attempted it and the
current page was erased and replaced with the text I wanted to add.
I tried using the Overlay() and didn't see the text added.
Is this a feature of pdfbox?
Onward.
Don't Be Good. Be Great. Be Grateful.
Please note this message was edited for brevity and clarity.
Best regards,
Anthony McDonald
*602-456-9335*
http://www.idnkhtw.space
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]