private void updatepageinfo()
        {
            // update the pages info
            var pageSizes = _file.GetPDFDocInfo();

            if (pageSizes == null)
            {
                throw new Win32Exception();
            }
            PageSizes = new ReadOnlyCollection <SizeF>(pageSizes);
        }
        private PdfDocument(PdfFile file)
        {
            if (file == null)
            {
                throw new ArgumentNullException("file");
            }

            _file = file;

            var pageSizes = file.GetPDFDocInfo();

            if (pageSizes == null)
            {
                throw new Win32Exception();
            }

            PageSizes = new ReadOnlyCollection <SizeF>(pageSizes);
        }