I want to report bug with this code:
byte[] file = File.ReadAllBytes("Test.pdf");
RadFixedDocument document = null;
var prov = new PdfFormatProvider();
using (var input = new MemoryStream())
{
input.Write(file, 0, file.Length);
document = prov.Import(input);
}
When I tried to import my document to RadFixedDocument it says:
Ex: {"Stack empty."}
Stack trace:
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.Stack`1.Peek()
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.Parser.PostScriptReader.PushToken(PdfPrimitive primitive)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.Parser.PrimitiveParsers.ArrayParser.End()
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.Parser.PostScriptReader.<BuildStateMachine>b__8(PostScriptReaderArgs b)
at Telerik.Windows.Documents.Data.StateMachine.State`1.ExecuteActionIfNotNull(Action`1 action, TArgs arguments)
at Telerik.Windows.Documents.Data.StateMachine.State`1.Enter(TArgs arguments)
at Telerik.Windows.Documents.Data.StateMachine.StateMachine`1.GoToState(State`1 state, TArgs arguments)
at Telerik.Windows.Documents.Data.StateMachine.StateMachine`1.GoToNextState(TArgs arguments)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.Parser.PostScriptReader.Read(IPdfImportContext context, Int64 endPosition)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.Parser.PostScriptReader.Read(IPdfImportContext context)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.ContentStreamInterpreter.ReadContentPrimitives()
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.ContentStreamInterpreter.Execute()
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.ContentStream.ParseContentData(Byte[] data, IRadFixedDocumentImportContext context, IResourceHolder resourceHolder, IContentRootElement contentRoot)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.Page.CopyPropertiesTo(PostScriptReader reader, IRadFixedDocumentImportContext context, RadFixedPage fixedPage)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.DocumentCatalog.CopyPagePropertiesTo(PostScriptReader reader, IRadFixedDocumentImportContext context)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.DocumentCatalog.CopyPropertiesTo(PostScriptReader reader, IRadFixedDocumentImportContext context)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.RadFixedDocumentImportContext.BeginImportOverride()
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.BaseImportContext.BeginImport(Stream pdfFileStream)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.PdfImporter.Import(Stream input, IPdfImportContext context)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider.ImportOverride(Stream input)
at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Import(Stream input
Please fix this issue.