Help – my PDF doesn’t look right!

Here are some common reasons why your PDF may look different from what you expected:

By default, Prince renders HTML using the media type print. That may lead to unexpected outcomes if your document contains a print stylesheet, or if your main stylesheet is scoped to the media type screen.

Fortunately, there is an easy solution: Use "prince_options": {"media_type": "screen"} when calling the API.

Document needs JavaScript to render correctly

Prince supports JavaScript, but it is not enabled by default. If your document requires JavaScript to be rendered correctly, you need to set "prince_options": {"javascript": true} when calling the API.

If Prince cannot execute the JavaScript in your document successfully, you may need to enable JavaScript preprocessing. Check the process log in the EuroPDF for warnings and errors regarding JavaScript.

Unsupported CSS features

Prince supports most but not all CSS features: Prince Docs: Supported CSS specifications

If Prince encounters unsupported CSS features, it will output a warning. You can use the process log in the EuroPDF backend to check for such warnings.

Still doesn’t look right? Ask us!

Didn’t find your answer here? Just contact us, we’re happy to help!