Adobe Reader Supply Command Line Options

  

Many large enterprises use Microsoft’s Application Virtualization product, App-V, to distribute applications throughout their organization. They do this because they want to isolate the core of the applications from differences in computers and other applications installed, plus they want to pre-configure many of the features prior to deployment. The ubiquitous Adobe Reader application has long been a prime candidate to deploy through App-V, although in the past there were technical issues as Adobe increased the built-in security of the product and these security changes conflicted with App-Vs own efforts to secure the assets. But this is no longer the case, Adobe Reader DC and App-V 5.1 work great together.

  1. Adobe Reader Supply Command Line Options List
  2. Adobe Reader Supply Command Line Options Download
  3. Adobe Reader Supply Command Line Options Free
  4. Adobe Reader Supply Command Line Options Cheat

Just to be clear, I am talking about the free Adobe Acrobat Reader DC, not other versions. Certain aspects of Adobe Acrobat DC Std and Pro can be challenging for virtualization. Specifically portions of Std and Pro, like the print driver, are still a challenge to virtualize but can be overcome with ingenuity.

Adobe Reader and Acrobat are the only apps that can open FDF files, so embedding a PDF into a FDF file ensures that it cannot be opened using another PDF reader or in another PDF editor. This Action will prompt you to select a PDF file that will be saved as a FDF. Adobe has gotten pretty good at deployment options lately. It would be nice if more software vendors supported the IT Professionals that are responsible for preparing to roll out their software with tooling beyond the MSI command line options the way Adobe does.

By default, the installer files are extracted in an 'Acrobat DC' folder on your desktop. To install Acrobat on Windows, use any one of the following methods: Method 1: Install in Command Line mode on the user's machine. Method 2: Install through GUI Mode on the user's machine.

There are a handful of command line options for opening Foxit Reader. I found that if I allowed the user to use the File- Open option that you could get into a state where Foxit wouldn't select or close (I was using a PV+1500 with Touch only), so I'd disable that. Using Custom Commands. Let’s add the custom command to our Acrobat toolbar. To do that, we right-click on the gray background of the toolbar. This brings up a menu that allows us to select the “Customize Quick Tools” function: After we select “Customize Quick Tools”, we can then add commands to the Quick Tools area on the toolbar.

Adobe has gotten pretty good at deployment options lately. It would be nice if more software vendors supported the IT Professionals that are responsible for preparing to roll out their software with tooling beyond the MSI command line options the way Adobe does. And they have been doing a great job of working with the App-V team at Microsoft, so there aren’t any significant issues in sequencing Acrobat Reader DC. Here is everything you need to know to do it yourself in four steps.

1. Get a Distribution Agreement from Adobe

If you want to distribute Reader, or a handful of other Adobe products, inside your company you need to apply for a distribution agreement. This is a pretty simple process. You fill in a web form and a short while later you get an email back. But in addition to making you legal, the email also gets you access to the full downloadable installers rather than the ones that download from the internet. You want to download those full installers so that you have full reproduction capabilities and documentation.

2. Get the Customization Wizard for Adobe Reader DC

The Acrobat Customization Wizard DC makes it easy to customize the Reader installer up front, before you try to install the software. Even if you aren’t going to virtualize the product with App-V, it is well worth the effort to customize the installer before you distribute. Just be sure to get the copy for the version of Reader that you intend to sequence.

3. Customize the Installer

I prefer to start the process on a clean machine, which makes the App-V Sequencer VM a convenient place. We’ll revert the machine before sequencing so it is OK to dirty it.

Install the Customization Wizard installer. Start it up. It is built with a ton of documentation on the process, so you might not need this guide, but if you want a simple step-by-step without having to think, read on here…

The documentation explains that you should start by unpacking the exe based installer they supply to get at the MSI files inside. The instructions didn’t work for me, so here is what I did. [Note: The documentation has been updated to correct this.] I downloaded a copy of 7zip and installed that on the sequencer (you could also use any other tool that can crack open an exe installer). Open the file and extract the contents out into a folder on the desktop.

You will find both an msi, the installer for the major version, and a msp patch installer. The latter changes on the minor updates. We will use the Customization tool to work just with the MSI and create a MST transform file that can be applied.

When you use the Customization Wizard tool, it might give you a warning about backing up your files. Create a new folder and copy the MSI file into that folder. Using the Customization Wizard tool, open up the original msi file and ignore the warning.

On the left hand side is a menu for customization areas. Clicking on one will scroll the documentation window to the appropriate page. Some pretty good detail is there to explain things, so I’ll just cover the things you most likely want to change.

Adobe Reader Supply Command Line Options List

Personalization Options

Most packagers will want to accept the EULA once on behalf of the company and not bother end users with it. The default installation path is OK with App-V these days as VFS style installations are generally preferred over PVAD style installations.

