PDFsharp & MigraDoc Foundation http://forum.pdfsharp.com/ |
|
Token '' was not expected. (when open a pdf file) http://forum.pdfsharp.com/viewtopic.php?f=3&t=2922 |
Page 1 of 1 |
Author: | Rocky [ Fri Sep 12, 2014 2:47 am ] |
Post subject: | Token '' was not expected. (when open a pdf file) |
Code: PdfSharp.Pdf.PdfDocument doc = PdfSharp.Pdf.IO.PdfReader.Open(@"C:\Users\310171611\Desktop\PDF Files\7b0b998c-6849-4630-8bcf-cd6975bf7911.pdf", PdfSharp.Pdf.IO.PdfDocumentOpenMode.Import); for (int j = 0; j < doc.PageCount; j++) { PdfSharp.Pdf.PdfPage page = doc.Pages[j]; //outputDocument.AddPage(page); } Exception: Token '' was not expected. File Download Address: http://pan.baidu.com/s/1c0eWfBU 下载===Download |
Author: | Thomas Hoevel [ Mon Sep 15, 2014 10:14 am ] |
Post subject: | Re: Token '' was not expected. (when open a pdf file) |
Hi! The file does not follow Adobe's recommendations (there are a few million 0 bytes after the EOF marker). Modify the method ReadTrailer() as described here and PDFsharp will be able to read your file: viewtopic.php?p=583#p583 |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |