Posted 25 May 2020, 7:07 pm EST
Hi,
I have an issue for load PDF file in GcPdfDocument.
The version of GcPdfDocument is 3.1.0.
Below is my code
Using (var str = File.OpenRead(@“2410121X-05.pdf”))
{
var doc = new GcPdfDocument();
doc.Load(str);
}
Exception message:
GrapeCity.Documents.Pdf.PdfException: Unexpected exception occurred while parsing PDF document.
Offset must be within plus or minus 14 hours.
Parameter name: offset —> System.ArgumentOutOfRangeException: Offset must be within plus or minus 14 hours.
Parameter name: offset
at System.DateTimeOffset.ValidateOffset(TimeSpan offset)
at System.DateTimeOffset…ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second, TimeSpan offset)
at GrapeCity.Documents.Pdf.PdfDateTime.TryParse(String s, DateTimeOffset& value)
at afq.a(IPdfDictHolder A_0, String A_1, PdfDateTime& A_2)
at GrapeCity.Documents.Pdf.DocumentInfo.ev(IPdfDictHolder A_0)
at GrapeCity.Documents.Pdf.DocumentInfo.a.k7(agc A_0, IPdfDictHolder A_1, DocumentInfo& A_2)
at agb.a[a](PdfObject A_0, a& A_1)
at agb.a[a](agc A_0, Object A_1)
at GrapeCity.Documents.Pdf.GcPdfDocument.Load(Stream stream, String password)
— End of stack trace from previous location where exception was thrown —
at GrapeCity.Documents.Pdf.GcPdfDocument.Load(Stream stream, String password)
at MyWeb.Test.WebForm6.Button2_Click(Object sender, EventArgs e) at D:\AgileProject\Product\Dev\Src\Ap\Web\MyWeb\Test\WebForm6.aspx.cs: Line 65
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)