Problem calling [TWPRichText component].PrintDialog

  • Hi all.


    When I call SomeWPRichTextComponent.PrintDialog , I always get a "Printer selected is not valid" exception. I can print from other apps (word, notepad, delphi and so on), and have more than one printer (including PrimoPDF driver) and all of the work, just my own app doesn't.

    Anyone have any ideas what's up with that? This is a really annoying problem...


    TIA,
    Antti Kurenniemi

    • Offizieller Beitrag

    Hi,

    do you swicth the current printer using Printer.PrinterIndex?

    If yes, you need to call GetPrinter/SetPrinter to work around a VCL bug which causes the current DEVMODE structure used for the next printer . despite this structure may have a variable size.

    Julian