Development porting from tracker viewer to editor: Annotation print on/off

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
jdknox
User
Posts: 17
Joined: Mon Aug 22, 2011 10:59 pm

Development porting from tracker viewer to editor: Annotation print on/off

Post by jdknox »

1) Old code: with a tracker pdf viewer dragged on a c# form, the code looks like this...
//old code
object vDataIn = 33550369;
axCoPDFXCview1.SetProperty("Print.PrintSpec", vDataIn, 0);
// this code is called when the customer his a checkbox to turn off annotation printing

2) New code needed: with the new tracker pdf editor dragged on a c# form, I need to do the equivalent code as above...
(AxPDFXedit) pdfCtl.???
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8588
Joined: Wed Jan 03, 2018 6:52 pm

Re: Development porting from tracker viewer to editor: Annotation print on/off

Post by TrackerSupp-Daniel »

Hello jdKnox,
This forum post was in the incorrect forums, I have thus migrated the topic into the SDK forums for you.
Have a nice day!
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Development porting from tracker viewer to editor: Annotation print on/off

Post by Sasha - Tracker Dev Team »

Hello jdknox,

As you can see here, the needed setting is being set in the Print Dialog itself:
https://help.pdf-xchange.com/pdfxe7/print_ed.html
That is if the user prints from the dialog. If you need to print with preset settings without dialog (just using the operation) this can also be tweaked.
Please describe what you need exactly and I will assist you further.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jdknox
User
Posts: 17
Joined: Mon Aug 22, 2011 10:59 pm

Re: Development porting from tracker viewer to editor: Annotation print on/off

Post by jdknox »

Yes, I'd like to "print with preset settings without dialog (just using the operation)." The sample code from the first post was how our old client performed this tweak (using the old viewer control). I need help with the equiv code for the new pdf editor control that we are using. Most all of the other viewer-to-editor operations I ported were simple but I'm stuck on this print preset w/out dialog tweak.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Development porting from tracker viewer to editor: Annotation print on/off

Post by Sasha - Tracker Dev Team »

Hello jdknox,

Please check out the FullDemo application's PrintForm.cs:
https://github.com/tracker-software/PDF ... intForm.cs
There is a PrintFilters enum - there all of the existing flags in dialog are being shown. You can create the custom flag that you need by combining the needed PXC_PrintContentFlags.
Then you will have to set the Content node with the flags you need.

Code: Select all

MainFrm.ComboboxItem it = (MainFrm.ComboboxItem)cbPrintDocFilter.SelectedItem;
if (it != null)
	opts["Content"].v = it.Value;

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jdknox
User
Posts: 17
Joined: Mon Aug 22, 2011 10:59 pm

Re: Development porting from tracker viewer to editor: Annotation print on/off

Post by jdknox »

Hi Alex, Sorry for the lag in response to this incident. Do you have a min to illustrate how to make the pdfCtl print with anno markups? Our app simply uses the pdfCtl.PrintPages(0,N) command and it does not print annotations by default. I see the sample code and enumerations you sent me but it's not clear to me on how to set it using the tracker pdfedit control that is on our form.

//old viewer code (noneditor) we used to enable printing annos

object vDataIn = 33550369;
axCoPDFXCview1.SetProperty("Print.PrintSpec", vDataIn, 0);
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Development porting from tracker viewer to editor: Annotation print on/off

Post by Sasha - Tracker Dev Team »

Hello jdknox,

Have you looked at the FullDemo application? The whole code that does what you want is there. Simply go to the Operations tab, select what you want to Print from the Print Combobox (in your case it's probably Document and Markups) and then press Run Operation.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply