Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

User cannot change file-extension when Printing to a file

edited May 2012 in General
When enabling the Print to File checkbox in the Printdialog, the Where edit
box is enabled an default filled with a filename and default extension.

So far, so good. But if i want to change the extension of the resulting file
i.e. because that would make it easier for me to open the file in another
application, RB anxiously restores or add the default extension of the
selected filetype :-(

In my opinion this is not the way a DEFAULT extension should work, this way
it is a MANDATORY extension.

- Any change of changing this behaviour in future versions?
- What would be the easiest way to override this behaviour as it is firmly
hardcoded in the events of the PrintDialog?

Thanks




--- posted by geoForum on http://www.newswhat.com

Comments

  • edited May 2012
    Sorry, seems my earlier posting on this subject did make it to the
    servers ...

    Op 1-5-2012 13:20, Bascy schreef:
  • edited May 2012
    Hi Bas,

    This is functioning as designed. Each file device defines its own file
    extension and this extension is checked before the file is exported.
    This is to prevent an incorrect file from being created and was added
    due to popular demand.

    One option would be to create and register simple file device descendent
    that defines a new extension. For an example, take a look at the
    TppDocDevice class located in the ppRTFDevice.pas file. This device is
    essentially the RTF device with the extension changed to ".doc".

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.