Ms Print to PDF = Ms XPS Document Writer?

@plume thank you very much for sharing the tip.

We’re using flow documents to format document prints. Flow Document is a Microsoft format (like pdf) to prepare rich text documents and you can easily print them or save to xps file without using a xps printer. We’re using this method.

There are multiple ways to create & print a document in Microsoft world. One of them is good at printing flow documents. Other method is great for printing images, etc…

Unfortunately using PrintDocument class method just solves file naming issue however it only provides functions to draw / type stuff into a blank canvas. It can’t just print a flow document. The other method to print the flow document does not have “File Name” property like the PrintDocument class.

So we need to convert Flow Document format to PDF. There is no way to solve that without using third party tools. I know there are lots of PDF Creation tools but we need some specific features. Some tools does not support them or they support it but costs a fortune.

So you need to send receipts in PDF format by law. Obviously you don’t want to deal with file names…

To be able to solve that I created a custom printer (Save Text to PDF Printer) that uses PrintDocument class to send printout to Microsoft PDF Printer without popping up the file name dialog. However it only supports plain text. Hope it helps.

You’ll be able to use it on next update.

4 Likes