Beispiel #1
0
 internal PdfDocument(ILog log,
                      IInputBytes inputBytes,
                      HeaderVersion version,
                      CrossReferenceTable crossReferenceTable,
                      bool isLenientParsing,
                      ParsingCachingProviders cachingProviders,
                      IPageFactory pageFactory,
                      Catalog catalog,
                      DocumentInformation information,
                      EncryptionDictionary encryptionDictionary,
                      IPdfTokenScanner pdfScanner,
                      IFilterProvider filterProvider,
                      AcroFormFactory acroFormFactory)
 {
     this.log                  = log;
     this.inputBytes           = inputBytes;
     this.version              = version ?? throw new ArgumentNullException(nameof(version));
     this.isLenientParsing     = isLenientParsing;
     this.cachingProviders     = cachingProviders ?? throw new ArgumentNullException(nameof(cachingProviders));
     this.encryptionDictionary = encryptionDictionary;
     this.pdfScanner           = pdfScanner ?? throw new ArgumentNullException(nameof(pdfScanner));
     this.filterProvider       = filterProvider ?? throw new ArgumentNullException(nameof(filterProvider));
     Information               = information ?? throw new ArgumentNullException(nameof(information));
     pages        = new Pages(log, catalog, pageFactory, isLenientParsing, pdfScanner);
     Structure    = new Structure(catalog, crossReferenceTable, pdfScanner);
     documentForm = new Lazy <AcroForm>(() => acroFormFactory.GetAcroForm(catalog));
 }
Beispiel #2
0
 internal PdfDocument(ILog log,
                      IInputBytes inputBytes,
                      HeaderVersion version,
                      CrossReferenceTable crossReferenceTable,
                      ParsingCachingProviders cachingProviders,
                      IPageFactory pageFactory,
                      Catalog catalog,
                      DocumentInformation information,
                      EncryptionDictionary encryptionDictionary,
                      IPdfTokenScanner pdfScanner,
                      ILookupFilterProvider filterProvider,
                      AcroFormFactory acroFormFactory,
                      BookmarksProvider bookmarksProvider,
                      bool clipPaths)
 {
     this.log                  = log;
     this.inputBytes           = inputBytes;
     this.version              = version ?? throw new ArgumentNullException(nameof(version));
     this.cachingProviders     = cachingProviders ?? throw new ArgumentNullException(nameof(cachingProviders));
     this.encryptionDictionary = encryptionDictionary;
     this.pdfScanner           = pdfScanner ?? throw new ArgumentNullException(nameof(pdfScanner));
     this.filterProvider       = filterProvider ?? throw new ArgumentNullException(nameof(filterProvider));
     this.bookmarksProvider    = bookmarksProvider ?? throw new ArgumentNullException(nameof(bookmarksProvider));
     this.clipPaths            = clipPaths;
     Information               = information ?? throw new ArgumentNullException(nameof(information));
     pages        = new Pages(catalog, pageFactory, pdfScanner);
     Structure    = new Structure(catalog, crossReferenceTable, pdfScanner);
     Advanced     = new AdvancedPdfDocumentAccess(pdfScanner, filterProvider, catalog);
     documentForm = new Lazy <AcroForm>(() => acroFormFactory.GetAcroForm(catalog));
 }
Beispiel #3
0
 internal PdfDocument(ILog log, IRandomAccessRead reader, HeaderVersion version, CrossReferenceTable crossReferenceTable,
                      bool isLenientParsing,
                      ParsingCachingProviders cachingProviders,
                      IPageFactory pageFactory,
                      IPdfObjectParser pdfObjectParser,
                      Catalog catalog,
                      DocumentInformation information)
 {
     this.log                 = log;
     this.reader              = reader ?? throw new ArgumentNullException(nameof(reader));
     this.version             = version ?? throw new ArgumentNullException(nameof(version));
     this.crossReferenceTable = crossReferenceTable ?? throw new ArgumentNullException(nameof(crossReferenceTable));
     this.isLenientParsing    = isLenientParsing;
     this.cachingProviders    = cachingProviders ?? throw new ArgumentNullException(nameof(cachingProviders));
     Information              = information ?? throw new ArgumentNullException(nameof(information));
     Catalog = catalog ?? throw new ArgumentNullException(nameof(catalog));
     Pages   = new Pages(log, Catalog, pdfObjectParser, pageFactory, reader, isLenientParsing);
 }
Beispiel #4
0
 internal PdfDocument(ILog log,
                      IInputBytes inputBytes,
                      HeaderVersion version,
                      CrossReferenceTable crossReferenceTable,
                      bool isLenientParsing,
                      ParsingCachingProviders cachingProviders,
                      IPageFactory pageFactory,
                      Catalog catalog,
                      DocumentInformation information, IPdfTokenScanner pdfScanner)
 {
     this.log              = log;
     this.inputBytes       = inputBytes;
     this.version          = version ?? throw new ArgumentNullException(nameof(version));
     this.isLenientParsing = isLenientParsing;
     this.cachingProviders = cachingProviders ?? throw new ArgumentNullException(nameof(cachingProviders));
     this.pdfScanner       = pdfScanner ?? throw new ArgumentNullException(nameof(pdfScanner));
     Information           = information ?? throw new ArgumentNullException(nameof(information));
     pages     = new Pages(log, catalog, pageFactory, isLenientParsing, pdfScanner);
     Structure = new Structure(catalog, crossReferenceTable, pdfScanner);
 }