PDF Viewer DLL?

Moderator: Rathinagiri

Post Reply
User avatar
Roberto Lopez
HMG Founder
Posts: 3881
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 110 times

PDF Viewer DLL?

Post by Roberto Lopez » Sun Feb 12, 2017 10:06 pm

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: 4053
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 175 times

Post by Pablo César » Sun Feb 12, 2017 10:21 pm

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: 494
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina
Been thanked: 22 times

Post by EduardoLuis » Mon Feb 13, 2017 6:17 pm

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: 5105
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 95 times
Been thanked: 107 times
Contact:

Post by Rathinagiri » Mon Feb 13, 2017 6:32 pm

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: 4053
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 175 times

Post by Pablo César » Mon Feb 13, 2017 6:49 pm

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: 3881
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 110 times

Post by Roberto Lopez » Mon Feb 13, 2017 8:07 pm

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: 5105
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 95 times
Been thanked: 107 times
Contact:

Post by Rathinagiri » Mon Feb 13, 2017 8:18 pm

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: 190
Joined: Tue Jul 15, 2014 6:52 pm
Location: The Netherlands
Has thanked: 4 times
Been thanked: 11 times

Post by trmpluym » Mon Feb 13, 2017 10:00 pm

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: 159
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland
Been thanked: 140 times

Post by KDJ » Mon Feb 13, 2017 10:24 pm

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: 3881
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 110 times

Post by Roberto Lopez » Mon Feb 13, 2017 10:28 pm

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

Who is online

Users browsing this forum: No registered users and 1 guest