Installation Options

Here you may want some changes:

  1. I prefer to make the software the default reader.
  2. I also want to uncheck the Enable Optimization feature as I don’t want defragmentation occurring on the sequencer.
  3. I use to let the installer cache in the package for possible self-repair, but since App-V 5 won’t let executable components be written to, you are better off unchecking that box.
  4. I set the Run Installation setting to Unattended, but that is a personal choice. Reboots shouldn’t be needed for Reader DC during the actual installation if the sequencer image is clean, but should it be needed you want to be prompted. In App-V 5, it is OK to reboot during the sequence.

Files and Folders

The Files and Folders is one where you probably don’t have to do anything. There are some vc runtime files that will be installed if not present on the system, but App-V will have those covered so they won’t appear in the package.

Registry

Similarly, you might not need to do anything on the Registry page. The exception would be when you find it easier to install and configure the product natively first, then extract the registry settings with a regedit export to a file. Sometimes that is an easier way to make sure you get things like the security settings right. If you do that, just add the entries on this page.

Shortcuts

On the Shortcuts page of the wizard, you probably want to remove the desktop from the shortcut (right click on the shortcut and select remove). Because the name of the shortcut for the start menu is different than for previous versions, it is possible to roll out the DC version using App-V in parallel to an older version (whether that version is virtualized with App-V or is natively installed).

Server Location

Skip the Server Location page unless you know that you need to add something here.

Adobe reader supply command line options list

Security

Setting up the security options is really important at some companies, while others will just skip this page. Read the documentation for details.

Digital Signature

If you skipped over the Security page, skip over the Digital Signature** **page also.

WebMail Profiles

I’m sure some customers care about the WebMail Profiles, but suspect that those customers are using the Pro version. If you don’t know why you want to make a change here, move on.

Online Service and Features

On the Online Service and Features page, we run into features that some enterprises do not want.

Adobe reader supply command line options download

Self-updating is not supported in App-V 5.1, so you always want to disable the product updates. When you need the updates, you upgrade the App-V package and redistribute. Reader DC has a windows service used for the update, so uncheck the Disable product updates (1, below).

Item 2 on the display is probably more related to security. I’m willing to trust Adobe, but check with your CSO.

The idea behind DC version is that you can do a lot more than just read PDFs. But all of those other things are online, cloud based services. And someone has to pay for them. The Pro version includes all of them, but users can purchase a subscription to just what they need, like

The Comments and Forms page covers those features. If you select the Auto Complete option, keeping the Remember checkbox unchecked for numeric fields is a good idea to prevent the user from accidentally storing PII data like phone, account, and social security numbers in their profile.

File Attachments

The File Attachments page is interesting. The defaults are probably fine, but it shows how Adobe has had to react to exploits allowing executable components to find their way into PDF files.

Launch Office Applications

Edit the Launch Office Applications page if you need this integration, which is rare. If you need this, you should probably have installed office before running this wizard.

Other Settings

On the Other Settings page, you can set this feature to save ink when printing PDFs. Adobe seems to think this is a good idea, but it could be just another reason for a help desk call.

Direct Editor

The Direct Editor page allows you to directly edit the MSI tables. You probably don’t need to.

One example where you might chose to is to disable the arm updater service. We already disabled the updater, but making sure the back-end service is set to disabled will reduce some overhead. Just set DISABLE_ARM_SERVICE to the value 1 is one way, but setting the StartType to the ServiceInstall table entry (shown below) to disabled is another.

I’m sure there are a bunch of other things you can do to tweak the installed package further, but this covers the basics. When you are happy, it is time to save off.

There are two ways to save off your work. Use the second way (File menu).

The first method is to use the Transform menu to save off the MST file. Just name it something like AppV and just place it in the same folder. Technically, it is possible to create individual Transforms to set individual items, and then chain the MSTs together in the combinations you need. While an interesting concept, it probably isn’t worth the hassle and you should just have one MST to link in.

The second method is to use the File menu and save in the same folder as the MSI also. This creates an mst file with the same name as the msi, plus it also edits the setup.ini file, so you won’t have to remember the syntax to run the msi with the msp and mst on a single command line.

Here are the updated files. I’m not sure what the .ref file is, but it causes no harm.

Save off this folder as your customized installer. You’ll want to pop it up to a network share as you’ll then revert the sequencer.

4. Sequencing

The Sequencing is pretty straight forward at this point! Between pre-customizing the installer, and the great work done between the Adobe and App-V development teams, we don’t have issues today.

You don’t need to PVAD the installer. Just run the setup.exe without arguments when in monitoring mode and your administrative install will complete without further input, using your MST file and the msp patch installer. I suppose you could clean out the cached installer or restrict the package to certain operating systems, but otherwise no special settings or edits should be necessary, just save off the package.

Caveats and Options

