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
SourceCtrl.OpenDocFromPath(appRootDir + "\\SP.pdf"); | |
PDFXEdit.IPXV_Document sourceDoc = SourceCtrl.Doc; | |
DestinationCtrl.OpenDocFromPath(appRootDir + "\\SF.pdf"); | |
EmbeddPageAsAnIcon(sourceDoc.CoreDoc, DestinationCtrl.Doc.CoreDoc, DestinationCtrl.Inst); |
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
public void InitializeTwoControls() | |
{ | |
//First frame will be with full Control functionality | |
PDFXEdit.IPXV_MainFrame firstMainFrame = pdfCtl.Inst.MainFrm[0]; | |
PDFXEdit.IPXV_MainView firstMainView = firstMainFrame.View; | |
PDFXEdit.IPXC_Document doc = pxcInst.OpenDocumentFromFile("D:\\TestFile.pdf", null, null); | |
firstMainFrame.OpenDocFrom(doc); | |
firstMainView.CmdPaneTop.Show(); | |
//Setting up preview frame |
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 EmbeddPageAsAnIcon(PDFXEdit.IPXC_Document srcDoc, PDFXEdit.IPXC_Document destDoc, PDFXEdit.IPXV_Inst Inst) | |
{ | |
if (destDoc.HasAcroForm != false) | |
{ | |
PDFXEdit.IPXC_FormField ff = destDoc.AcroForm.GetFieldByName("Button1"); | |
if (ff != null) | |
{ | |
PDFXEdit.IPXC_Annotation annot = ff.Widget[0]; | |
PDFXEdit.IPXC_AnnotData_Widget WData = (PDFXEdit.IPXC_AnnotData_Widget)annot.Data; | |
PDFXEdit.IPXC_Page srcPage = srcDoc.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
template <typename T> | |
void ConvertAnnotDataToGrey(T* pData) | |
{ | |
float r = 0, g = 0, b = 0; | |
CComPtr<PXC::IColor> pFClr; | |
CComPtr<PXC::IColor> pSClr; | |
pData->get_FColor(&pFClr); | |
if (pFClr == nullptr) | |
return; | |
PXC::ColorType nType = PXC::ColorType_None; |
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
public bool HasInvalidPaths(PDFXEdit.IPXC_Annotation annot) | |
{ | |
uint invalidCount = 0; | |
uint GoTo = pxsInst.StrToAtom("GoTo"); | |
uint GoToR = pxsInst.StrToAtom("GoToR"); | |
uint Launch = pxsInst.StrToAtom("Launch"); | |
PDFXEdit.IPXC_ActionsList actions = annot.get_Actions(PDFXEdit.PXC_TriggerType.Trigger_Up); | |
for (uint k = 0; k < actions.Count; k++) | |
{ | |
if ((actions[k].Type == GoTo) || (actions[k].Type == GoToR)) |
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 verifyPageLinksToolStripMenuItem_Click(object sender, EventArgs e) | |
{ | |
if (pdfCtl.Doc == null) | |
return; | |
uint GoTo = pxsInst.StrToAtom("GoTo"); | |
uint GoToR = pxsInst.StrToAtom("GoToR"); | |
uint Launch = pxsInst.StrToAtom("Launch"); | |
uint invalidCount = 0; | |
for (uint i = 0; i < pdfCtl.Doc.CoreDoc.Pages.Count; i++) | |
{ |
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
//C# | |
private void ResizePageToA2(PDFXEdit.IPXV_Document pDoc, PDFXEdit.PXV_Inst pInst) | |
{ | |
if (pDoc == null) | |
return; | |
int nID = pInst.Str2ID("op.document.resizePages", false); | |
PDFXEdit.IOperation pOp = pInst.CreateOp(nID); | |
PDFXEdit.ICabNode input = pOp.Params.Root["Input"]; | |
input.v = pDoc; | |
PDFXEdit.ICabNode options = pOp.Params.Root["Options"]; |
NewerOlder