So in this post I will demonstrate how to add the Adobe PDF Printer with Adobe Acrobat sequenced.
The whole procedure is kind of tricky and long so make sure you follow all the steps as I describe here.
You can check how to sequence Adobe Acrobat 9 Pro here and Adobe Acrobat X Pro here.
Also the methods are slightly different for 32 and 64-bit.
First of all download the Windows 2003 Resource Kit from here.
Now install it. If you are in a 64-bit OS you are going to get a warning that there are known compatibility issues with this application. Install it anyway.
Create a temporary folder. I will name it C:\PDFPrinter. Copy Prnadmin.dll and portmgr.vbs from C:\Program Files (x86)\Windows Resource Kits\Tools to C:\PDFPrinter. (In a 32-bit OS the path would be only Program Files without the (x86))
Now you will have to install Adobe Acrobat to one machine to capture some PDF Printer settings and copy the Adobe PDF drivers.
After you install it, go to Device and Printers.
Right click the Adobe PDF printer and select Printer Properties. Click on the Advanced tab and untick the option Enable advanced printing features. Click on OK.
Now open a elevated command prompt and type:
RUNDLL32 PRINTUI.DLL,PrintUIEntry /Ss /n "Adobe PDF" /a "file.dat" 2
Now copy the file.dat file to C:\PDFPrinter.
Also copy the content of the Adobe PDF folder from C:\Program Files (x86)\Adobe\Acrobat 10.0\Acrobat\Xtras\Adobe PDF to C:\PDFPrinter
Now copy the script below to a text file, name it PDFPrinter.vbs and save it to C:\PDFPrinter
Option Explicit
On Error Resume Next
dim CurrentDir, strComputer, objWMIService, WshShell, RegPrnCmd, colInstalledPrinters, AddPrinterCmd, LoadCfgCmd, AddPortCmd
CurrentDir = CHR(34) & "C:\PDFPrinter\"
strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
'******** Register prnadmin.dll file on client computer *******
Set WshShell = Wscript.CreateObject("Wscript.Shell")
RegPrnCmd = "regsvr32 /s " & CurrentDir & "Prnadmin.dll"
WshShell.Run RegPrnCmd,1,TRUE
'************** Create the port first *******************************
set colInstalledPrinters = objWMIService.ExecQuery ("Select * from Win32_Printer Where DriverName = 'Adobe PDF Converter'")
If colInstalledPrinters.Count = 0 Then
AddPortCmd = "C:\Windows\Syswow64\cscript.exe " & CurrentDir & "portmgr.vbs" & CHR(34) & " -a -p " & CHR(34) & "Adobe PDF" & CHR(34) & " -t Local"
WshShell.Run AddPortCmd
AddPrinterCmd = "C:\Windows\Syswow64\RUNDLL32 PRINTUI.DLL,PrintUIEntry /if /b " & CHR(34) & "Adobe PDF" & CHR(34) &" /f " & CurrentDir & "adobepdf.inf" & CHR(34) & " /r " & CHR(34) & "Adobe PDF" & CHR(34) & " /m " & CHR(34) & "Adobe PDF Converter" & CHR(34)
LoadCfgCmd = "C:\Windows\Syswow64\RUNDLL32 PRINTUI.DLL,PrintUIEntry /Sr /n " & CHR(34) & "Adobe PDF" & CHR(34) &" /a " & CurrentDir & "file.dat" & CHR(34) & " 2"
Wscript.Sleep(5000)
WshShell.Run AddPrinterCmd
Wscript.Sleep(8000)
WshShell.Run LoadCfgCmd
End If
Set objWMIService = Nothing
Set wshShell = Nothing
This script is for a 64-bit OS. If you are using a 32-bit OS you don't the full path in the AddPortCmd, AddPrinterCmd and LoadCfgCmd. So instead of using C:\Windows\Syswow64\cscript.exe and C:\Windows\Syswow64\RUNDLL32 use just cscript.exe and RUNDLL32.
Now all you have to do is copy the C:\PDFPrinter folder to the C drive of the computer where you want the PDF printer installed and run PDFPrinter.vbs. Make sure you change the CurrentDir in the script if you don't use the same folder name or location I'm using.
Of course you can deploy this using SCCM or as one of my readers does, install it to a template VDI.
Hi Felipe,
ReplyDeleteFirstly, thanks for this great post. We've tried your instructions on Windows Server 2008 R2 SP1 and for some reason, the script gives an error "Operation could not be completed". Digging deeper through the logs, apparently it doesn't like the driver. But the PDF Printer installs by itself when we try it manually. Any idea what could be missing? Any leads would be more than appreciated.
Thanks for your read.
Rolf
Hi Rolf,
ReplyDeleteThis looks like an error loading the settings.
Try to remove the LoadCfgCmd part of the script and check if it runs correctly.
But just remember that this part is required. So once you identify the issue start troubleshooting why that part is failing.
Cheers
Hi Felipe,
ReplyDeleteWe are also getting same error "Operation could not be completed"while installing installing adobe standard 9.5 driver.still we unable to fix that error.But we were not using network installation. sequenced adobe standard working fine. we need to install driver locally.kindly suggest us.
Regards.
Mahes
Hi Felipe,
ReplyDeleteThanks for the Valuable post.we have sequenced Adobe acrobat standard 9.5 succesfully.but unable to install the Printer driver locally. we have followed as you suggested but getting error "Operation could not be completed".still we were unable to fix this issue. could you guied us....
Regards,
Maheswaran
Hi,
ReplyDeleteAs a first step troubleshooting it try to run this from a elevated command prompt:
RUNDLL32 PRINTUI.DLL,PrintUIEntry /if /b "Adobe PDF" /f C:\PDFPrinter\adobepdf.inf /r "Adobe PDF" /m "Adobe PDF Converter"
Let me know if this works.
Cheers
Hi Felipe,
ReplyDeleteI tried but still same error "Operation could not be completed".
Regards,
maheswaran
Which OS and architecture are you running this?
ReplyDeleteHi
ReplyDeleteWe are using Windows 7, 32 bit.i tried some other method.we have captured all the settings and created one msi. now the printer is installing fine.and port also created as per source.but the problem is i'm unable to convert .txt file to .pdf while printing.it's throwing "Invalid window handle".any suggestion on this
Regards,
Maheswaran
Hi,
ReplyDeleteI think I have seen this before and if I'm not wrong you are getting this because you haven't unticked the option Enable Advanced Printing Features in the printer properties.
Cheers
Hi
ReplyDeleteWe have checked this option.Still same error...i think that is not a correct one since we have installed full adobe application and checked that feature.source is working fine if tick or untick the option also. i think something need to include in the driver app. still checking...... if u have any suggestion please let us know.......
Regards,
Maheswaran
Hi,
ReplyDeleteDuring the sequencing did you replace the Microsoft.VC90.CRT folder and deleted the config files as instructed in the recipe?
If yes check the post below it might be related.
http://forums.adobe.com/thread/303011
Cheers
Hi!
ReplyDeleteDid someone find a solution to install the printer on a Windows 2008 R2 SP1 ? Even manually.
I tried to install the ADOBE PDF printer from Adobe Pro X. The method mentioned in the article does not work in this Windows. Also I copied the drivers from C:\Program Files (x86)\Adobe\Acrobat 10.0\Acrobat\Xtras\Adobe PDF and I tried to install manually from Devices and printer but I don't know which is the driver.
Thank you!
I think there is a problem installing the Adobe PDF Printer driver on a 64-bit OS. We've been testing this an it appears to work just fine if installing from the Acrobat installer, but if you try to install it manually, it errors out.
ReplyDeleteLook in report.wer in the following location for a log of the failure:
c:\users\yourusername\AppData\Local\Microsoft\Windows\WER\ReportQueue
Wish we could get this to work...
Hi Felipe, Thanks for taking the time to write this article and the one on sequencing Adobe Pro X and CS6, all of them very useful.
ReplyDeleteI have used this article and the one to sequence Acrobat X. I have sequenced X successfully and installed the printer - apparently - successfully.
These are the problems I'm having: If I try to print to the Adobe PDF printer from a non virtualized application, the dialogue box to save the PDF file comes up, but the file is not actually created when the OK button is clicked. The other problem I have (from both Acrobat X and XI) is that if I try to import an Office (non-virtualised) file such as a docx, I get an error message "Unable to find Adobe PDF resource files". I have tried this as a standard user and as an admin user. I think both issues may be related as I believe their are both connected to the Adobe PDF printer. The OS is Windows Server 2008 R2. Any ideas? Thanks