#![deny(unsafe_code)]
pub mod acroform_document_helper;
pub mod annotation_object_helper;
pub(crate) mod bit_stream;
pub(crate) mod bit_writer;
pub mod cache;
pub mod content_normalizer;
pub mod content_stream;
pub mod default_appearance;
pub mod diagnostics;
pub mod document_json;
pub mod embedded_files;
pub mod encryption;
pub mod engine;
pub mod error;
pub mod filespec_helper;
pub mod filters;
pub mod form_field_object_helper;
pub mod job;
pub mod json;
pub mod json_inspect;
pub mod linearization;
pub mod logger;
pub mod matrix;
#[allow(unsafe_code)]
mod memory_usage;
mod nntree;
pub mod object_copy;
mod object_handle;
pub mod object_ref;
pub mod objr_obj_annot_p;
pub(crate) mod optimization;
pub mod outline_document_helper;
pub mod outline_object_helper;
pub(crate) mod overlay_appearance_stream;
mod page_annotation_flatten;
pub mod page_document_helper;
pub mod page_extract;
pub(crate) mod page_form_xobject;
pub mod page_label_document_helper;
pub mod page_object_helper;
pub mod page_splice;
pub mod pages;
pub mod parser;
pub mod pdf;
pub mod pdf_string;
mod pdf_syntax;
pub mod pdf_version;
pub mod pipeline;
pub mod qdf_fix;
mod qpdf_time;
pub mod qutil;
pub mod reader;
mod resource_finder;
mod resource_replacer;
pub mod resources;
pub mod signatures;
pub(crate) mod stream_filter;
pub mod struct_tree_pg;
pub mod thread_bead_p;
pub mod token_filter;
pub mod tokenizer;
pub mod writer;
pub mod xref;
pub mod xref_entry;
pub use logger::QPDFLogger;
pub use acroform_document_helper::{AcroFormDocumentHelper, AcroFormFieldInfo};
pub use annotation_object_helper::AnnotationObjectHelper;
pub use cache::{CacheEntry, ObjectCache};
pub use content_normalizer::{normalize_content_stream, ContentNormalization};
pub use content_stream::ObjectHandleParserCallbacks as ObjectParserCallbacks;
pub use content_stream::{parse_content_operations, ObjectHandleParserCallbacks, ParseControl};
pub use default_appearance::{parse_default_appearance, DefaultAppearance, TextColor};
pub use diagnostics::{Diagnostic, Diagnostics, Severity};
pub use embedded_files::{
delete_embedded_file, insert_embedded_file, list_embedded_files,
list_embedded_files_with_max_depth, remove_attachment, EmbeddedFileDocumentHelper,
DEFAULT_MAX_EMBEDDED_FILES_DEPTH,
};
pub use encryption::permissions::{
Permissions, PermissionsConfig, PrintPermission, R2PermissionsConfig,
};
pub use encryption::{
CopyEncryptionSource, EncryptMethod, EncryptParams, ObjectKeyAlg, PasswordMode,
};
pub use error::{EncryptedError, Error, Result, UsageError};
pub use filespec_helper::{
encode_utf16be, format_pdf_date, md5_checksum, EmbeddedFileStream, FileParamDates, FileSpec,
FileSpecBuilder,
};
pub use form_field_object_helper::FormFieldObjectHelper;
#[allow(deprecated)]
pub use job::{
add_attachment_from_path, apply_overlay_specs, ascii_filename_fallback,
copy_duplicate_page_annotations, extract_attachment, extract_attachment_to_path,
format_attachment_list_with_sink, merge_documents, overlay_verbose_report,
prune_acroform_after_subset, prune_acroform_after_subset_with_max_depth, write_attachment,
AttachmentInfo, CombinedPage, CombinedPlan, Endpoint, InputSpec, MergeInput, OverlayKind,
OverlaySpec, OverlayVerbosePage, OverlayVerboseSource, PagePlan, PageRange, PageRangeEntry,
PageSpecJobOutput, Parity, RotateSpec, SelectedPage, DEFAULT_MAX_ACROFORM_DEPTH,
};
pub use job::{
optimize_images, should_remove_unreferenced_resources, ImageOptimizationOptions,
RemoveUnreferencedResources,
};
pub use matrix::{Matrix, Rectangle};
pub use nntree::{
NameTree, NameTreeCursor, NumberTree, NumberTreeCursor, DEFAULT_MAX_TREE_DEPTH, LEAF_MAX,
};
pub use object_handle::{
ArrayItemCursor, ArrayItems, DictItem, DictItemCursor, DictItems, ObjectHandle,
ObjectHandleMatrix, StreamDataProvider, STREAM_ENCODE_COMPRESS, STREAM_ENCODE_NORMALIZE,
};
pub use object_ref::{ObjectRef, ParseObjectRefError};
pub use objr_obj_annot_p::drop_objr_obj_annot_dangling_p;
pub use outline_document_helper::OutlineDocumentHelper;
pub use outline_object_helper::{OutlineId, OutlineItem, OutlineTree, OutlineTreeIter};
pub use page_document_helper::{PageDocumentHelper, PageInput};
pub use page_extract::{extract_page, extract_pages};
pub use page_label_document_helper::{
merge_adjacent_ranges, merge_adjacent_ranges_with_prefix_presence, LabelRange, LabelStyle,
PageLabelDocumentHelper,
};
pub use page_object_helper::{PageBox, PageObjectHelper};
pub use page_splice::{splice_pages, splice_pages_with_max_depth};
pub use pages::tree_rebuild::{rebuild_page_tree, rebuild_page_tree_with_max_depth, RebuildResult};
pub use pdf::Pdf;
pub use pdf_version::{parse_pdf_version, parse_pdf_version_spec, PdfVersion};
pub use pipeline::{Pipeline, PipelineError, PipelineHandle, PipelineResult};
pub use qdf_fix::fix_qdf;
pub use reader::{PdfOpenOptions, ReadSeek};
pub use signatures::{
acroform_sig_flags, clear_sig_flags, signatures, signatures_with_max_depth,
strip_signature_values, SignatureInfo, DEFAULT_MAX_SIGNATURE_FIELD_DEPTH,
SIG_FLAGS_APPEND_ONLY, SIG_FLAGS_SIGNATURES_EXIST,
};
pub use struct_tree_pg::{
drop_struct_elem_dangling_pg, drop_struct_elem_dangling_pg_with_max_depth,
DEFAULT_MAX_STRUCT_TREE_DEPTH,
};
pub use thread_bead_p::drop_thread_bead_dangling_p;
pub use token_filter::{TokenFilter, TokenFilterOutput};
pub use tokenizer::{Token as ContentToken, TokenType as ContentTokenType};
#[cfg(any(test, feature = "qpdf-zlib-compat"))]
#[doc(hidden)]
pub use writer::V5Randomness;
pub use writer::{
write_stream_to_buf, CompressStreams, DecodeLevel, NewlineBeforeEndstream, ObjectStreamMode,
PdfWriter, StreamDataMode, WriterConfiguration,
};
pub use xref::{
load_xref_and_trailer, load_xref_and_trailer_best_effort, load_xref_and_trailer_with_repair,
LoadedXref, XrefForm,
};
pub use xref_entry::XrefEntry;
pub fn version() -> &'static str {
env!("CARGO_PKG_VERSION")
}
pub fn qpdf_version() -> &'static str {
"11.9.0"
}