donhannam
asked on
Access 2010 Print PDF from file - Shrink A3 to A4
I have a print option the prints a job sheet from access and then prints a list of files listed on the job. I have used the Shell Execute to print these if they are PDF's:-
Call ShellExecute(Application.h WndAccessA pp, "print", strfilepath, "", "", 0)
This all works fine however some of the files are in A3 format and only have A4 in the tray so only prints part of the page.
If you open the PDF and print (Ctrl P) and you choose Fit to Printable area or Shrink oversized pages they print on A4 OK. (Obviously smaller size but this is OK)
Is there any way I can pass this print property to the printer so A3 prints on A4 paper?.
Call ShellExecute(Application.h
This all works fine however some of the files are in A3 format and only have A4 in the tray so only prints part of the page.
If you open the PDF and print (Ctrl P) and you choose Fit to Printable area or Shrink oversized pages they print on A4 OK. (Obviously smaller size but this is OK)
Is there any way I can pass this print property to the printer so A3 prints on A4 paper?.
Not with ShellExecute...
Access will typically store this info for each report.
So it would seem that you would have to create some fairly complex code to read that setting, then dynamically change the printer properties.
Either that, or print the A3 and A4 reports separately...
Let's see what other experts may post....
JeffCoachman
Access will typically store this info for each report.
So it would seem that you would have to create some fairly complex code to read that setting, then dynamically change the printer properties.
Either that, or print the A3 and A4 reports separately...
Let's see what other experts may post....
JeffCoachman
Are you actually creating the PDFs from Access, or printing PDF files which may or may not have been created from Access? If you are creating the PDFs directly from Access, you can use this syntax instead of the Shell command:
DoCmd.OutputTo objecttype:=acOutputReport, _
objectname:=strReport, _
outputformat:=acFormatPDF, _
outputfile:=strPDFFile
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the comments - to clarify I am not creating a report or PDF in access just wanting to print a PDF that is stored in a file. After printing a job sheet I also want to print some drawings which are stored on server. I record the file path in access and to print use the above shell execute command to print.
Helen - looks like there may be some way to temporarily change the default printer properties and then set these back. I had a look at the printer properties and there is a "Fit to Size property on my printer'. However when set the default to this and I open a page in Adobe reader and print it does not use this - need to set "Shrink Oversized pages" in Adobe print dialog.
Not sure if there is any way to change the print settings for Adobe reader?.
Helen - looks like there may be some way to temporarily change the default printer properties and then set these back. I had a look at the printer properties and there is a "Fit to Size property on my printer'. However when set the default to this and I open a page in Adobe reader and print it does not use this - need to set "Shrink Oversized pages" in Adobe print dialog.
Not sure if there is any way to change the print settings for Adobe reader?.
Open in new window