Hello,
We develop an app that contains a functionality for printing a PDF file. We use this command to print it:
FUNCTION long ShellExecuteA( long hWnd, REF String ls_Operation, REF String ls_File, REF String ls_Parameters, REF String ls_Directory, INT nShowCmd ) library 'shell32' alias for "ShellExecuteA;Ansi"
Where the Operatoin param is "print" and the ls_file param is the file to print. It prints to the user's current active printer.
When it is printed in this way, we are having a problem... the resulting print does not use the "Fit to page" concept. Since the headers of the PDF are near the top, our customers are seeing that it gets "cut-off" from the print.
I do see if I print the same PDF using this method:
"C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /t "C:\myPDF.pdf" "My Printer"
That it *does* respect the "fit to page" concept. The headers/footers are not cut off, and it prints great. You can visibly see that it slighly "shrunk" compared to the "shell print method"'s equivalent PDF print.
We want to keep the app using the "Shell Execute" method, so our customers may use different software (Including Adobe Acrobat) for printing PDF files, etc. And it seems to be the cleaner way to do it. Is there a way to make it so the "Shell print" command can be made to respect the "fit to page" options? Perhaps through one of the params?
If there's a way to do it via an option that is permanently stored... that is okay as well. Our customer could push out a registry change via a domain script, etc.