viewing a pdf

Posted by jmls on 05-May-2010 14:33

Does anyone have recommendations for a control to view pdf files ?

We have tried the adobe activex control (memory leaks / lots of crashes) and the html control (several times a day causes the cpu to jump to 100%)

How do you view your pdfs from within Openedge ?

I was looking for some .net control that just works

TIA

Julian

All Replies

Posted by ChUIMonster on 05-May-2010 15:23

My preferred option is to transfer them to my iPad and then use "goodreader"

Somehow I don't think that's quite what yiu had in mind

Posted by jmls on 05-May-2010 15:26

You are right. Not quite.

I'm currently looking at Sumatra pdf

(http://blog.kowalczyk.info/software/sumatrapdf/index.html) with a

view to modifying the source to make it fit our requirements. It

certainly works bloody fast

Posted by Admin on 05-May-2010 15:31

There's no better way to fly :-)

Posted by Peter Judge on 05-May-2010 16:17

Does anyone have recommendations for a control to view pdf files ?

We have tried the adobe activex control (memory leaks / lots of crashes) and the html control (several times a day causes the cpu to jump to 100%)

How do you view your pdfs from within Openedge ?

I was looking for some .net control that just works

This looks painful, no matter what language you try it in. Most of the comments on Stackoverflow say to use the browser plugin, so if you're using Adobe, you're somewhat SOL. Somewhat apropos, I use Foxit for my browser plugin; it works like a charm, and they also provide an ActiveX. So if you're not opposed to the ActiveX route, that may be worth investigating.

-- peter

Posted by jmls on 06-May-2010 08:40

Heh.

Now - taking a different angle - can I embed an external .exe window into a progress abl form or .net form ?

I came across this snippet of code and was wondering if I could make use of it somehow.

Declare Auto Function SetParent Lib "user32" (ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As IntPtr
Dim MyPSI As New ProcessStartInfo("notepad.exe")
Dim MyProcess As Process = Process.Start(MyPSI)
MyProcess.WaitForInputIdle()
SetParent(MyProcess.MainWindowHandle, Me.Handle)

Posted by Peter Judge on 06-May-2010 09:23

There's 2 things here: the call to the external user32 dll, and the forking of a process.

Because I'm lazy ,  here's a related example of the former:

CLASS foo  :

    DEFINE VARIABLE iResult AS INTEGER NO-UNDO.
   
    PROCEDURE MessageBoxA EXTERNAL "user32.dll":
        DEFINE INPUT PARAMETER hwnd AS LONG.
        DEFINE INPUT PARAMETER mbtext AS CHARACTER.
        DEFINE INPUT PARAMETER mbtitle AS CHARACTER.
        DEFINE INPUT PARAMETER style AS LONG.
        DEFINE RETURN PARAMETER result AS LONG.
    END.
   
    METHOD VOID runWindowsProc ():
        RUN MessageBoxA (0,
                        " It's a whole new world, again!!",
                        "ABL DLL Access",
                        0,
                        OUTPUT iResult).
    END.

END CLASS.

And the latter, where cUrl is what you'd expect. This is basically an OS-COMMAND.

  System.Diagnostics.Process:Start(cUrl).

Heh.

Now - taking a different angle - can I embed an external .exe window into a progress abl form or .net form ?


I remember there being something on the 10.2A Beta forum around doing this (but in the spirit of my earlier comment haven't looked for it )

-- peter

This thread is closed