Skip to content

Instantly share code, notes, and snippets.

Alex II Polaringu

Block or report user

Report or block Polaringu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View CoreApiDrawingSample.cs
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];
View CustomCmdComboBox.cs
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");
}
View BookmarkPluginAGB_FT_TT.cs
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
//{
View RenewedMultiDocumentBatesNumbering.cs
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;
View AddingBatesNumberingToMulipleDocuments.cs
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();
}
View CustomDragDropTarget.cs
//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);
View ReplaceExportImage.cs
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
View AddSignature.cs
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;
View SearchPaneAutoComplete.cs
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);
View AddRotatedText.cs
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;
You can’t perform that action at this time.