How to hide File Open, Save, Print and Email buttons in the PDF Annotation / PDF Editor OCX Control?

Hi All,

I have a few questions regarding the PDF Viewer. We need to hide the file open, save, print and email buttons in the control. I see the following index of controls in your toolbars.pdf document.

But, when using the OCX control MainToolbarDeleteButton method, the indexes of the buttons don't seem to match up. I would assume that the indexes of 0-4 would hide the first four buttons but instead, it hides the Open, Print, Spacer, and annotation edit buttons.

image

// Open button
ocx.MainToolbarDeleteButton(0);

// Print button
ocx.MainToolbarDeleteButton(1);

// First spacer bar
ocx.MainToolbarDeleteButton(2);

// Edit annotation button
ocx.MainToolbarDeleteButton(3);

Is there an updated index or is this a trial version issue?

Second, we are looking for a PDF viewer that can do annotations. I have been testing your PDF Annotator SDK. Is the free trial the latest version that you have available? Reason being, when I view a document that has highlighted annotations, your viewer seems to block the text. Let me show some examples:

image

Here is the same highlight annotation in Adobe Reader:

Is this something that has been addressed?

Thanks,
Software Developer
-------------------------------------------
Thanks for your message, "MainToolbarDeleteButton" will delete the buttons and also change the index to the buttons, we suggest you may use "MainToolbarHideButton" method to instead of "MainToolbarDeleteButton", the "MainToolbarHideButton" method just to hide the buttons instead of delete them, for example,

ocx.MainToolbarHideButton(ID_TOOLBAR_SAVE,TRUE);
ocx.MainToolbarHideButton(ID_TOOLBAR_EMAIL,TRUE);
ocx.MainToolbarHideButton(ID_TOOLBAR_CONTENT,TRUE);
ocx.MainToolbarHideButton(ID_TOOLBAR_CONTENT_TEXT,TRUE);
ocx.MainToolbarHideButton(ID_TOOLBAR_CONTENT_LINE,TRUE);
ocx.MainToolbarHideButton(ID_TOOLBAR_CONTENT_RECTANGLE,TRUE);
ocx.MainToolbarHideButton(ID_TOOLBAR_CONTENT_ELLIPSE,TRUE);
ocx.MainToolbarHideButton(ID_TOOLBAR_CONTENT_POLYLINE,TRUE);

Please refer to the macro definitions for the buttons at below,

#define ID_TOOLBAR_OPEN                 32772
#define ID_TOOLBAR_SAVE                 32774
#define ID_TOOLBAR_PRINT                32773
#define ID_TOOLBAR_EMAIL                32776
#define ID_TOOLBAR_HAND                 32777
#define ID_TOOLBAR_COMMENT              32778
#define ID_TOOLBAR_CONTENT              32779
#define ID_TOOLBAR_FORM                 32877
#define ID_TOOLBAR_LINKTOOL             32878
#define ID_TOOLBAR_COMMENT_TEXT         32780
#define ID_TOOLBAR_COMMENT_NOTE         32781
#define ID_TOOLBAR_COMMENT_STAMP        32782
#define ID_TOOLBAR_COMMENT_PENCIL       32783
#define ID_TOOLBAR_COMMENT_LINE         32784
#define ID_TOOLBAR_COMMENT_RECTANGLE    32785
#define ID_TOOLBAR_COMMENT_ELLIPSE      32786
#define ID_TOOLBAR_CONTENT_TEXT         32787
#define ID_TOOLBAR_CONTENT_LINE         32788
#define ID_TOOLBAR_CONTENT_RECTANGLE    32789
#define ID_TOOLBAR_CONTENT_ELLIPSE      32790
#define ID_TOOLBAR_CONTENT_POLYLINE     32791
#define ID_TOOLBAR_SELECT_TEXT          32792
#define ID_TOOLBAR_SELECT_IMAGE         32793

If you are prefer to use the "MainToolbarDeleteButton" method, please delete the buttons from right to left, for example,

// Edit annotation button
ocx.MainToolbarDeleteButton(3);

// First spacer bar
ocx.MainToolbarDeleteButton(2);

// Print button
ocx.MainToolbarDeleteButton(1);

// Open button
ocx.MainToolbarDeleteButton(0);

>>Here is the same highlight annotation in Adobe Reader:
>>Is this something that has been addressed?

For the highlight annotation problem, please feel free send to us your sample PDF file in question, we will test your PDF file and come back to you asap.

VeryPDF
----------------------------------
Thanks for the quick response!!

The yellow "highlight" annotation was done by a different PDF viewer. It looks like your application translates a highlight annotation as a drawn rectangle with around 39% opacity - which I can live with.

Thanks for the notes on the toolbar buttons. Is there a complete documentation manual for this OCX? For instance, if I want to provide my own toolbar, is there documentation that would allow me to invoke each of the annotation methods - like is done with the text search example in the trial code?

Thanks,
Customer
----------------------------------
Thanks for your message, yes, you can hide the toolbar from OCX and then provide a new toolbar by yourself, that's no problem.

You can call following methods to implement some basic functions,

    static iSelect = 1;
    if(iSelect == 0)
        m_ctrlPDFOcx.InvokeMethod(41, 1, 0);//Hand
    else if(iSelect == 1)
        m_ctrlPDFOcx.InvokeMethod(21, 0, 0);//Text Copy
    else if(iSelect == 2)
        m_ctrlPDFOcx.InvokeMethod(22, 0, 0);//Picture Copy
    else if(iSelect == 3)
        m_ctrlPDFOcx.InvokeMethod(42, 1, 0);//Edit Comment
    else if(iSelect == 4)
        m_ctrlPDFOcx.InvokeMethod(43, 1, 0);//Edit Content
    else if(iSelect == 5)
        m_ctrlPDFOcx.InvokeMethod(45, 0, 0);//Form Filling
    else if(iSelect == 6)
        m_ctrlPDFOcx.InvokeMethod(46, 0, 0);//Edit Hyperlink
    iSelect++;
    if(iSelect >= 7)
        iSelect = 0;
    //m_ctrlPDFOcx.InvokeMethod(227, 0, 0);//Disable main popup menu

If you need more functions, please feel free to let us know, we will assist you asap.

VeryPDF

PDF Editor OCX Control (ActiveX) can be downloaded and purchased from following web page,

https://www.verypdf.com/app/pdf-editor/try-and-buy.html#buy-dev
https://www.verypdf.com/pdf-editor/pdfeditor_ocx.zip
https://www.verypdf.com/app/pdf-editor/pdf-editor-ocx-control.html

PDF Annotator OCX is an ActiveX for C# and .NET Developers, it is royalty free for redistribution. PDF Annotator OCX can be used to add notes & annotations to any PDF documents, include comments, corrections, signatures, highlighting, even photos, designs and drawings.

See Also:
https://www.verypdf.com/wordpress/201604/royalty-free-pdf-annotator-ocx-activex-control-for-c-and-net-developers-component-to-view-and-annotate-pdf-documents-42537.html

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!