Cancel printing on bad mode in PDDocWillPrintDocInMode

New Here ,
Jun 26, 2017

Copy link to clipboard

Copied

Hi guys

I'm trying to force printing with document+comments with a plug-in as I want to replace the print command.

If I want to print silently, it's OK thru javascript

If I show the print dialog, the user may change the setting, my PDDocWillPrintDocInMode notification will reflect that.

If the mode is wrong, how do I cancel the whole print process?

Thanks

Christian

TOPICS
Acrobat SDK and JavaScript

Views

293

Likes

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

Cancel printing on bad mode in PDDocWillPrintDocInMode

New Here ,
Jun 26, 2017

Copy link to clipboard

Copied

Hi guys

I'm trying to force printing with document+comments with a plug-in as I want to replace the print command.

If I want to print silently, it's OK thru javascript

If I show the print dialog, the user may change the setting, my PDDocWillPrintDocInMode notification will reflect that.

If the mode is wrong, how do I cancel the whole print process?

Thanks

Christian

TOPICS
Acrobat SDK and JavaScript

Views

294

Likes

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
Jun 26, 2017 0
Most Valuable Participant ,
Jun 26, 2017

Copy link to clipboard

Copied

Pretty sure that you can't cancel printing from any callback. In theory you could provide a complete replacement for the print dialog, which guided the user in the choice of options, via replacing AVDocDoPrint. But that's a lot to replace.

Likes

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
Reply
Loading...
Jun 26, 2017 0
Most Valuable Participant ,
Jun 26, 2017

Copy link to clipboard

Copied

Hmm, you can also replace AVDocPrintPagesWithParams. This has potential, but take care and remember that the user may need to print files that are nothing to do with the system you are controlling.

Likes

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
Reply
Loading...
Jun 26, 2017 0
New Here ,
Jun 26, 2017

Copy link to clipboard

Copied

Thanks, but AVDocPrintPagesWithParams do not give access to the choice of printing document and comments.

Only javascript seems to have that provision, but the user can alter the setting …

Is any action possible in a callback? (closing doc, cancel printing, …)

Le 26 juin 2017 à 16:05, Test Screen Name <forums_noreply@adobe.com> a écrit :

Cancel printing on bad mode in PDDocWillPrintDocInMode

created by Test Screen Name <https://forums.adobe.com/people/TestScreenName> in Acrobat SDK - View the full discussion <https://forums.adobe.com/message/9670870#9670870>

Hmm, you can also replace AVDocPrintPagesWithParams. This has potential, but take care and remember that the user may need to print files that are nothing to do with the system you are controlling.

If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/9670870#9670870 and clicking ‘Correct’ below the answer

Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:

Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/9670870#9670870

To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"

Start a new discussion in Acrobat SDK by email <mailto:discussions-community-acrobat-acrobat_sdk@adobe-v8.hosted.jivesoftware.com> or at Adobe Community <https://forums.adobe.com/choose-container.jspa?contentType=1&containerType=14&container=3382>

For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624 <https://forums.adobe.com/thread/1516624>.

This email was sent by Adobe Community because you are a registered user.

You may unsubscribe <https://forums.adobe.com/unsubscribe.jspa?email=christian%40docinfo.fr&token=2d195e14cda3290c0374bc46b5d3eeaa01c2725a52130f1d10cecdf72ead1654> instantly from Adobe Community, or adjust email frequency in your email preferences <https://forums.adobe.com/user-preferences!input.jspa>

Likes

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
Reply
Loading...
Jun 26, 2017 0
Adobe Employee ,
Jun 26, 2017

Copy link to clipboard

Copied

Yes you can – it’s the emitFlags value in the ParamRec

Likes

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
Reply
Loading...
Jun 26, 2017 0
New Here ,
Jun 26, 2017

Copy link to clipboard

Copied

Thanks Leonard,

I haven’t seen those flags….

Is it possible to set those flags and do not let the user modify them (or to force the value before print, disregarding th user choice for taht parameter?). Do we have access to that dialog and its ressources?

Thanks again for the lead

christian

Le 26 juin 2017 à 22:15, lrosenth <forums_noreply@adobe.com> a écrit :

Cancel printing on bad mode in PDDocWillPrintDocInMode

created by lrosenth <https://forums.adobe.com/people/lrosenth> in Acrobat SDK - View the full discussion <https://forums.adobe.com/message/9671452#9671452>

Yes you can – it’s the emitFlags value in the ParamRec

If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/9671452#9671452 and clicking ‘Correct’ below the answer

Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:

Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/9671452#9671452

To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"

Start a new discussion in Acrobat SDK by email <mailto:discussions-community-acrobat-acrobat_sdk@adobe-v8.hosted.jivesoftware.com> or at Adobe Community <https://forums.adobe.com/choose-container.jspa?contentType=1&containerType=14&container=3382>

For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624 <https://forums.adobe.com/thread/1516624>.

This email was sent by Adobe Community because you are a registered user.

You may unsubscribe <https://forums.adobe.com/unsubscribe.jspa?email=christian%40docinfo.fr&token=2d195e14cda3290c0374bc46b5d3eeaa01c2725a52130f1d10cecdf72ead1654> instantly from Adobe Community, or adjust email frequency in your email preferences <https://forums.adobe.com/user-preferences!input.jspa>

Likes

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
Reply
Loading...
Jun 26, 2017 0
Adobe Employee ,
Jun 26, 2017

Copy link to clipboard

Copied

If you don’t bring up the dialog then the user can’t modify them - but if bring up the UI, they can change whatever they want.

Likes

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
Reply
Loading...
Jun 26, 2017 0
New Here ,
Jun 28, 2017

Copy link to clipboard

Copied

Is it possible to alter the UI so the popups are invalidated without reconstructing the whole dialog?

Can I use the native (Windows) functions to do so? and how?

Likes

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
Reply
Loading...
Jun 28, 2017 0
Adobe Employee ,
Jun 28, 2017

Copy link to clipboard

Copied

Nothing that Adobe supports. You are welcome to look for unsupported approaches.

Likes

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
Reply
Loading...
Jun 28, 2017 0
New Here ,
Jun 28, 2017

Copy link to clipboard

Copied

Under those circumstances, what is the usefulness of callbacks if we cannot react accordingly?

Likes

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
Reply
Loading...
Jun 28, 2017 0
Most Valuable Participant ,
Jun 29, 2017

Copy link to clipboard

Copied

Callbacks are useful for what they are designed for. You want to do something outside the design. Replacing UI behaviour isn't really a design strength, there are lots of potentially useful things you can't do.

I think replacing AVDocDoPrintWithParams may be your best bet. Don't know for sure that UI print calls this replaceable method but it's easy to test.

Likes

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
Reply
Loading...
Jun 29, 2017 0