Hi,
Is there any way to change the printer settings (like page size etc) at run time while printing the doc though any script.
NOTE: This should not change the default settings of the printer.
Thanks,
Ankit
Anyone have any idea or clue please...
I think you must use the external DLL libraries under windows to achieve this:
PROCEDURE PageSetupDlgA EXTERNAL "comdlg32.dll":U: DEFINE RETURN PARAMETER answer AS SHORT. DEFINE INPUT-OUTPUT PARAMETER tagPSD AS MEMPTR. END PROCEDURE. PROCEDURE PageSetupDlgW EXTERNAL "comdlg32.dll":U: DEFINE RETURN PARAMETER answer AS SHORT. DEFINE INPUT-OUTPUT PARAMETER tagPSD AS MEMPTR. END PROCEDURE.
Thanks Socaciu.
But can you please provide an example for using these procedure from this dll. I am actually new at using dlls in progress code. If you have any reference for it then that will be more helpful for me.
Take a look at this project on GitHub. In the Progress subdirectory it has an example of how to call the methods in a .DLL (or a .so on Linux/Unix) from a Progress program.
The related msdn page contains instruction on how to write the code needed:
look for "Setting Up the Printed Page"