Why is the PDF Quality in the WX Pack so bad?


We would like to use the WXpack and the PDF Viewer, but the display quality is very poor.
is there anything that can be improved?it is very blurry. We are using


We cannot reproduce this here but most likely the embedded browser cannot retrieve the correct DPI settings.

You can test this by right-clicking the component at run time and click Inspect. From there in the browser console if you write window.devicePixelRatio you should see the appropriate scaling for your monitor (for example: 1.5 = 150%).

If there is a mismatch between the result and your monitor scale you can try to toggle your DPI Awareness setting in your project (alternatively, set it to something else then back to Per Monitor v2).

Hi, there ist no mismatch.
1 = 100%

Are you using VCL or FMX?
Is it also blurry when you zoom in? Each PDF page is drawn onto an HTML canvas. If the resolution of a page is too big compared to the area it is being drawn to, it might look poor quality.

We are using FMX. when i zoom in it is no longer blurry but you have to zoom in far

and thats not a solution for us.

The TTMSFNCWXPDFViewer component uses PDF.js. It is this library that paints the contents of the PDF page onto an HTML canvas in our component. We'll look to see if the downsampling can be improved.

1 Like

Could an improvement already be generated?

The underlying library does not offer an out of the box solution for this. It's still on our todo list to investigate further.

In the meantime can you check if it's blurry for you on 150% screen scaling?

Are you working on a setup with multiple monitors? All of them are 100% scaling?

What is your IDE version? With 10.4 we see the following when running the demo:

It renders crisp without modifying anything.