I have 2 pdf documents that are causing us troubles. Using the following code:
- Code: Select all
static void Main(string[] args)
{
try
{
TestDocA();
}
catch( Exception ex)
{
Console.Write(ex.ToString());
}
try
{
TestDocB();
}
catch (Exception ex)
{
Console.Write(ex.ToString());
}
Console.ReadKey();
}
private static void TestDocA()
{
PdfDocument doca = new PdfDocument(@"C:\TestProd\FormatException.pdf");
PdfDocument mergedDoc = new PdfDocument();
mergedDoc.InsertPageRange(doca, 0, doca.Pages.Count - 1);
}
private static void TestDocB()
{
PdfDocument docb = new PdfDocument(@"C:\TestProd\Fatal Error.pdf");
}
Executing TestDocA results in the following error:
- Code: Select all
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Spire.Pdf.Widget.PdfSignatureFieldWidget.ᜀ(String A_0)
at Spire.Pdf.Widget.PdfSignatureFieldWidget.ᜀ(sprᢻ A_0)
at Spire.Pdf.Widget.PdfSignatureFieldWidget..ctor(sprῶ A_0, spr᪬ A_1)
at Spire.Pdf.Widget.PdfFormFieldWidgetCollection.ᜆ(sprῶ A_0, spr᪬ A_1)
at Spire.Pdf.Widget.PdfFormFieldWidgetCollection.ᜀ(Int32 A_0)
at Spire.Pdf.Widget.PdfFormFieldWidgetCollection..ctor(PdfFormWidget A_0)
at Spire.Pdf.Widget.PdfFormWidget.get_FieldsWidget()
at Spire.Pdf.PdfPageBase.ᜀ(sprᢻ A_0)
at Spire.Pdf.PdfPageBase.ᜓ()
at Spire.Pdf.PdfPageWidget..ctor(PdfDocumentBase A_0, spr᪬ A_1, sprῶ A_2)
at Spire.Pdf.Widget.PdfPageCollection.ᜄ(sprῶ A_0)
at spr᪬.ᜀ(sprᢻ A_0)
at spr᪬.ᜄ(sprᢻ A_0)
at spr᧙.ᜂ()
at spr᧙.ᜀ()
at spr᧙.ᜅ()
at spr᪬.ᜄ(sprᢻ A_0)
at Spire.Pdf.Widget.PdfPageCollection.ᜀ(Int32 A_0, Int32& A_1, Boolean A_2)
at Spire.Pdf.Widget.PdfPageCollection.ᜀ(Int32 A_0)
at Spire.Pdf.PdfDocumentBase.ImportPageRange(PdfDocumentBase ldDoc, Int32 startIndex, Int32 endIndex)
TestDocB throws the following:
- Code: Select all
System.Exception: Fatal Error at 813.
at spr᭄.ᜀ(YYError A_0, Boolean A_1)
at spr᭄.ᜌ()
at sprᩤ.ᜋ()
at sprᩤ.ᜐ()
at sprទ.ᜀ(sprᢻ A_0)
at spr᪬.ᜄ(sprᢻ A_0)
at spr᧙.ᜂ()
at spr᧙.ᜀ()
at spr᧙.ᜅ()
at spr᪬.ᜂ(sprᢻ A_0)
at sprᣩ.ᜃ()
at sprᣩ.ᜁ(Stream A_0)
at Spire.Pdf.PdfDocument..ctor(String filename)
For privacy reasons I am not allowed to share these pdf documents on a public forum, do you have a secure upload site or FTP site to get the documents to you for further investigation?
Kind regards,
Sikke Kooistra