ahrm / sioyek

Sioyek is a PDF viewer with a focus on textbooks and research papers
https://sioyek.info/
GNU General Public License v3.0
7.11k stars 235 forks source link

rendering issues with file with different bg colors #1149

Open nikinbaidar opened 2 months ago

nikinbaidar commented 2 months ago

I tried to open a beamer presentation with a black canvas. If you set the background_color of sioyek to black as well, this annoying little border is shown on the right side, and also at the bottom. The bottom one is probably my page separator, but even if I set the page_separator_width to 0, the border on the bottom still exits at the end of the last page of the file.

sioyek_right_border_issues Example pdf

EDIT: I checked this with zathura, and it works fine there.

ahrm commented 2 months ago

This happens when document size is not an exact integer and mupdf rounds up. Added a "background_pixel_fix" config option in https://github.com/ahrm/sioyek/commit/40151569b95cac47d708447b181e645178082aa0 which works around this issue by simply not rendering the last pixel row and column.

nikinbaidar commented 2 months ago

This addresses my concern. Thank you very much!

nikinbaidar commented 1 month ago

Setting background_pixel_fix = 1 messes up freehand drawings. The drawings aren't displayed at all.