Re: Windows printing with the use of DeviceContext
Todd Fiske <[email protected]> Wed, 9 Nov 2022 19:50:14 -0500
| Newsgroups | gmane.comp.python.windows |
|---|---|
| Message-ID | <CAL2OYuPDmYMiqb076ddhPQ80ZBBE_U+mRy3_ub6M1ypQtUasjg@mail.gmail.com> |
Hi Antoine, If you ever do want to use the Windows printing API, there is a library called MSWinPrint that provides a wrapper that makes it easier to use and understand. https://pypi.org/project/MSWinPrint/ But I also agree with the others that the PDF option is more general and practical. I've used ReportLab for generating PDFs but will give the PyMuPDF library a try too. https://www.reportlab.com/ Todd On 11/9/22, Antoine FINET <[email protected]> wrote: > Thank you very much Neil Kenig, the PyMuPDF library will completely meet my > needs and seems super easy to use. > In 15 minutes of tests, I managed to process one of the fields and the > management of the step between the boxes (one letter per box). > > Many thanks also to you Tim Roberts for the initial answer as well as > co-opting Neil's answer. > > Going through PDF rather than attacking the Windows printing API will > probably save me a lot of time as well as a few gray hairs (more). > > Thank you again for your participation and your answers to my question, > it's so nice. > > Kind regards, > > Antoine