The Application Capabilities feature of the installer requires publishing globally, but you can probably live with hard coding of Reader DC as the default for pdfs.

To get the benefits of browser integration, the browser must run in the virtual environment. Without this, when the user clicks on a PDF on a web page, Reader DC will open as a separate application and window to display the PDF; with this the PDF displays inside the browser window using the COM interface connected via browser plugin. Use of App-Vs Connection Groups and/or RunVirtual is recommended to achieve this tight integration.

PDFtoPrinter: Command-line PDF printing

A utility that prints PDF files from the Windows command line

PDFtoPrinter is a program for printing PDF files from the Windows command line. You may download it here. The program is designed generally for the Windows command line and also for use with the vDos DOS emulator (see below). (July 2020: corrected version for recent Windows 10 requirements; the 'pages=' option now works again.)

The program is a compiled AutoIt script that effectively serves as a 'wrapper' around the free PDF-Xchange Viewer, which is included in the PDFtoPrinter program itself. (Someone asked whether I wrote the script; yes, I did.) PDF-Xchange Viewer is the only no-cost PDF software that I know of that does all of the following:

  • Prints PDF files from the Windows command line.
  • Does not leave itself open (as Adobe Reader and Acrobat do) after printing from the command line.
  • Supports the 'Select paper source from page size' option (for printing envelopes, etc. from the correct paper tray on your printer)

Adobe Reader Supply Command Line Options Download

You can use PDF-Xchange Viewer (or its successor, PDF-XChange Editor) to do everything that the PDFtoPrinter program can do, but PDFtoPrinter is easier to use for its single purpose of printing from the command line. Also, PDFtoPrinter requires no setup and always maintains the correct settings for its single purpose. PDF-Xchange Viewer, when used as a standalone program, is infinitely more flexible, but at the cost of easily losing the settings required for 'Select paper source from page size.'

Technical questions: If you have technical questions about printing from this application (e.g., which PDF version is required by the software, if any), don't waste your valuable time asking me, because I don't know the answer. Remember: PDFtoPrinter.exe is a wrapper around PDF-Xchange Viewer, by Tracker Software. Only Tracker Software will know the answers to your questions, and you should of course buy a license for their software before you ask them for help.

Note: If your antivirus software mistakenly tells you that the PDFtoPrinter program is dangerous (because your antivirus software ignorantly warns about any program created with AutoIt), it is up to you to decide whether or not to believe your antivirus software. If you don't trust this software, don't use this software! Don't waste your valuable time sending me an e-mail asking whether the program is safe!

To print a PDF file to the default Windows printer, use this command:

PDFtoPrinter filename.pdf

You can use a full path for the filename, but if the path or filename contains spaces, use quotation marks around the path and filename.

Alternatively, you can simply drop a PDF file on to the application (or on a shortcut to it).

To print to a specific printer, add the name of the printer in quotation marks:

PDFtoPrinter filename.pdf 'Name of Printer'

If you want to print to a network printer, use the name that appears in Windows print dialogs, like this (and be careful to note the two backslashes at the start of the name and the single backslash after the servername):

PDFtoPrinter filename.pdf 'SERVERPrinterName'

If you mistype the printer name or specify a printer that does not exist, nothing will print, but no error message will be displayed.

Adobe reader supply command line options download

To select a printer from a list of installed printers, change the name of the program to PDFtoPrinterSelect.exe. When launched, it will pop up a list of installed printers, unless you specify a printer name on the command-line, in which case it will print to the specified printer, without displaying a menu.

To specify a page range: Whether or not you specify a printer, you can specify a page range to print by adding an optional parameter, like this (no spaces around the equals sign):

PDFtoPrinter filename.pdf pages=#-#

Separate multiple page ranges with commas (no spaces) like this: 2-4,7,12 or, to specify all pages after a specific page, use its number followed by a hyphen, like this: 7-

To print multiple copies: To print more than one copy, add an optional parameter, like this (no spaces around the equals sign):

PDFtoPrinter filename.pdf copies=#

To restore Windows focus to a calling program: If you launch PDFtoPrinter.exe from another program, this optional parameter tries to restore the Windows focus to the window with the title specified in the parameter:

PDFtoPrinter filename.pdf focus='My Calling Program'

You may omit the quotation marks if the Window title of the calling program has no spaces.

Optional parameters may be combined.

Customization: By default, this system uses these printing options as set in PDF-XChange Viewer: Scaling is set to None; Auto-rotate Sheets; Auto-centre pages in sheets; and Choose paper source by PDF-page size. If you want to change any of these, or choose any other options, download and install PDF-XChange Viewer; open a PDF file, go to the Print menu, set your desired options (and, just to be certain, print the file). Then go to the Edit menu and choose Export All Settings to Data File... Accept the suggested filename, 'PDF-XChange Viewer Settings.dat', and save the file to a convenient location. Move or copy the file to the same folder with PDFtoPrinter.exe. When you next run PDFtoPrinter.exe it will use the settings saved in that file.

