Any good PDF viewer for Modx?

Is there any good pdf viewer in Modx ? I searched but cant find a good PDF reader. I dont want to convert my resource to pdf. I want a proper PDF viewer which view the PDF content.
Is there any ?

I think PDF.js is the defacto standard if you want control over how the PDF is rendered, instead of forcing a download or making it use whatever the browser has.

1 Like

Don’t trust any Print CSS solution. Even with the same engine, the results are different on different browsers. Creating a footer on all pages is hell. Using Customer/Web fonts too.

The most reliable solution is currently PDFResouce, but it is somehow limited with float and position absolute.

To display the PDF in the frontend you can use PDF.js for sure.

1 Like

I currently ended up using html5 tag. But I will use pdf.js later.

<embed src="assets/test.pdf" width="100%" height="800"></embed>

I finally decided to implement a full feature solution and trying to add PDF.js in my Modx site.
I am following this fully working example.

Here the pdf source url is in inside the javascript code. How can I get it working with Modx ? Should I add TV here ? Or are there any other proper way to implement… ?

var url = ‘assets/test1.pdf’;