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

access 'Choose Papersource by PDF Page Size' option via code

Community Beginner ,
Jan 16, 2020 Jan 16, 2020

Hello,

 

The screenshot in this post has a 'Choose Papersource by PDF Page Size" checkbox

https://helpx.adobe.com/acrobat/kb/print-mixed-page-sizes-acrobat.html

 

I was about to ask 'How can I control the state of that checkbox via Code or any other trick ?' and noticed a few similar posts about this subject with others having the same problem;

 

1-

https://community.adobe.com/t5/acrobat-reader/choose-paper-source-by-pdf-page-size/m-p/8808430#M1952...

The suggestions and links in this article are useless, they point to a .NET based print approach (which is a rasterized method = bigger spool file and less quality) and do not use the far more efficient Acrobat Printing Infrastructure

 

2-

https://social.msdn.microsoft.com/Forums/vstudio/en-US/1a247bd6-81d6-422d-b617-890aa1190089/enable-c...

 

https://social.msdn.microsoft.com/Forums/en-US/1ec5fb95-40fa-4414-a5a7-690600e62a09/how-to-programma...

 

same problem, unrelated info being given. None of the posts gives an answer to the choose source by pdf size question.

 

3-

I am familiar with Interapplication Communication API Reference from the Acrobat SDK.

The 'PrintPagesSilentEx does have a few good parameters, but it does not have an option for the mixed papersize. 

 

After a bit research the following works fine for me and is simple to implement from any platform. I am posting this to assist others that are stuck with this.

 

Access this Registry Key, adjust Acrobat Pro or Reader and Version according to your System

 

HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\11.0\AVGeneral

HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\DC\AVGeneral

 

look for Key Value : bprintSetPageSize (DWORD)

Set to 0 : checkmark will be OFF when Acrobat is opened

Set to 1 : checkmark will be ON when Acrobat is opened

 

This registry hack will not work if you do this while Acrobat is opened (via code or manually) because Acrobat reads the Registry at startup once and caches the registry setting. Acrobat saves the last state set by the user into the registry during shutdown.

 

 

TOPICS
Create PDFs , General troubleshooting , How to , Print and prepress
5.2K
Translate
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
1 ACCEPTED SOLUTION
LEGEND ,
Jan 16, 2020 Jan 16, 2020

This is neat but I feel it would be better to use a supported API. The JavaScript printparams object gives the ability to set most print-related options, including this one. The IAC API hasn’t been touched for maybe 20 years. 

View solution in original post

Translate
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 ,
Jan 16, 2020 Jan 16, 2020

This is neat but I feel it would be better to use a supported API. The JavaScript printparams object gives the ability to set most print-related options, including this one. The IAC API hasn’t been touched for maybe 20 years. 

Translate
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 04, 2020 Nov 04, 2020
LATEST

youuuuuuuuuuuuuuuuuuuuuuuuu are goooooooooooooooooooood

I had a hard time finding this. You're a genius.

Thank you very much!!!!!!!!!!!

Translate
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