Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #268167 > unrolled thread
| Started by | Jeffrey Walton <noloader@gmail.com> |
|---|---|
| First post | 2024-03-08 05:20 +0100 |
| Last post | 2024-03-20 18:40 +0100 |
| Articles | 6 on this page of 26 — 7 participants |
Back to article view | Back to linux.debian.user
libbusiness-us-usps-webtools-perl and USPS Ground Advantage shipping Jeffrey Walton <noloader@gmail.com> - 2024-03-08 05:20 +0100
Re: libbusiness-us-usps-webtools-perl and USPS Ground Advantage shipping gene heskett <gheskett@shentel.net> - 2024-03-08 11:30 +0100
Re: libbusiness-us-usps-webtools-perl and USPS Ground Advantage shipping Charles Curley <charlescurley@charlescurley.com> - 2024-03-08 16:20 +0100
Re: libbusiness-us-usps-webtools-perl and USPS Ground Advantage shipping Jeffrey Walton <noloader@gmail.com> - 2024-03-08 16:40 +0100
Re: libbusiness-us-usps-webtools-perl and USPS Ground Advantage shipping Max Nikulin <manikulin@gmail.com> - 2024-03-08 17:30 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX Max Nikulin <manikulin@gmail.com> - 2024-03-09 17:30 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX jeremy ardley <jeremy.ardley@gmail.com> - 2024-03-09 21:50 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX Max Nikulin <manikulin@gmail.com> - 2024-03-10 04:30 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX jeremy ardley <jeremy.ardley@gmail.com> - 2024-03-10 05:00 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX Max Nikulin <manikulin@gmail.com> - 2024-03-10 08:50 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX jeremy ardley <jeremy.ardley@gmail.com> - 2024-03-10 09:20 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX jeremy ardley <jeremy.ardley@gmail.com> - 2024-03-10 01:00 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX jeremy ardley <jeremy.ardley@gmail.com> - 2024-03-11 03:00 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX jeremy ardley <jeremy.ardley@gmail.com> - 2024-03-12 21:00 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX Max Nikulin <manikulin@gmail.com> - 2024-03-13 18:00 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX jeremy ardley <jeremy.ardley@gmail.com> - 2024-03-14 10:50 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX jeremy ardley <jeremy.ardley@gmail.com> - 2024-03-14 11:00 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX Max Nikulin <manikulin@gmail.com> - 2024-03-10 04:00 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX Florent Rougon <f.rougon@free.fr> - 2024-03-11 12:00 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX Florent Rougon <f.rougon@free.fr> - 2024-03-13 11:40 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX Florent Rougon <f.rougon@free.fr> - 2024-03-13 17:10 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX Max Nikulin <manikulin@gmail.com> - 2024-03-11 17:50 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX Max Nikulin <manikulin@gmail.com> - 2024-03-19 17:10 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX "Thomas Schmitt" <scdbackup@gmx.net> - 2024-03-19 20:00 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX Max Nikulin <manikulin@gmail.com> - 2024-03-20 18:00 +0100
Re: printing QR-codes on labels with 300dpi label printers with LaTeX "Thomas Schmitt" <scdbackup@gmx.net> - 2024-03-20 18:40 +0100
Page 2 of 2 — ← Prev page 1 [2]
| From | Florent Rougon <f.rougon@free.fr> |
|---|---|
| Date | 2024-03-13 17:10 +0100 |
| Subject | Re: printing QR-codes on labels with 300dpi label printers with LaTeX |
| Message-ID | <Ihzl0-gp0L-13@gated-at.bofh.it> |
| In reply to | #268221 |
[Multipart message — attachments visible in raw view] — view raw
Florent Rougon <f.rougon@free.fr> wrote:
> - printer matrix alignment if printer resolution is low (more
> difficult; maybe try with some very small horizontal and veritical
> shifts to see if it helps...).
Thinking about it more, this is probably hopeless unless printer
resolution is *extremely* low. Typical printer dots are so small that
you can't realistically expect paper placement to have good enough
precision to align both grids (say, 1/4 of the printer dot size).
This is, I believe, what Jeremy meant when he wrote earlier in this
thread:
> Getting back to pixel registration, the latex CUPS route is very unlikely to
> work well. However a custom application that generates a pixel perfect bitmap
> that is printed at 100% scale through cups should work.
I agree with that if printer resolution is so low that the QR code and
printer dot grids have to be aligned. Even with perfect size in the PDF,
there is very little hope that paper will be every time correctly
aligned in the vertical and horizontal directions with the matrix of
dots managed by the printer—a dot at 300 dpi being approximately
0.08 mm. The only realistic hopes are:
- high enough resolution that grid alignment doesn't really matter (is
300 dpi enough? Maybe.);
- direct control over the printer bitmap (what Jeremy mentioned).
For the sake of completeness, the following LaTeX document (an inline
attachment) draws a QR code whose modules are correctly placed for some
“ideal” 300 dpi printer. This assumes that printer dots perfectly start
at a dot-size multiple from the top left corner of the physical page,
which probably can't be obtained in practice. So, this is mainly to show
how accurate placement and computations can be done (\fpeval is provided
by xfp; it is very accurate and expandable).
[toc] | [prev] | [next] | [standalone]
| From | Max Nikulin <manikulin@gmail.com> |
|---|---|
| Date | 2024-03-11 17:50 +0100 |
| Subject | Re: printing QR-codes on labels with 300dpi label printers with LaTeX |
| Message-ID | <IgR0B-fXlB-5@gated-at.bofh.it> |
| In reply to | #268191 |
On 11/03/2024 08:06, hw wrote:
> On Sun, 2024-03-10 at 09:50 +0700, Max Nikulin wrote:
>> On 10/03/2024 04:41, hw wrote:
>>> \psbarcode{textblah foo}{height=0.6 width=0.6 eclevel=L}{qrcode}
>>>
>>> That works for 600dpi laser printers. When you print the QR-code with
>>> a 300dpi label printer you can't reliably scan it, not even when you
>>> make the QR-code 1x1" in size.
>>>
>>> Perhaps that's not a reasonable size?
>>
>> Perhaps height and width are chosen improperly. An image some percents
>> smaller may be sharper.
>
> What size do you consider reasonable?
It seems you expect some number that you can use for any QR code. There
is no size that fits for all codes.
Out of curiosity I tried to scan a QR code printed on a thermal printer
(so likely having ~200dpi resolution) having size of approximately 0.8in
and 50 pixels (modules) per inch. It encodes a 69 bytes long link.
Likely the same code scaled to 0.4in will still work, but I would prefer
to avoid it, 0.6in should be more reliable. On your 300dpi printer this
particular QR code may be printed e.g. at ~(0.8/1.5)in.
Fix size of QR code pixel (module), not size of whole QR code.
>> - Find number of pixels in QR code in QR specs (or just calculate them)
>
> Calculate them how or find them where? Pdflatex somehow does it and
> the QR-codes are fine when printed on a laser printer and when shown
> on a 4k display.
"Modules" in Florent's message is what I referred to as QR code "pixels"
and their count depends on "version".
>> - Specify width and height so that the ration of 2 numbers above is a
>> whole number.
>>
>> Image may become a bit larger or a bit smaller.
>
> The QR-code must fit on the label, plus some text. The labels are
> 50x35mm in size.
It limits amount of information you may put into QR codes. You can still
choose to use e.g. 4,5,6, etc. printer dots per QR code module.
> When I zoom in on QR-codes in a PDF viewer, they don't get blurry.
> Perhaps the pst-barcode package uses vector graphics?
Nice, however you have to adjust size to avoid blurring.
[toc] | [prev] | [next] | [standalone]
| From | Max Nikulin <manikulin@gmail.com> |
|---|---|
| Date | 2024-03-19 17:10 +0100 |
| Subject | Re: printing QR-codes on labels with 300dpi label printers with LaTeX |
| Message-ID | <IjKch-cis-1@gated-at.bofh.it> |
| In reply to | #268202 |
On 13/03/2024 12:25, hw wrote: > On Mon, 2024-03-11 at 23:45 +0700, Max Nikulin wrote: >> It seems you expect some number that you can use for any QR code. There >> is no size that fits for all codes. > > It's because you said: "I believed that 300dpi is high enough > resolution for QR-codes of reasonable size if source image has proper > quality." that I keep asking what you consider a reasonable size. QR codes with more modules must be printed at larger size. Isn't it obvious? By the way, is 300dpi real resolution of your printer or it is over-resolution achieved with overstrike with some offset? If so, does the printer driver take it into account? >> Out of curiosity I tried to scan a QR code printed on a thermal printer >> (so likely having ~200dpi resolution) having size of approximately 0.8in >> and 50 pixels (modules) per inch. It encodes a 69 bytes long link. > > Did you successfully scan it? Instantly, no trouble at all. >> It limits amount of information you may put into QR codes. You can still >> choose to use e.g. 4,5,6, etc. printer dots per QR code module. > > How can I choose that? I don't know that there would be an option > with pdflatex or pdf or the printer driver that would let me choose > how many dots per module the printer puts onto the label. When a code is generated you can look at it and count its modules. The next step is simple math. You have resolution, dots per module and number of modules, so you can get size and rerun LaTeX. >>> When I zoom in on QR-codes in a PDF viewer, they don't get blurry. >>> Perhaps the pst-barcode package uses vector graphics? >> >> Nice, however you have to adjust size to avoid blurring. > > How do you mean? I thought vector graphics don't blur when scaled. When vector graphics, that does not match device resolution, is rasterized, the result is either non-even sizes of similar elements or fuzzy lines due to dithering. If a few multiplications and divisions is so hard problem and each QR code module occupy at least 3x3=9 printer dots then I would try to rotate the code by e.g. 30 or 45 degrees before printing.
[toc] | [prev] | [next] | [standalone]
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Date | 2024-03-19 20:00 +0100 |
| Subject | Re: printing QR-codes on labels with 300dpi label printers with LaTeX |
| Message-ID | <IjMQN-e7v-1@gated-at.bofh.it> |
| In reply to | #268401 |
Hi, Max Nikulin wrote: > When vector graphics, that does not match device resolution, is rasterized, > the result is either non-even sizes of similar elements or fuzzy lines due > to dithering. Nitpicking: "Dithering" in raster graphics is emulation of color resolution at the expense of space resolution. Multiple coarsly colored pixels together create the impression of a finer color tone. A certain random aspect is added to prevent unwanted patters. https://en.wikipedia.org/wiki/Dither The fuzzy lines are rather the opposite. They use surplus color resolution to emulate ibetter spacial resolution. Over here the usual term is "Anti-aliasing". https://en.wikipedia.org/wiki/Line_drawing_algorithm https://www.geeksforgeeks.org/antialiasing/ I get a suspiciously high share of german language results when searching this term in the web. But "Computer Grapics" by Foley, Van Dam, Feiner, Hughes of 1990 has a dozen occurences in its Index. Have a nice day :) Thomas
[toc] | [prev] | [next] | [standalone]
| From | Max Nikulin <manikulin@gmail.com> |
|---|---|
| Date | 2024-03-20 18:00 +0100 |
| Subject | Re: printing QR-codes on labels with 300dpi label printers with LaTeX |
| Message-ID | <Ik7sd-rhG-9@gated-at.bofh.it> |
| In reply to | #268403 |
On 20/03/2024 01:51, Thomas Schmitt wrote:
> Max Nikulin wrote:
>> When vector graphics, that does not match device resolution, is rasterized,
>> the result is either non-even sizes of similar elements or fuzzy lines due
>> to dithering.
>
> Nitpicking:
>
> "Dithering" in raster graphics is emulation of color resolution at the
> expense of space resolution.
[...]
>
> The fuzzy lines are rather the opposite. They use surplus color
> resolution to emulate ibetter spacial resolution. Over here the usual
> term is "Anti-aliasing".
I admit "dithering" may be incorrect term, but I am in doubts if that
printer (claimed to have 300dpi resolution, but not suitable for QR
codes) has surplus color resolution. I do not mean anti-aliasing in the
sense of adjusting pixels darkness (and color).
Consider 2 squares having size of 2.5×2.5 pixels. Non-even sizes and
fuzzy lines variants:
███ ██
███ ███
███ █ ██
██ ██
██ ███
Second variant might have sense if an image is treated as a photo
unlikely having regular patterns with horizontal and vertical lines.
[toc] | [prev] | [next] | [standalone]
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Date | 2024-03-20 18:40 +0100 |
| Subject | Re: printing QR-codes on labels with 300dpi label printers with LaTeX |
| Message-ID | <Ik84V-rJM-5@gated-at.bofh.it> |
| In reply to | #268445 |
Hi, Max Nikulin wrote: > I admit "dithering" may be incorrect term, [...] > Consider 2 squares having size of 2.5×2.5 pixels. Non-even sizes and fuzzy > lines variants: > ███ ██ > ███ ███ > ███ █ ██ > ██ ██ > ██ ███ > Second variant might have sense if an image is treated as a photo unlikely > having regular patterns with horizontal and vertical lines. I see ... The second rendering style is probably best described as "Bad Distortion". Have a nice day :) Thomas
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | linux.debian.user
csiph-web