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.InsertItem(int, GrapeCity.Documents.Pdf.AcroForms.Field)
    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 = ....

  • 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?

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


    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.
    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,
    //Load the document

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

    Prabhat Sharma.
Need extra support?

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

Learn More

Forum Channels