Page 1 of 17

PDF Viewer DLL?

Posted: Sun Feb 12, 2017 10:06 pm
by Roberto Lopez
Hi All,

This is the situation:

Since (about) two years, I'm creating all my reports in PDF format, even when its primary destination be, to be printed. The reasons for that are pretty obvious (e-mail, Whatsapp, archive, etc.).

The 'problem' (at least, for me) is the following:

I want to be in complete control of the user experience, and when I use Activex interface to create a view for a PDF document, I'm not in control of the situation.

User has different PDF Reader versions, some of them has a broken installation with Activex not working, in some (a lot of) machines it is slow and (according to the installed version) the things that the user can do with the document (and the way to do it) are different.

My first idea is to use a portable PDF viewer like Sumatra: It is small, fast, simple and do the job, but being an external program, again, I'm not in complete control of the situation.

So, I guess that the ideal solution could be a DLL that allow to me to embed the document in a HMG window (the same way that QHTM does with HTML files).

Does such DLL exists?

Or...

Another solution that someone had implemented?

TIA.

PDF Viewer DLL?

Posted: Sun Feb 12, 2017 10:21 pm
by Pablo César
I've never used SUMATRA but I've heard a lot about it, it might be a good idea to implement it in HMG.

Here I found the site, where it says own the DLL:
 
https://www.sumatrapdfreader.org/downloadafter.html
 
And something about DLL implementation:
http://forums.fofou.org/sumatrapdf/topic?id=2688

Re: PDF Viewer DLL?

Posted: Mon Feb 13, 2017 6:17 pm
by EduardoLuis
Hi Roberto:

Perhaps i don't understand what you ask for.-
What do you mean with "I want to be in complete control of the user experience".-
As you all print/preview outputs of my app are PDF, and never feel the need of controlling end user about that output.-
In some cases i without any activity of end user, each pdf is encripted and stored on a table for future restoration.-
If you please clarify what you mean with "complete control", so i can try to help you.-
With regards as allways.
Eduardo

Re: PDF Viewer DLL?

Posted: Mon Feb 13, 2017 6:32 pm
by Rathinagiri
What Roberto feels is, HMG applications should have an independent PDF viewer.

PDF Viewer DLL?

Posted: Mon Feb 13, 2017 6:49 pm
by Pablo César
FiveWin has an option:

viewtopic.php?p=40821#p40821

Here I based on FW idea to use RICHEDIT5 and which Mr. Kevin Carmody answered something about it:

viewtopic.php?p=46488#p46488

Re: PDF Viewer DLL?

Posted: Mon Feb 13, 2017 8:07 pm
by Roberto Lopez
Rathinagiri wrote: Mon Feb 13, 2017 6:32 pm What Roberto feels is, HMG applications should have an independent PDF viewer.
Exactly that.

I have an application that is deployed in many 'remote' machines. Is very difficult to me to have control of Adobe reader version installed and its working state on those PCs.

This difficulty is related with the fact, that external organizations (where the app is used) has their own IT people in charge and I'm not able to remote control the users machines and fine-tune them.

So, my idea is to deploy an 'autonumous' app, that not relies on an 'system-installed' PDF viewer.

Re: PDF Viewer DLL?

Posted: Mon Feb 13, 2017 8:18 pm
by Rathinagiri
To solve this issue, I use Sumatra Portable PDF application and bundle that exe along with my application. It doesn't require any dll file or installation requirement. It runs out of the box.

Re: PDF Viewer DLL?

Posted: Mon Feb 13, 2017 10:00 pm
by trmpluym
Roberto,

I also use the portable Sumatra PDF solution. In my code i use:

Code: Select all

EXECUTE FILE "SumatraPDF.exe" PARAMETERS cPDFFile
When you run it like this it does not interfere with the installed PDF reader solution (like Adobe PDF Reader).

And... the speed is fantastic !

Theo

Re: PDF Viewer DLL?

Posted: Mon Feb 13, 2017 10:24 pm
by KDJ
SumatraPDF uses MuPDF library to rendering.
I found something on this subject:
https://www.codeproject.com/Articles/49 ... -Invoke-in
https://www.codeproject.com/Articles/57 ... er-Control

Re: PDF Viewer DLL?

Posted: Mon Feb 13, 2017 10:28 pm
by Roberto Lopez
Theo, Rathi,

Yes... Sumatra portable is fantastic.

The only possible issue is that the user could click outside Sumatra window, being overlapped by HMG app, but, This could be solved using: EXECUTE FILE ... WAIT

Thanks!