Hi,
I am evaluating PDF Editor ActiveX Control. Can you please help me out in integration with ASP.Net Application. I am able to embed control in web page. But i don't know how to customize toolbar buttons.
Customer
-------------------------------------
You can call MainToolbarHideButton() method to show or hide buttons, please look at the toolbar of PDF Editor ActiveX Control at below,
The following is the contents of ocxdefine.h file,
#ifndef __OCXDEFINE_H__
#define __OCXDEFINE_H__
#include <windows.h>
//Button ID for MainToolbarHideButton() function, you can call this
//function to hide or show the specified button in a toolbar control
//For example,
//Hide form filling button
//m_ctrlPDFOcx.MainToolbarHideButton(ID_TOOLBAR_FORM,TRUE);
//Show form filling button
//m_ctrlPDFOcx.MainToolbarHideButton(ID_TOOLBAR_FORM,TRUE);
#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
//Messages for SetMessageCallbackFunc() function
#define WM_MESSAGECALLBACK (WM_USER+1001)
#define WM_ADD_COMMENT_FINISHED (WM_USER+1014)
#define WM_SELECT_A_COMMENT (WM_USER+1015)
#define WM_SELECT_A_TEXTAREA (WM_USER+1016)
#define WM_SELECT_A_TEXTAREA_BEGIN (WM_USER+1017)
#define WM_SELECT_A_TEXTAREA_PROCESSING (WM_USER+1018)
#define WM_ADD_COMMENT_GET_PREDEFINED_TEXT (WM_USER+1019)
#define WM_ADD_COMMENT_CLICK (WM_USER+1020)
typedef struct SSELECTEDTEXTCONTENTtag{
RECT rect;
char *text;
}SSELECTEDTEXTCONTENT,*LPSSELECTEDTEXTCONTENT;
typedef struct STEXTDATAtag{
const char *text;
int len;
}STEXTDATA,*LPSTEXTDATA;
//Compression methods for ConvertPDFToImage() function
#define COMPRESSION_NONE 1 /* dump mode */
#define COMPRESSION_CCITTRLE 2 /* CCITT modified Huffman RLE */
#define COMPRESSION_CCITTFAX3 3 /* CCITT Group 3 fax encoding */
#define COMPRESSION_CCITT_T4 3 /* CCITT T.4 (TIFF 6 name) */
#define COMPRESSION_CCITTFAX4 4 /* CCITT Group 4 fax encoding */
#define COMPRESSION_CCITT_T6 4 /* CCITT T.6 (TIFF 6 name) */
#define COMPRESSION_LZW 5 /* Lempel-Ziv & Welch */
#define COMPRESSION_OJPEG 6 /* !6.0 JPEG */
#define COMPRESSION_JPEG 7 /* %JPEG DCT compression */
#endif//__OCXDEFINE_H__
You can use following sample code to show or hide any buttons as you want,
private const string veryPDFOCXRegistrationCode = "XXXXXXXXXXXXXX";
private void Form1_Load(object sender, EventArgs e)
{
axPdfocxMarkup.SetOrderID(veryPDFOCXRegistrationCode, null, null);
axPdfocxMarkup.MainToolbarHideButton(32772, true);
axPdfocxMarkup.MainToolbarHideButton(32774, true);
axPdfocxMarkup.MainToolbarHideButton(32773, true);
axPdfocxMarkup.MainToolbarHideButton(32776, true);
axPdfocxMarkup.MainToolbarHideButton(32777, true);
axPdfocxMarkup.MainToolbarHideButton(32778, true);
axPdfocxMarkup.MainToolbarHideButton(32779, true);
axPdfocxMarkup.MainToolbarHideButton(32877, true);
axPdfocxMarkup.MainToolbarHideButton(32878, true);
axPdfocxMarkup.MainToolbarHideButton(32787, true);
axPdfocxMarkup.MainToolbarHideButton(32788, true);
axPdfocxMarkup.MainToolbarHideButton(32789, true);
axPdfocxMarkup.MainToolbarHideButton(32790, true);
axPdfocxMarkup.MainToolbarHideButton(32791, true);
axPdfocxMarkup.MainToolbarHideButton(32792, true);
axPdfocxMarkup.MainToolbarHideButton(32793, true);
tabControl1.SelectedTab = tabPage2;
}
If you encounter any problem with PDF Editor ActiveX Control, please feel free to let us know, we will assist you asap,
http://support.verypdf.com/open.php