PDF Viewer DLL?

Moderator: Rathinagiri

KDJ
Posts: 243
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland

Re: PDF Viewer DLL?

Post by KDJ »

The following example shows how to:
- resize/maximize Sumatra window,
- display bookmarks panel on start.
Attachments
Sumatra.zip
(6.01 MiB) Downloaded 326 times
PeteWG
Posts: 176
Joined: Sun Mar 21, 2010 5:45 pm

Re: PDF Viewer DLL?

Post by PeteWG »

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
PeteWG
Posts: 176
Joined: Sun Mar 21, 2010 5:45 pm

Re: PDF Viewer DLL?

Post by PeteWG »

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: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: PDF Viewer DLL?

Post by Roberto Lopez »

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: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: PDF Viewer DLL?

Post by Roberto Lopez »

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: 682
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

Re: PDF Viewer DLL?

Post by EduardoLuis »

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 274 times
PDF_VIEWER_CODE.zip
(3.6 MiB) Downloaded 315 times
EduardoLuis
Posts: 682
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

Re: PDF Viewer DLL?

Post by EduardoLuis »

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: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: PDF Viewer DLL?

Post by bpd2000 »

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: 682
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

Re: PDF Viewer DLL?

Post by EduardoLuis »

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 5715 times
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: PDF Viewer DLL?

Post by bpd2000 »

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 277 times
BPD
Convert Dream into Reality through HMG
Post Reply