private PdfDocument(PdfFile file) { if (file == null) { throw new ArgumentNullException("file"); } _file = file; int pageCount; double maxPageWidth; //得到页数和最大页面宽度 bool success = file.GetPDFDocInfo(out pageCount, out maxPageWidth); if (!success) { throw new Win32Exception(); } _pageCount = pageCount; MaximumPageWidth = maxPageWidth; }
public PdfDocument(Stream stream) : this(PdfFile.Create(stream)) { }