Exclusion area mismatch in "raster" image #120
-
Hi lets say on UI I have viewport size ~595x842px when using HTML canvas and https://mozilla.github.io/pdf.js/ for rendering PDFs on browser and I define some exclusion areas according to this pixel size of viewport but during the comparison WritableRaster width and height of the same PDF are 2480x3507 (unit is in pixels I suppose, maybe not) and now those exclusion areas are tiny yellow rectangles on the result PDF images. My current idea is to find the ratio between either width or height and multiply exclusion area coordinates by ratio and get "proper" exclusion area size. Any ideas is there any magical property somewhere for this purpose or how to do it properly? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
PdfCompare renders a page to a bitmap. The ratio is given in the properties and defaults to 300 DPI. |
Beta Was this translation helpful? Give feedback.
PdfCompare renders a page to a bitmap. The ratio is given in the properties and defaults to 300 DPI.
The readme explain Exclusions:
// entries without a unit are in pixels. Pdfs are rendered by default at 300DPI
// entries can also be given in units of cm, mm or pt (DTP-Point defined as 1/72 Inches)