Highlighted

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

Community Beginner ,
Jan 16, 2020

Copy link to clipboard

Copied

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.

 

 

Most Valuable Participant
Correct answer by Test Screen Name | Most Valuable Participant

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. 

TOPICS
Create PDFs, General troubleshooting, How to, Print and prepress

Views

825

Likes

Translate

Translate

Report

Report
This conversation has been locked.

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

Community Beginner ,
Jan 16, 2020

Copy link to clipboard

Copied

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.

 

 

Most Valuable Participant
Correct answer by Test Screen Name | Most Valuable Participant

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. 

TOPICS
Create PDFs, General troubleshooting, How to, Print and prepress

Views

826

Likes

Translate

Translate

Report

Report
Jan 16, 2020 1
Most Valuable Participant ,
Jan 16, 2020

Copy link to clipboard

Copied

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. 

Likes

Translate

Translate

Report

Report
Jan 16, 2020 0
LATEST
Nov 04, 2020

Copy link to clipboard

Copied

youuuuuuuuuuuuuuuuuuuuuuuuu are goooooooooooooooooooood

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

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

Likes

Translate

Translate

Report

Report
Nov 04, 2020 0