You may find the PDF-XChange viewer manual at this link.

Duplex printing:PDF-XChange Viewer cannot save a duplex-printing option as the default. To print in duplex mode, modify the settings of your Windows printer (in the Windows Settings or Control Panel app) to enable duplex printing, or install your printer a second time, using a different name, and set it to print duplex by default; then specify that duplex-default printer when running PDFtoPrinter.exe. Search the web if you don't know how to install your printer a second time, or if you don't know how to specify duplex printing in your Windows printer properties.

Troubleshooting: If the program doesn't print your document, or if the the PDF-XChange Viewer opens when you run PDFtoPrinter.exe, then you can help to identify the problem and possibly solve it. Either rename PDFtoPrinter.exe to a name that includes 'debug', perhaps PDFtoPrinter-debug.exe (or make a copy of the program and rename the copy so that its name includes 'debug'). Alternatively, run the program (with its original name) with the command-line switch /debug (no quotation marks) added to whatever command-line switches you already use. When you run the program, using either of these methods, it will copy the PDF-Xchange.exe print command to the Windows clipboard; you can then paste this command into a Windows command prompt to see what may have gone wrong.

You may not need this program at all: If you want to print PDF files repeatedly from the command line, for example in a production environment, consider doing this. First run PDFtoPrinter.exe from the command line until it prints your file correctly. Then run PDFtoPrinter.exe with the same command line, but also with the 'debug' option described above. PDFtoPrinter will place the PDF-Xchange.exe command line on the Windows clipboard; paste it into a convenient place. Then download and install the current version of the PDF-Xchange Editor (paid commercial software) and set up your system to print from the PDF-Xchange Editor with command-line parameters like the one created by PDFtoPrinter.exe. For example, you could put that command into a Windows .CMD file or any other automated procedure. You can now print from the command-line without using PDFtoPrinter.exe to do the job for you.

Printing from vDos (and vDosPlus)

You may use this program with vDos to print PCL or PostScript output to any Windows printer(applies to vDos 2016.10.01 and later versions only). Place PDFtoPrinter.exe in the folder with the vDos.exe program. If you want to print PCL output, you must add pcl6.exe to the same folder; if you want to print PostScript output, you must add gswin32c.exe to the same folder. If you do not have these files, you may download them here (from the vDosPCLPS.zip archive linked near the top of the page). Then use this syntax in config.txt (replacing LPT1 and #LPT1.PDF with LPT2 and #LPT2.PDF, etc., if needed):

LPT1 = 'PDFtoPrinter.exe' #LPT1.PDF

You can specify a printer by adding the printer name in quotation marks, like this:

LPT1 = 'PDFtoPrinter.exe' #LPT1.PDF 'Microsoft XPS Document Writer'

If you want to print to a network printer, use the name that appears in Windows print dialogs, like this (and be careful to note the two backslashes at the start of the name and the single backslash after the servername):

LPT1 = 'PDFtoPrinter.exe' #LPT1.PDF 'SERVERPrinterName'

Adobe Reader Supply Command Line Options Free

If you want to select from a list of installed printers, change the name of the program to PDFtoPrinterSelect.exe (and, of course, change the line in config.txt to refer to 'PDFtoPrinterSelect.exe'). The program will pop up a list of installed printers, unless you specify a printer name in the command string, in which case it will print to the specified printer, without displaying a menu.

Use the same procedure with vDosPlus (2016.10.01 and later versions only), placing the additional files in the same folder with vDosPlus.exe

Source code

Adobe Reader Supply Command Line Options Cheat

If anyone wants to see the amateurish and probably incompetent AutoIt source code used for compiling the PDFtoPrinter.exe executable, here it is. (Someone asked whether I wrote the script; yes, I did.) The version of the source code posted here may be out of date; compare the version number in the code with the version number in the executable, and feel free to get in touch with me if you need more recent code.

The files required for compiling are here (the ZIP archive contains some files for use in other applications, not this one; ignore those files). To compile the script, you will need to change all local path references to paths on your own system matching the files in the ZIP; you must also remove the line near the top that contains 'Run_After'. You may also need to copy the included au3 file to your Program Files(x86)AutoItInclude folder.

Licensing

This system uses the free PDF-Xchange Viewer. You should consult the linked page to determine whether or not you may use that program for your own purposes. The compiled AutoIt script that wraps the PDF software is free for use by anyone, anywhere, for any purposes whatever. Do not waste your valuable time asking me about a license for the AutoIt wrapper; you don't need one.

Edward Mendelson (em thirty-six [at] columbia [dot] edu, but with two initials and two numerals before the [at] sign, not spelled out as shown here). .