• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Acrobat Reader DC Command line Options

Guest
May 08, 2015 May 08, 2015

Copy link to clipboard

Copied

Hi to all,

I need to print PDF file directly from command line; in Acrobat Reade XI I have used /h /t switches, but now it is wrong.

Anyone does know the new options for Reader DC?

My OS is Windows 7 32 bit with IE 11

thanks

TOPICS
Acrobat SDK and JavaScript

Views

110.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 08, 2015 May 08, 2015

Copy link to clipboard

Copied

AFAIK, nothing has changed in this regard. What are you seeing (or not seeing) in how it differs?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 24, 2015 Jun 24, 2015

Copy link to clipboard

Copied

I can print from the command line with

cmd /c "C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\\AcroRd32.exe" /n /s /h /t  file.pdf "my printer-name"

as per http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/intro_to_sdk/DeveloperFAQ.pdf

I get an error dialog each time I do this:

   There was an error opening this document. Access denied

but the file still prints. Reader DC does not exit, however, so I have to close it. So this won't work in a truly batch or headless environment.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 24, 2015 Jun 24, 2015

Copy link to clipboard

Copied

Most important – have you read the Acrobat Reader EULA to ensure that your use is compliant? Many batch and headless operations are not compliant with the EULA.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 26, 2017 Oct 26, 2017

Copy link to clipboard

Copied

Boo

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 26, 2017 Oct 26, 2017

Copy link to clipboard

Copied

Is "boo" a comment on a 2 year old post (which one and why?) or an early Hallowe'en surprise?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 25, 2015 Jun 25, 2015

Copy link to clipboard

Copied

If you require reliable headless printing of PDF, using unsupported commands based on 10 year old documentation may not be the best approach. You can, however, license the Adobe PDF Library to do printing. It's not free but it is reliable and well supported.

http://www.datalogics.com/products/pdf/pdflibrary/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 03, 2017 Apr 03, 2017

Copy link to clipboard

Copied

I sent hours trying to get Datalogics pdf components to work. First their website doesn't have any pricing or buy button, which is any annoying time waster. Then once you download the evaluation version, you discover that you can't actually use it until someone in sales mails you a eval.lic file. Other companies are able to provide downloadable evaluations versions which actually work. So you might find that you get more customers if you can do the same.

Exception thrown: 'System.TypeInitializationException' in Datalogics.PDFL.dll

An exception occurred. Here is the related information:

System.TypeInitializationException: The type initializer for 'Datalogics.PDFL.PDFLPINVOKE' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'DL150PDFLPINVOKE': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

   at Datalogics.PDFL.PDFLPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_PDFL(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate)

   at Datalogics.PDFL.PDFLPINVOKE.SWIGExceptionHelper..cctor()

   --- End of inner exception stack trace ---

   at Datalogics.PDFL.PDFLPINVOKE.SWIGExceptionHelper..ctor()

   at Datalogics.PDFL.PDFLPINVOKE..cctor()

   --- End of inner exception stack trace ---

   at Datalogics.PDFL.PDFLPINVOKE.new_Library__SWIG_0()

   at Datalogics.PDFL.Library..ctor()

   at PDFutil.PDFutil.DatalogicsPrintPDF(Stream PDFtoPrint, String orderId) in \\QUEENOFHEARTS\Users$\max\My Documents\github\roboAnna2\LabelPrint\C#\PDFutil\PDFutil.cs:line 190statusDesc OK

post response headers

Access-Control-Allow-Origin: *

Finally, I got my eval.lic file, but still it doesn't work. There's no docs on how to install the components. I added it as a reference to my C# project like any other component, but seems it can't find some sidecar files. After many hours I give up.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 12, 2015 Nov 12, 2015

Copy link to clipboard

Copied

I just got mine working. I used the format is as follows:

Application path in quotes, followed by filepath in NO quotes, followed by printer name in quotes.

"C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" /t  file.pdf "my printer-name"


no "cmd /c" preceding it and I did not include the printer driver or port at the end of the command.


Pay special attention and make sure you are using the correct syntax. I noticed that you had two slashes between Reader and AcroRd32. Probably a typo.



Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 16, 2022 Nov 16, 2022

Copy link to clipboard

Copied

I want to open a PDF from inside EXCEL and print it. I do not need to open Acrobat and see the .pdf. Just print it.

The document is on the server.

The following code opens Abobe but says cannot find file.

What am I doing wrong? Any ideas?

 

 

Sub CommandButton1_Click()
Dim Filename As String
Filename = "P:\06. Operations\07. NWP\TopSheets\221360373-70 NWP NamePlate.pdf"

Shell "C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe /p /h" & "P:\06. Operations\07. NWP\TopSheets\221852697-10 NWP NamePlate.pdf"


End Sub

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 16, 2022 Nov 16, 2022

Copy link to clipboard

Copied

May be that there is no space between /h and P:

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 16, 2022 Nov 16, 2022

Copy link to clipboard

Copied

LATEST

Doesn't look like you are using Reader, so why not use the IAC for this?

https://opensource.adobe.com/dc-acrobat-sdk-docs/library/interapp/IAC_DevApp_OLE_Support.html

 

Now about your file path. The first thing you should do is see what the path looks like from inside Acrobat. Open the file from the network location, then open the console window and run this line of code. 

 

this.path

 

The file path will be in the Acrobat device independent format, but the important bit is that you'll be able to see if there are any differences between this and your code. 

If there aren't, then it could be that there is a security issue with opening this file location from the command line.

You might also try running the command line manually (from the command window) to see if there is a reported error. 

And include this folder in Acrobat Enhanced security preferences. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines