We use SharePoint as a document repository. Our code pulls the PDF file from SharePoint and saves it in the temp directory using:
docName = Path.GetTempFileName();
Then it fills the file from SharePoint.
When trying to create a new Aspose.Pdf.Document
, we get the following error, and we are using the most recent version of Aspose.Pdf:
Cross reference table or cross reference stream not found
Description
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details:
.: Cross reference table or cross reference stream not found
Source Error:
Line 122: {
Line 123: case ".pdf":
Line 124: pdfDoc = new Aspose.Pdf.Document(docName);
Line 125: masterDoc.Pages.Add(pdfDoc.Pages);
Line 126: break;
Source File:
c:\inetpub\wwwroot\PBKNHRockingham\App_Code\clsPDFUtil.cs
Line: 124
Stack Trace
[: Cross reference table or cross reference stream not found]
Aspose.Pdf.Document..ctor(String filename) +78
clsPDFUtil.CombineDocsToPdf(List`1 docList, String fileNumber, String combinedFileName, String password)
in c:\inetpub\wwwroot\PBKNHRockingham\App_Code\clsPDFUtil.cs:124
KCMS.DAL.MailMerge.CombineDocsToPdf(List`1 docList, String fileNumber, String combinedFileName, String password)
in c:\inetpub\wwwroot\PBKNHRockingham\App_Code\DAL\MailMerge.cs:2578
Core_DocumentRedact.btnUpdate_Click(Object sender, EventArgs e)
in c:\inetpub\wwwroot\PBKNHRockingham\Core\DocumentRedact.aspx.cs:123
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563