0

I am usieng PDFBox to fill a template with some data and I wish to render it in Chrome, so that I can give the user the possibility to preview it before printing it from the web page. Does anyone knows if PDFBox supports to render the created PDF in a browser?

Thanks.

Amrida D
  • 329
  • 1
  • 5
  • 17

1 Answers1

0

PDFbox not directly, since it just creates the pdf. But you can simply include the pdf in your webpage through varying methods, depending on your architecture.

One simple example is:

<embed src="http://example.com/file.pdf" width="500" height="500" type='application/pdf'>

More options have been discussed in this question: Recommended way to embed PDF in HTML?

Community
  • 1
  • 1
Slettal
  • 1,007
  • 13
  • 19