Conversation
Bumps [qrcode](https://github.com/kennytm/qrcode-rust) from 0.14.0 to 0.14.1. - [Release notes](https://github.com/kennytm/qrcode-rust/releases) - [Commits](https://github.com/kennytm/qrcode-rust/commits/v0.14.1) --- updated-dependencies: - dependency-name: qrcode dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
|
Merged as 01009da. Thanks! |
|
Thanks for reviewing, approving and merging the suggested changes in this PR, @sorairolake, very much appreciated! 😄 I look forward to the next release of qrtool and will keep a keen eye on the releases 👀 |
|
@afh I generated a PDF file from PIC with the following (2bb143a): qrtool encode -t pic "QR code" | groff -Tpdf -p -P-p3i,3i > output.pdfThe result of converting this PDF file to a PNG image is as follows: magick output.pdf output.pngThis seems like an incorrect result to me. How can I produce the correct result? Environment$ groff --version
GNU groff version 1.23.0
Copyright (C) 2022 Free Software Foundation, Inc.
GNU groff comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of groff and its subprograms
under the terms of the GNU General Public License.
For more information about these matters, see the file
named COPYING.
called subprograms:
GNU grops (groff) version 1.23.0
GNU troff (groff) version 1.23.0
$ lsb_release -sd
"Arch Linux" |
|
Thanks for reaching out, @sorairolake. TL;DR: qrtool encode -t pic "QR code" \
| awk 'BEGIN{print ".vs 0\n.po 0\n.PS"} END{print "scale=25.4*3\n.PE"} {print}' \
| groff -Tpdf -p -P-p3i,3i \
> output.pdfTo make the QR code fill the PDF page (as I think you intend to) the TL;DR example does the following:
Given the nature of PIC (or my understanding of it) it isn't as much of a stand-alone graphics format, but rather something that is pre-processed and then embedded in groff or TeX documents. What From my experience it is easier/more convenient to have a document that uses
where .PS
# other document specific PIC code to "customize/annotate" the QR code
copy "qrcode.pic"
.PEis easier/more flexible than:
where .so qrcode.picWhat would be ideal, I guess, is a stand-alone mode, in which qrtool (or qrcode-rust) adds the surrounding Hopefully I've been able to explain well what the idea of how to use this is. Happy to hear feedback on where this maybe falls shorts or could be improved 🙂 What do you think, @sorairolake? 1 ℹ️ I am the author of the PRs (kennytm/qrcode-rust#65, kennytm/qrcode-rust#66) that add support for PIC to qrcode-rust and any short-comings in these are my |
|
@afh I think it would be useful if the documentation of the Based on your comments, I'll add to the README how to do something similar to the following: qrencode -t PIC "qrencode PIC test" | groff -Tpdf -p -P-p3i,3i > qrcode.pdf |
|
Sounds good, @sorairolake, do let me know if I can help with anything related 🙂 |
|
I didn't look closely at I think the output of the |

Description
Add support for PIC output format, which was added to
qrcode-rust0.14.1(released July 5th) withkennytm/qrcode-rust#65.Unfortunately my Rust expertise is rather lacking, hence the crude implementation. I'd greatly appreciated advice and guidance on how to improve this PR. I'm dissatisfied with the
if-elsein order to handle the givenmodule_sizeand dislike that thereforemarginis ignored.Trying to follow the same approach as
to_svgand callmodule_dimensionson a previously created renderer:result in the following error for me:
Hopefully I've been able to explain well, what I'd like to achieve and which errors I run into, if not please ask me to clarify 🙂
ℹ️ This PR includes the changes from #539 (pending review and approval) to update
qrcode-rustto0.14.1Additional context
— Wikipedia
It is most commonly used in typesetting documents using implementations of roff, such as GNU roff, Plan 9 troff, or heirloom doctools to name a few.
Checklist