PDF Viewer DLL?

Moderator: Rathinagiri

Post Reply
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

PDF Viewer DLL?

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

PDF Viewer DLL?

Post 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
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
EduardoLuis
Posts: 682
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

Re: PDF Viewer DLL?

Post 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
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: PDF Viewer DLL?

Post by Rathinagiri »

What Roberto feels is, HMG applications should have an independent PDF viewer.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

PDF Viewer DLL?

Post 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
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: PDF Viewer DLL?

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: PDF Viewer DLL?

Post 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.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
trmpluym
Posts: 303
Joined: Tue Jul 15, 2014 6:52 pm
Location: The Netherlands

Re: PDF Viewer DLL?

Post 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
KDJ
Posts: 243
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland

Re: PDF Viewer DLL?

Post 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
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: PDF Viewer DLL?

Post 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!
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply