Posted 4 November 2021, 5:57 pm EST
I’m working in a custom program that uses AR6. I’m using C# in VS 2019 on Windows 10 Pro and targeting .NET Framework 4.7.2 in my solution. My report designers are based on classes that are ultimately based on a SectionReport object.
I have a PDF sent to me as a byte array from an outside source that I want to overlay onto certain pages of an ActiveReport I built. I thought the process would be as simple as:
Stream
reportStream = new MemoryStream(pdfByteArray);
Document
reportDoc = new Document();
reportDoc.Load(reportStream);
for (int i = locationinAR; i < pageCount; i++)
pages[i].Overlay(reportDoc.Pages[i]);
But I’m getting the error “Invalid file format, the guids do not match” on the “reportDoc.Load(reportStream);” line, so I expect I’m missing something obvious. How should I code this?