Page 4 of 17

Re: PDF Viewer DLL?

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

Re: PDF Viewer DLL?

Posted: Sun Feb 19, 2017 4:20 pm
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

Re: PDF Viewer DLL?

Posted: Sun Feb 19, 2017 4:37 pm
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:

Re: PDF Viewer DLL?

Posted: Mon Feb 20, 2017 12:45 pm
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!

Re: PDF Viewer DLL?

Posted: Mon Feb 20, 2017 12:50 pm
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.

Re: PDF Viewer DLL?

Posted: Mon Feb 20, 2017 10:23 pm
by EduardoLuis
Hi Friends:

This is my first implementation on Roberto Lopez idea.-
Hopping this helps you and give new ideas.-
With regards.
Eduardo

Re: PDF Viewer DLL?

Posted: Mon Feb 20, 2017 10:27 pm
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

Re: PDF Viewer DLL?

Posted: Tue Feb 21, 2017 6:18 am
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

Re: PDF Viewer DLL?

Posted: Tue Feb 21, 2017 1:05 pm
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 5881 times

Re: PDF Viewer DLL?

Posted: Tue Feb 21, 2017 1:58 pm
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