Extending PageDrawer in pdfbox 2.0.x

Viewed 216

I want to do some custom rendering by extending the PageDrawer class in Apache PDFBox 2.0.x. In the comments it is mentioned that we should subclass PageDrawer class for custom rendering. But, the constructor of PageDrawer expects parameters which cannot be created out of the package.

Is there any way to overcome this? Has anyone done subclassing of PageDrawer in PDFBox 2.0.x?

1 Answers

Found that PageDrawer alone cannot be subclassed. Rather, a custom PDFRenderer class was created where we can set our custom PageDrawer by overriding the createPageDrawer method.

Related