Add a setting for the DPI of the png image

Created on 20 February 2025, about 1 month ago

Problem/Motivation

For printing the PNG it might be useful to be able to set the DPI of the image?

Print typically uses 300 DPI while web uses 72, if I remember correctly.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Anybody
  • πŸ‡ΊπŸ‡ΈUnited States tr Cascadia

    What are you trying to do? Control the size of the image? Make sure the image quality is good when printed?

    The image size is completely controlled by the HTML markup. The barcode will appear with the same size relative to the page whether displayed on a screen or whether printed. DPI is not an issue.

    If you want to make sure the image has enough pixels to be rendered with high quality when printed, well the answer is that it does. This is due to the nature of barcodes, where all the straight edges are either vertical or horizontal, and there are only two colors (black/white in most cases).

    Bottom line, use the width and height options to control the number of pixels, and edit the template files if you want to display a barcode with a lot of pixels at a smaller size. "DPI" doesn't really have any relevance in this context.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Thanks @tr!

    Make sure the image quality is good when printed?

    Exactly.

    Bottom line, use the width and height options to control the number of pixels, and edit the template files if you want to display a barcode with a lot of pixels at a smaller size. "DPI" doesn't really have any relevance in this context.

    Thank you very much, I now solved it this way.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024