Print pdf files to "Adobe PDF" printer? (1 Viewer)

hfl

Registered User.
Local time
Today, 19:32
Joined
Sep 17, 2015
Messages
31
Hello :)

In Access I make calibration reports which I digitally sign with Adobe and that part works perfect but I have run into a small problem, now I need to merge a lot of different calibration reports into one pdf file and I can't do that as long as the reports is signed.

My workaround is opening each Adobe pdf file and print them to Adobe PDF manually to keep the signature image and then merge all the Adobe pdf files but I want to automate this part and I am stuck on print to Adobe PDF.

I am able to set the default printer to Adobe PDF but I need some sort of code that will print pdf files with Adobe PDF to another folder without any input from me.

Code:
'Copy Selected pdfs to temp folder
Call GetPDFsTemp(Me)

'Set printer to Adobe PDF
Set Application.Printer = Application.Printers("Adobe PDF")

'Missing code to print pdf files in temp folder to Adobe PDF without any input from user

'Set the Default Printer back to default
Set Application.Printer = Nothing

'Merge pdf files in temp folder
Call MergePDF(Me)

Any help is appreciated :)
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 18:32
Joined
Jan 14, 2017
Messages
18,186
If you are using Access 2007 or later, you don't need to use the Print to PDF approach.
Instead just save the report as PDF using VBA or from the Print Preview ribbon and specify the file name and location.
 

Ranman256

Well-known member
Local time
Today, 14:32
Joined
Apr 9, 2015
Messages
4,339
Can you just use:
Docmd.output
 

hfl

Registered User.
Local time
Today, 19:32
Joined
Sep 17, 2015
Messages
31
That is what I am doing first + digitally signing them with Adobe.

But then later I might want 20 of the 950 pdf calibration reports in the database merged into one pdf file and I can't merge signed pdf files so I need to be able to print to Adobe PDF before merging and that is where I am stuck...
 

Minty

AWF VIP
Local time
Today, 18:32
Joined
Jul 26, 2013
Messages
10,355
Taking a step back here, how were you planning on choosing those files?
Trying to pick 20 out of 950 is a lot of lines to put into a list box, or even to scroll through on a continuous form and keep track of what you have and haven't selected.

The answer to the above will influence the best solution.
 

hfl

Registered User.
Local time
Today, 19:32
Joined
Sep 17, 2015
Messages
31
Selecting and copying the pdf reports to a temp folder is not a problem, I select the Adobe pdf files I want from a searchable continuous form :)

edit-
I see I worded myself badly saying I open each report (like in Access report) when I meant Adobe pdf report file.

Sorry about that.
edit-
 

Minty

AWF VIP
Local time
Today, 18:32
Joined
Jul 26, 2013
Messages
10,355
So you literally need to list the files from the Temp directory, and loop through them to print via Adobe to the same tempfolder as a merged document ?

I think you'll need some form of Adobe API to preform the merge, as I'm guessing your bit of code that says

Call MergePDF(Me)

Is air code and not already in existence?
 

hfl

Registered User.
Local time
Today, 19:32
Joined
Sep 17, 2015
Messages
31
Late to pick up the kids from kindergarten but solved my problem by converting the pdf files to .ps files instead, then converting back to .pdf files with pdfDistiller and then doing the the merger :)

Thanks for any help anyway :)
 

Users who are viewing this thread

Top Bottom