Forum moved here!

Home / DDE command for embedded reader

Indysoft

Dear Members!

I succesfully embed the v3.2 Portable Reader in my Delphi application by invoking the reader with
CreateProcess WinApi function, passing the “PathToReader\SumatraPDF.exe -plugin hwndContainer xy.pdf” command line.

I have 2 questions:

  • is it possible to leave out the xy.pdf filename from the command line? If it is missing, the application doesn’t start up, but with the PDF filename there is no problem
  • I can send DDE commands to the standalone application, but when I embed it to my Delphi Form, it does nothing for my DDE-commands. Is there any other way to control the embedded application?
    Or is there a trick for the embedded reader controlling by DDE?

Thanx!!! :slight_smile:

GitHubRulesOK

@Indysoft

NPAPI plugin mode is depreciated and reputedly never did support DDE
see https://github.com/sumatrapdfreader/sumatrapdf/pull/511

To answer the first question possibly since without a filename I can see this but can’t open a second file to replace it, only by opening a second window.
image
image
As always there are ways to work around that limitation (in some known cases), but since it is a limitation it would only work for a specific sub set of circumstances that would likely make it too limited for general use.

There may be a separate way to build a headless window but that’s best asked at GitHub but first be clear about / understand GPL3 implications https://github.com/sumatrapdfreader/sumatrapdf/issues/456

e.g. best to approach Artifex for commercial SDK usage

Indysoft

Wow, thanks man!!! :slight_smile: Will try ASAP. :slight_smile: