Example #1
0
        public PdfPrintDocument(PdfDocument document)
        {
            if (document == null)
                throw new ArgumentNullException("document");

            _document = document;
        }
Example #2
0
        /// <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();
        }