I also used to send customers invoices , lot of customers said they cannot open xps in the system, they might be using mac, or somethjing.
so i save this as pdf with same file name and it will send email always with same name, it asks to overwright , otherwise i tried cute pdf which is good and can save to same file . However pdf is very common and popular nowadays, hope one day we will have all reports genarate in pdf too looking forward for this feature .
I agree having a native feature to save reports etc as PDF would be very beneficial. Customers want PDF, they don’t understand what XPS is and even it opens in any Windows PC, you need apps to open it on iPhone or Android, which most customers want to do with their reports especially if sent by email.
To make it short:
I emit 2 types of Bills for the same meal but different types of customer:
Boleta: basic (a lot)
Factura: for customers realated to company and who want to put their meal in their company cost.
For factura I need to send mail. (i is not exactly true, it is much more stupid than that but the fact is that, yes, indeed, I need by law … if you are interested, I send you theprocess via pm.)
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.
lol while thinking about how to print the logo image I thought converting whole document to a single image and print image to pdf. I think that worked great…
I tried this , peefectly saving without poping but befor when print to pdf it was printing in A4 size , now its showing in half the page only . I tried to change line character count , but no change . Is any setting we need ? I try to attach a pic when am at computer .
This solved my invoice sending through mail, before i always need to save with same name and same loaction . thank you @emre . And the same can we do with reports save yet ?