PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
PdfMerge Unhandled Exception Specified Password Is Invalid https://forum.pdfsharp.net/viewtopic.php?f=3&t=2435 |
Page 1 of 1 |
Author: | acollins [ Thu May 09, 2013 3:45 pm ] |
Post subject: | PdfMerge Unhandled Exception Specified Password Is Invalid |
We suddenly (past week or so) are intermittently receiving this error. In attempts to avoid it, I updated our PdfMerge function to reference the password (which is optional) in our test environment, however, it did not resolve the problem. About our environment: Windows Server 2008 R2 IIS 7.5 running .NET 4.5 Framework (recently a couple weeks ago to address problems with IE 10), The application pool is currently targeting the .NET 4.0 framework. The PdfSharp.dll version 1.0.0 dated 12/5/2011 Is anyone else experiencing or has experienced this problem, if so, what was the resolution? Please help as we are needing to find a solution urgently as we have a major utility we will be running this weekend which, if interrupted mid-stream due to this error, will not be able to be easily recovered from. Appreciate any insight you might have. Error log details as follows: Event code: 3005 Event message: An unhandled exception has occurred. Event time: 5/9/2013 10:53:09 AM Event time (UTC): 5/9/2013 2:53:09 PM Event ID: 59bbf3ee7f674fb4bb8979e78fb6e4c6 Event sequence: 5 Event occurrence: 1 Event detail code: 0 Application information: Application domain: /LM/W3SVC/2/ROOT-1-130125844002334150 Trust level: Full Application Virtual Path: / Application Path: D:\data\ATHIADEV\ Machine name: ATHIADEV2 Process information: Process ID: 3848 Process name: w3wp.exe Account name: IIS APPPOOL\ATHIA Exception information: Exception type: PdfReaderException Exception message: The specified password is invalid. at PdfSharp.Pdf.IO.PdfReader.Open(Stream stream, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider passwordProvider) at PdfSharp.Pdf.IO.PdfReader.Open(String path, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider provider) at PdfSharp.Pdf.IO.PdfReader.Open(String path, String password, PdfDocumentOpenMode openmode) at ThirdPartyClass.MergePDFSharp(String FileList, String DocType, Int64 Recordno, String username, Boolean Print, Int64 FleetNo, String Policy) at CertClass.ProcessCertsAllActiveTIPFLO(fp_insuredDetails INS, String UserName, Boolean Print, Boolean IncludePolicy, Boolean IncludeEndorsements, Boolean IncludeCCs, Boolean EmailGreenPackage, Boolean IsRenewal, String RenewalDate, String Policy, Boolean IncludeWelcome) at RenewReClassTIPFLO.lb_startConversion_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Request information: Request URL: http://athiadev.1stguard.com/RenewReClassTIPFLO.aspx Request path: /RenewReClassTIPFLO.aspx User host address: 192.168.2.16 User: Annette Is authenticated: True Authentication Type: Forms Thread account name: 1STGUARD\Administrator Thread information: Thread ID: 5 Thread account name: 1STGUARD\Administrator Is impersonating: False Stack trace: at PdfSharp.Pdf.IO.PdfReader.Open(Stream stream, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider passwordProvider) at PdfSharp.Pdf.IO.PdfReader.Open(String path, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider provider) at PdfSharp.Pdf.IO.PdfReader.Open(String path, String password, PdfDocumentOpenMode openmode) at ThirdPartyClass.MergePDFSharp(String FileList, String DocType, Int64 Recordno, String username, Boolean Print, Int64 FleetNo, String Policy) at CertClass.ProcessCertsAllActiveTIPFLO(fp_insuredDetails INS, String UserName, Boolean Print, Boolean IncludePolicy, Boolean IncludeEndorsements, Boolean IncludeCCs, Boolean EmailGreenPackage, Boolean IsRenewal, String RenewalDate, String Policy, Boolean IncludeWelcome) at RenewReClassTIPFLO.lb_startConversion_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Custom event details: |
Author: | Thomas Hoevel [ Mon May 13, 2013 8:43 am ] |
Post subject: | Re: PdfMerge Unhandled Exception Specified Password Is Inval |
Hi! This is not the PdfMerge forum. I never tried this tool and cannot provide any help. |
Author: | acollins [ Mon May 13, 2013 2:08 pm ] |
Post subject: | Re: PdfMerge Unhandled Exception Specified Password Is Inval |
Sorry for the confusion, we wrote our own merge function using the PDF Sharp tool. Here is a sample of the code (vb.net). For i = 0 To UBound(FileNames) If FileNames(i) <> "" Then 'The following line is the one on which the error occurs inputDocument = PdfReader.Open(FileNames(i), MyPW, PdfDocumentOpenMode.Import) For PageIndex = 0 To inputDocument.PageCount - 1 outputDocument.AddPage(inputDocument.Pages(PageIndex)) Next End If outputDocument.Save(NewFileName) Next |
Author: | Thomas Hoevel [ Mon May 13, 2013 4:54 pm ] |
Post subject: | Re: PdfMerge Unhandled Exception Specified Password Is Inval |
I'm afraid there is not much we can do unless we can replicate the exception here. See also: viewtopic.php?p=2094#p2094 It's unclear whether this is a PDFsharp problem or a problem with your PDF files or a problem of both. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |