[python-win32] Windows printing with the use of DeviceContext

Todd Fiske toddfiske at gmail.com
Wed Nov 9 19:50:14 EST 2022


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 <afnetpf at gmail.com> 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


More information about the python-win32 mailing list