Skip to content

Commit 1ef9b02

Browse files
author
Benoit Lagae
committed
Expose PdfDocument in PdfCanvas for external access
RND-799
1 parent 9677156 commit 1ef9b02

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

kernel/src/main/java/com/itextpdf/kernel/pdf/canvas/PdfCanvas.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,15 @@ public PdfCanvas(PdfDocument doc, int pageNum) {
276276
public PdfResources getResources() {
277277
return resources;
278278
}
279+
280+
/**
281+
* Get the document this canvas belongs to
282+
*
283+
* @return PdfDocument the document that this canvas belongs to
284+
*/
285+
public PdfDocument getDocument() {
286+
return document;
287+
}
279288

280289
/**
281290
* Attaches new content stream to the canvas.

0 commit comments

Comments
 (0)