PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Wed Aug 15, 2018 2:45 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu May 09, 2013 3:45 pm 
Offline

Joined: Thu May 09, 2013 3:18 pm
Posts: 2
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:


Top
 Profile  
Reply with quote  
PostPosted: Mon May 13, 2013 8:43 am 
Offline
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2847
Location: Cologne, Germany
Hi!

This is not the PdfMerge forum. I never tried this tool and cannot provide any help.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon May 13, 2013 2:08 pm 
Offline

Joined: Thu May 09, 2013 3:18 pm
Posts: 2
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


Top
 Profile  
Reply with quote  
PostPosted: Mon May 13, 2013 4:54 pm 
Offline
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2847
Location: Cologne, Germany
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.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group