public PdfPrintDocument(PdfDocument document) { if (document == null) throw new ArgumentNullException("document"); _document = document; }
/// <summary> /// Load a <see cref="PdfDocument"/> into the control. /// </summary> /// <param name="document">Document to load.</param> public void Load(PdfDocument document) { if (document == null) throw new ArgumentNullException("document"); if (document.PageCount == 0) throw new ArgumentException("Document does not contain any pages", "document"); _document = document; _height = DefaultSettings.Height * _document.PageCount; UpdateScrollbars(); Invalidate(); }