/// Creates a new [PdfMetadata] collection from the given [PdfDocument] and library bindings.
Creates a new [PdfMetadata] collection from the given [PdfDocument] and library bindings.
Creates a new [ PdfMetadata ] collection from the given [ PdfDocument ] and library bindings .
pub(crate) fn new(
        document: &'a PdfDocument<'a>,
        bindings: &'a dyn PdfiumLibraryBindings,
    ) -> Self {
        let mut result = PdfMetadata {
            document,
            bindings,
            tags: vec![],
        };
        if let Some(tag) = result.get(PdfDocumentMetadataTagType::Title) {
            result.tags.push(tag);
        }
        if let Some(tag) = result.get(PdfDocumentMetadataTagType::Author) {
            result.tags.push(tag);
        }
        if let Some(tag) = result.get(PdfDocumentMetadataTagType::Subject) {
            result.tags.push(tag);
        }
        if let Some(tag) = result.get(PdfDocumentMetadataTagType::Keywords) {
            result.tags.push(tag);
        }
        if let Some(tag) = result.get(PdfDocumentMetadataTagType::Creator) {
            result.tags.push(tag);
        }
        if let Some(tag) = result.get(PdfDocumentMetadataTagType::Producer) {
            result.tags.push(tag);
        }
        if let Some(tag) = result.get(PdfDocumentMetadataTagType::CreationDate) {
            result.tags.push(tag);
        }
        if let Some(tag) = result.get(PdfDocumentMetadataTagType::ModificationDate) {
            result.tags.push(tag);
        }
        result
    }
pub ( crate ) fn new ( document : & ' a PdfDocument < ' a > , bindings : & ' a dyn PdfiumLibraryBindings , ) -> Self { let mut result = PdfMetadata { document , bindings , tags : vec ! [ ] , } ; if let Some ( tag ) = result . get ( PdfDocumentMetadataTagType :: Title ) { result . tags . push ( tag ) ; } if let Some ( tag ) = result . get ( PdfDocumentMetadataTagType :: Author ) { result . tags . push ( tag ) ; } if let Some ( tag ) = result . get ( PdfDocumentMetadataTagType :: Subject ) { result . tags . push ( tag ) ; } if let Some ( tag ) = result . get ( PdfDocumentMetadataTagType :: Keywords ) { result . tags . push ( tag ) ; } if let Some ( tag ) = result . get ( PdfDocumentMetadataTagType :: Creator ) { result . tags . push ( tag ) ; } if let Some ( tag ) = result . get ( PdfDocumentMetadataTagType :: Producer ) { result . tags . push ( tag ) ; } if let Some ( tag ) = result . get ( PdfDocumentMetadataTagType :: CreationDate ) { result . tags . push ( tag ) ; } if let Some ( tag ) = result . get ( PdfDocumentMetadataTagType :: ModificationDate ) { result . tags . push ( tag ) ; } result }
Creates a new [PdfMetadata] collection from the given [PdfDocument] and library bindings.
Creates a new [ PdfMetadata ] collection from the given [ PdfDocument ] and library bindings .
document
&'a PdfDocument<'a>
bindings
&'a dyn PdfiumLibraryBindings