PDF Viewer DLL?

Moderator: Rathinagiri

KDJ
Posts: 167
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland
Been thanked: 153 times

Re: PDF Viewer DLL?

Post by KDJ » Sun Feb 19, 2017 3:44 pm

The following example shows how to:
- resize/maximize Sumatra window,
- display bookmarks panel on start.
Attachments
Sumatra.zip
(6.01 MiB) Downloaded 55 times

User avatar
PeteWG
Posts: 106
Joined: Sun Mar 21, 2010 5:45 pm
Has thanked: 3 times
Been thanked: 25 times

Post by PeteWG » Sun Feb 19, 2017 4:20 pm

andyglezl wrote:
Sat Feb 18, 2017 1:39 am
That is, using the UPX directly in the normal compilation, reduce it more!
Please let me note, that using UPX, if there are no really good reasons to do so, is not a good idea.
And simply reducing the size of executable isn't alone a good reason, since the drawbacks
are significantly more than advantages.-
The same applies for embedding big binaries (like sumatraPDF.exe) into executable.

Using an archiver, like for example the excellent 7-zip, is a much better solution.

best regards,

---
Pete

User avatar
PeteWG
Posts: 106
Joined: Sun Mar 21, 2010 5:45 pm
Has thanked: 3 times
Been thanked: 25 times

Post by PeteWG » Sun Feb 19, 2017 4:37 pm

KDJ wrote:
Sun Feb 19, 2017 3:44 pm
The following example shows how to:
- resize/maximize Sumatra window,
- display bookmarks panel on start.

Quite interesting improvements! :thumbsup:

User avatar
Roberto Lopez
HMG Founder
Posts: 3899
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 135 times

Post by Roberto Lopez » Mon Feb 20, 2017 12:45 pm

KDJ wrote:
Sun Feb 19, 2017 3:44 pm
The following example shows how to:
- resize/maximize Sumatra window,
- display bookmarks panel on start.
Thanks!
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
Roberto Lopez
HMG Founder
Posts: 3899
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 135 times

Post by Roberto Lopez » Mon Feb 20, 2017 12:50 pm

PeteWG wrote:
Sun Feb 19, 2017 4:20 pm
andyglezl wrote:
Sat Feb 18, 2017 1:39 am
That is, using the UPX directly in the normal compilation, reduce it more!
Please let me note, that using UPX, if there are no really good reasons to do so, is not a good idea.
And simply reducing the size of executable isn't alone a good reason, since the drawbacks
are significantly more than advantages.-
The same applies for embedding big binaries (like sumatraPDF.exe) into executable.

Using an archiver, like for example the excellent 7-zip, is a much better solution.

best regards,

---
Pete
In my case, the app, updates itself automatically via the network, and since some clients has slow/unstable connections, minimizing the executable size, saves me a lot of problems, but I agree with you, that if there is no need, it is preferable to avoid EXE compression.

Maybe I should change my updater to work with .7z compressed updates and omit UPX use.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

EduardoLuis
Posts: 517
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina
Been thanked: 28 times

Post by EduardoLuis » Mon Feb 20, 2017 10:23 pm

Hi Friends:

This is my first implementation on Roberto Lopez idea.-
Hopping this helps you and give new ideas.-
With regards.
Eduardo
Attachments
PDF_VIEWER_EXES.zip
(6.84 MiB) Downloaded 42 times
PDF_VIEWER_CODE.zip
(3.6 MiB) Downloaded 53 times

EduardoLuis
Posts: 517
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina
Been thanked: 28 times

Post by EduardoLuis » Mon Feb 20, 2017 10:27 pm

I'm in fault, because i forget to mention that my samples was inspired on KDJ sample posted on this topic.-
Forgive me KDJ and thanks.-
Eduardo

User avatar
bpd2000
Posts: 948
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 118 times
Been thanked: 42 times

Post by bpd2000 » Tue Feb 21, 2017 6:18 am

Print PDF silently on default printer
EXECUTE FILE '"' + cExeFile + '"' PARAMETERS '-print-to-default -exit-on-print' + ' "' + cPdfFile

Print PDF on selected printer
EXECUTE FILE '"' + cExeFile + '"' PARAMETERS '-print-dialog -exit-on-print' + ' "' + cPdfFile
BPD
Convert Dream into Reality through HMG

EduardoLuis
Posts: 517
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina
Been thanked: 28 times

Post by EduardoLuis » Tue Feb 21, 2017 1:05 pm

Hi BDP:

Thanks for your contribution.-
But i get an error message before printing, as i show:
When i accept, print begins.-
I don't understand why.- Please check if is on my case or on everybody.-
Thanks again.-
Eduardo
error_pdfViewer.JPG
error_pdfViewer.JPG (6.57 KiB) Viewed 404 times

User avatar
bpd2000
Posts: 948
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 118 times
Been thanked: 42 times

Post by bpd2000 » Tue Feb 21, 2017 1:58 pm

EduardoLuis wrote:
Tue Feb 21, 2017 1:05 pm
Hi BDP:

Thanks for your contribution.-
But i get an error message before printing, as i show:
When i accept, print begins.-
I don't understand why.- Please check if is on my case or on everybody.-
Thanks again.-
Eduardo

error_pdfViewer.JPG
I have no error, code attached
Attachments
SumatraPrint.rar
(41.34 KiB) Downloaded 30 times
BPD
Convert Dream into Reality through HMG

Post Reply