Home General

No FileName on printer dialog

Hi,

When I press the print button on the preview and choice for 'Microsoft Print to PDF' then the dialog to save the pdf there is no filename like in the property of .PrinterSetup.DocumentName

Comments

  • Hi Christoph,

    ReportBuilder does not interact directly with printers or printer drivers. It uses generic Windows API calls which in turn communicate with compatible printer drivers to "print" the report. The dialog shown when using the PDF printer driver included with Windows (Microsoft Print to PDF) is not part of ReportBuilder.

    Have you tried using the built-in PDF export device? You can pre-define the PDF file name using the Report.TextFileName property.


    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • Hi Nico,

    Is there an example how to use the built-in PDF export device?
    Can I have a export PDF button on the preview?

    Now I set the properties to view the document.

    DefaultFileDevicetype: PDF
    DeviceType: Screen -- to see on Preview
    TextFileName: ($MyDocuments)\Report.pdf


    Regards
    Christophe
  • Hi Christoph,

    You can enable exporting to file by setting the Report.AllowPrintToFile property to True. This also enables an "Export to File" button in the preview.

    1. Take a look at the help topic for the TppPDFDevice. This gives a basic description of the feature as well as a code example.

    2. Take a look at the following article on PDF fundamentals.
    https://rbwiki.digital-metaphors.com/output/pdf/pdf-fundamentals/

    3. There are a number of other useful PDF articles available in the same directory:
    https://rbwiki.digital-metaphors.com/category/output/pdf/


    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2022
    Good Question. I think it depends upon your printer. Just look for the same. And thanks for the best suggestions.
Sign In or Register to comment.