Exception Error loading PDF document

Posted by: fletchsod.developer on 13 July 2020, 2:25 am EST

  • Posted 13 July 2020, 2:25 am EST

    I'm getting this strange error while loading the PDF template.

    Error message below.

    This exception was originally thrown at this call stack:
    GrapeCity.Documents.Pdf.AcroForms.FieldCollection.a(GrapeCity.Documents.Pdf.AcroForms.Field)
    GrapeCity.Documents.Pdf.AcroForms.FieldCollection.InsertItem(int, GrapeCity.Documents.Pdf.AcroForms.Field)
    GrapeCity.Documents.Pdf.AcroForms.AcroForm.a(GrapeCity.Documents.Pdf.Spec.IPdfDictHolder)
    GrapeCity.Documents.Pdf.GcPdfDocument.a(GrapeCity.Documents.Pdf.Spec.IPdfDictHolder)
    GrapeCity.Documents.Pdf.GcPdfDocument.Load(System.IO.Stream, string)

    GrapeCity.Documents.Pdf.PdfException: 'Unexpected exception occurred while parsing PDF document.
    [Field] with name [Memo 462] already exists.'

    Source code below.

    var pdfDocument = new GcPdfDocument(_grapeCityLicense);
    var stream = ....

    pdfDocument.Load(
    stream
    );
  • Replied 13 July 2020, 3:29 am EST

    Here attached is the zipped PDF file.
  • Replied 13 July 2020, 3:23 pm EST

    Hi Scott,

    I do not find any attachment in your post.
    Can you please re-attach it so that we can investigate on this and help you accordingly?

    Regards,
    Prabhat Sharma.
  • Replied 14 July 2020, 12:06 am EST

    Sample.zip

    Here you go
  • Marked as Answer

    Replied 14 July 2020, 7:04 pm EST

    Hi Scott,

    We did not face the issue at our end with your given PDF file with the latest builds i.e. 3.1.0.519.
    We are using the below-given code snippet:
     GcPdfDocument doc = new GcPdfDocument();
    //Create an object of filestream
    var fs = new FileStream(Path.Combine(@"..\..\..\Sample.pdf"), FileMode.Open,
    FileAccess.Read);
    //Load the document
    doc.Load(fs);


    If you are doing something else then please let us know.

    Regards,
    Prabhat Sharma.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels