Reputation: 120
I'm new to iText. I'm using iText 7.
Upvotes: 0
Views: 399
Reputation: 2458
Please create a PdfCanvas
using PdfPage#newContentStreamBefore()
or PdfPage#newContentStreamAfter()
For example, in the following snippet I will create a PdfCanvas
instance for some already existed PdfPage
instance (page)
PdfCanvas pdfCanvas = new PdfCanvas(page.newContentStreamBefore(), page.getResources(), pdfDoc);
Then you can use this PdfCanvas
instance as a usual one: the inly difference is that the content will be rendered before the other content (e.g. over)
Upvotes: 1