Skip to content

[BUG] Small images are upscaled to full page size in PDF export (regression from #231) #256

Description

@ShowhyT

Problem Description

After the fix introduced in #231, small images are being upscaled to fill the entire page in PDF export. An image that is physically small (e.g. 214×453px) should render at its natural size or scale to fit content width. Not stretch to the full printable page height.

Steps to Reproduce

  1. Add a small portrait-oriented image to a note (e.g. 214×453px at 91 dpi)
  2. Export the note to PDF
  3. Open the exported PDF and observe the image size

Expected Behavior

Small images should render at their natural size (or scale proportionally to fit the content width if narrower than the page), without being upscaled to fill the full page height.

Actual Behavior

The image is stretched/upscaled to occupy the full printable page area, regardless of its original small dimensions.

Test Case

Image size DPI Expected render size Actual render size
214×453px 91 dpi ~2.35×4.98in (natural) Full page (~7.1×9.3in)

Environment

  • OS: Windows 11
  • Application Version: ZenNotes v2.7.0

Screenshots

PDF: Заметка 2026-06-24.pdf

Image

Source Image:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions