This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void DrawingSamples() | |
{ | |
IPXC_Document doc = m_Inst.NewDocument(); | |
PXC_Rect rc = new PXC_Rect(); | |
rc.right = 600; | |
rc.top = 800; | |
IPXC_UndoRedoData urd; | |
doc.Pages.AddEmptyPages(0, 1, rc, null, out urd); | |
IPXC_Page page = doc.Pages[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CustomComboCommandHandler : IUIX_CmdHandler | |
{ | |
public IPXV_Inst m_Inst = null; | |
public IUIX_Inst m_uiInst = null; | |
public CustomComboCommandHandler(IPXV_Inst Inst) | |
{ | |
m_Inst = Inst; | |
m_uiInst = (IUIX_Inst)Inst.GetExtension("UIX"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void AutoGenerateBookmarksFromText(PDFXEdit.IPXC_Document Doc, PDFXEdit.IPXV_Inst Inst) | |
{ | |
int nID = Inst.Str2ID("op.bookmarks.autoGenerateFromText", false); | |
PDFXEdit.IOperation Op = Inst.CreateOp(nID); | |
var input = Op.Params.Root["Input"]; | |
input.v = Doc; | |
PDFXEdit.ICabNode options = Op.Params.Root["Options"]; | |
options["PagesRange.Type"].v = 1; //All | |
//enum eAGBFlags | |
//{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void AddBatesNumberingToDocByIndex(PDFXEdit.IPXC_Document Doc, PDFXEdit.IPXV_Inst Inst, long nStart, out long nFinish) | |
{ | |
int nID = Inst.Str2ID("op.document.addBatesNumbering", false); | |
PDFXEdit.IOperation Op = Inst.CreateOp(nID); | |
var input = Op.Params.Root["Input"]; | |
input.v = Doc; | |
PDFXEdit.ICabNode options = Op.Params.Root["Options"]; | |
options["PagesRange.Type"].v = "All"; | |
options["CenterHeaderText"].v = "<<Bates Number#3#1#A#B>>"; | |
options["Font.Size"].v = 36; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void AddBatesNumberingToDoc(PDFXEdit.IOperation Op, PDFXEdit.IPXC_Document Doc, PDFXEdit.IPXV_Inst Inst) | |
{ | |
var input = Op.Params.Root["Input"]; | |
input.v = Doc; | |
PDFXEdit.ICabNode options = Op.Params.Root["Options"]; | |
options["PagesRange.Type"].v = "All"; | |
options["CenterHeaderText"].v = "<<Bates Number#3#1#A#B>>"; | |
options["Font.Size"].v = 36; | |
Op.Do(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Drop target that will contain the custom drag and drop implementation for the given object | |
public MyDropTarget myDropTarget = null; //PS: Do not forget to dispose of it (we do it in Form1_FormClosed) | |
//Method where the myDropTarget is initialized | |
void InitializePagesViewAsDropTarget() | |
{ | |
PDFXEdit.IUIX_Obj obj = pdfCtl.Doc.ActiveView.PagesView.Obj; | |
//Setting style of the object so it will accept dropping | |
obj.SetStyleEx((int)PDFXEdit.UIX_ObjStyleExFlags.UIX_ObjStyleEx_DropTarget, (int)PDFXEdit.UIX_ObjStyleExFlags.UIX_ObjStyleEx_DropTarget); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void ReplaceImage(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst) | |
{ | |
int nID = Inst.Str2ID("op.document.replaceImage", false); | |
PDFXEdit.IOperation Op = Inst.CreateOp(nID); | |
var input = Op.Params.Root["Input"]; | |
input.Add().v = Doc.CoreDoc; | |
PDFXEdit.ICabNode options = Op.Params.Root["Options"]; | |
int nSelID = Inst.Str2ID("selection.contentItems", false); | |
uint nPage = 0; //Page number that will have it's image content item edited | |
//First we need to create content items selection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void AddSignatureWithTemplate(IPXV_Inst Inst, IPXV_Document Doc) | |
{ | |
int nID = Inst.Str2ID("op.document.addDigitalSignature", false); | |
IOperation Op = Inst.CreateOp(nID); | |
ICabNode input = Op.Params.Root["Input"]; | |
input.Add().v = Doc; | |
ICabNode options = Op.Params.Root["Options"]; | |
options["PageNumber"].v = 0; | |
options["UseFileCertificate"].v = true; | |
options["DigiSigType"].v = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void searchPaneAutoCompleteToolStripMenuItem_Click(object sender, EventArgs e) | |
{ | |
pdfCtl.Inst.ExecUICmd("cmd.search", pdfCtl.Frame.View.Obj); | |
int nID = pdfCtl.Inst.Str2ID("searchView"); | |
PDFXEdit.IPXV_View view = pdfCtl.Frame.View.Panes.Active[nID]; | |
if (view != null) | |
{ | |
IntPtr outPtr; | |
view.Obj.QueryImpl(typeof(PDFXEdit.IPXV_SearchView).GUID, null, out outPtr); | |
PDFXEdit.IPXV_SearchView SV = (PDFXEdit.IPXV_SearchView)System.Runtime.InteropServices.Marshal.GetObjectForIUnknown(outPtr); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void addRotatedTextToolStripMenuItem_Click(object sender, EventArgs e) | |
{ | |
PDFXEdit.IPXC_Document doc = pxcInst.NewDocument(); | |
PDFXEdit.PXC_Rect rcMedia; | |
rcMedia.left = 0; | |
rcMedia.bottom = 0; | |
rcMedia.top = 800; | |
rcMedia.right = 600; | |
PDFXEdit.IPXC_UndoRedoData urData; |
NewerOlder