PrintPreview1.SaveToFile "Microsoft Print to PDF", "C:\test.pdf" ' replace the file path with a path where you are allowed to write files If PrintPreview1.PrinterExists("Microsoft Print to PDF") Then To test it, add a PrintPreview control to a form (you need BSPrinter component installed, if you don't have it download it from the download page), add a Command button and this code: What is the code needed to save PDF files with BSPrinter?īSPrinter works with the Printer object, so what you want to save as PDF must be written or drawn there. The Microsoft Print to PDF printer driver that comes with Windows 10 is required to be installed (it is installed by default). How to create and save PDF files with BSPrinter without user interaction Home > BSPrinter documentation > Save PDF files Create and save PDF files in VB6 using BSPrinter
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |