Combining Two Documents
Posted: Fri Apr 19, 2019 6:55 pm
I have this code for combining two documents, but when I get to the last statement, it throws the error on the DoDocumentVerb line.. I'm not sure what I'm missing, or if there's a better way to do what I'm trying to accomplish.
_viewer.SetProperty(@"Operations.InsertPages.RangeType", @"Exact");
_viewer.SetProperty(@"Operations.InsertPages.FromExternal", 0);
_viewer.SetProperty(@"Operations.InsertPages.DocID", sourceId);
_viewer.SetProperty(@"Operations.InsertPages.InsertBefore", 0);
_viewer.DoDocumentVerb(targetId, null, @"InsertPages", null, out _, (int) PXCVA_Flags.PXCVA_NoUI);
System.Exception
HResult=0x80131500
Message=0. See inner exception for details.
Inner Exception 1:
COMException: Exception from HRESULT: 0x82130001
StackTrace:
at PDFXCviewAxLib.IPDFXCview2.DoDocumentVerb(Int32 ID, String ObjectName, String OperationName, Object DataIn, Object& DataOut, Int32 Flags)
at AxPDFXCviewAxLib.AxCoPDFXCview.DoDocumentVerb(Int32 iD, String objectName, String operationName, Object dataIn, Object& dataOut, Int32 flags)
at Teleport.PdfViewer.ViewerExceptionDecorator.<>c__DisplayClass9_0.<DoDocumentVerb>b__0(Object& d) in C:\\Palabra\\.NET\\Teleport\\Teleport.PdfViewer\\ViewerExceptionDecorator.cs:line 23
at Teleport.PdfViewer.ViewerExceptionDecorator.Run[T](T& input, OutAction`1 act) in C:\\Palabra\\.NET\\Teleport\\Teleport.PdfViewer\\ViewerExceptionDecorator.cs:line 66" string
_viewer.SetProperty(@"Operations.InsertPages.RangeType", @"Exact");
_viewer.SetProperty(@"Operations.InsertPages.FromExternal", 0);
_viewer.SetProperty(@"Operations.InsertPages.DocID", sourceId);
_viewer.SetProperty(@"Operations.InsertPages.InsertBefore", 0);
_viewer.DoDocumentVerb(targetId, null, @"InsertPages", null, out _, (int) PXCVA_Flags.PXCVA_NoUI);
System.Exception
HResult=0x80131500
Message=0. See inner exception for details.
Inner Exception 1:
COMException: Exception from HRESULT: 0x82130001
StackTrace:
at PDFXCviewAxLib.IPDFXCview2.DoDocumentVerb(Int32 ID, String ObjectName, String OperationName, Object DataIn, Object& DataOut, Int32 Flags)
at AxPDFXCviewAxLib.AxCoPDFXCview.DoDocumentVerb(Int32 iD, String objectName, String operationName, Object dataIn, Object& dataOut, Int32 flags)
at Teleport.PdfViewer.ViewerExceptionDecorator.<>c__DisplayClass9_0.<DoDocumentVerb>b__0(Object& d) in C:\\Palabra\\.NET\\Teleport\\Teleport.PdfViewer\\ViewerExceptionDecorator.cs:line 23
at Teleport.PdfViewer.ViewerExceptionDecorator.Run[T](T& input, OutAction`1 act) in C:\\Palabra\\.NET\\Teleport\\Teleport.PdfViewer\\ViewerExceptionDecorator.cs:line 66" string