1#![doc = include_str!("../README.md")]
2#![forbid(unsafe_code)]
3#![cfg_attr(docsrs, feature(doc_cfg))]
4#![warn(clippy::indexing_slicing)]
6
7mod annot;
14mod annot_spec;
15mod associated;
16mod attach;
17mod build_graph;
18mod canvas;
19mod content;
20mod dests;
21mod doc;
22mod encrypt;
23mod error;
24mod flatten;
25mod font;
26mod form;
27mod form_field;
28mod image;
29mod import;
30mod info;
31mod names;
32mod outline;
33mod page_label;
34mod page_objects;
35mod pages;
36mod pdfa_convert;
37mod prefs;
38mod stamp;
39#[cfg(feature = "svg-import")]
40mod svg_ingest;
41#[cfg(feature = "svg-text")]
42mod svg_text;
43mod write;
44
45pub use annot::{
46 AnnotBorder, AnnotBorderStyle, AnnotGoToView, AnnotLinkAction, AnnotLinkHighlight, AnnotMeta,
47 AnnotRemoteDest, AnnotSpec, AnnotWrite, BorderStyleName, DEFAULT_DA, LineEndingStyle, Quad,
48 add_annotation, delete_annotation, delete_annotation_at, delete_named_destination,
49 ensure_named_destination, named_destinations, set_named_destination, update_annotation,
50 update_annotation_at,
51};
52pub use annot_spec::{
53 CaretSpec, CircleSpec, FreeTextSpec, InkSpec, LineSpec, LinkSpec, MarkupKind, MarkupSpec,
54 SquareSpec, TextSpec,
55};
56pub use associated::{
57 Relationship, associate_file_with_document, associate_file_with_page,
58 document_associated_files, page_associated_files,
59};
60pub use attach::{
61 AttachmentOptions, AttachmentOptionsBuilder, add_attachment, delete_attachment,
62 remove_attachment, set_attachment_description, set_attachment_file, set_attachment_file_with,
63 set_attachment_name, set_attachment_param,
64};
65pub use build_graph::build_graph;
66#[cfg(feature = "svg-import")]
67pub use canvas::SvgForm;
68pub use canvas::{Canvas, Dash, Fill, LineCap, LineJoin, MiterLimit, Paint, Stroke};
69pub use content::{
70 ContentsShape, PageRewrite, Regenerated, ResourceTable, ShareCounts, apply_rewrite, regenerate,
71 shared_objects, write_float, write_matrix, write_point, write_rect,
72};
73pub use doc::EditDoc;
74pub use encrypt::{Encryptor, IvSource};
75pub use error::Error;
76pub use flatten::{FlattenMode, Flattened, UnknownFlattenMode, flatten, flatten_document};
77pub use font::embed::{EmbeddedFont, FontEncoding, MissingGlyph, string_width};
78pub use font::{GidMap, Subsetted, subset};
79pub use form::{WidgetAppearance, set_need_appearances, set_widget_appearance};
80pub use form_field::{DEFAULT_FIELD_DA, FieldKindSpec, FieldSpec, add_form_field, add_form_font};
81pub use image::{EmbeddedImage, PixelFormat};
82pub use import::{
83 ImportOptions, ImportOptionsBuilder, NUpOptions, NUpOptionsBuilder, PageRange, import_pages,
84 n_page_to_one,
85};
86pub use info::{pdf_date, set_info_entry, set_info_name, set_xmp_metadata};
87pub use outline::{BookmarkSpec, BookmarkTarget, set_outline};
88pub use page_label::{PageLabelRange, PageLabelStyle, set_page_labels};
89pub use page_objects::{ImageBuilder, PathBuilder, TextBuilder};
90pub use pages::{
91 PageBox, add_blank_page, delete_pages, reorder_pages, set_page_box, set_page_rotation,
92 set_page_rotation_to,
93};
94pub use pdfa_convert::{convert as to_pdfa, pdf_date_to_iso8601};
95pub use kurbo::Size;
98pub use pdfrum_font::StandardFont;
99pub use prefs::{
100 Duplex, ViewerPreferences, clear_open_action, set_open_action, set_viewer_preferences,
101};
102pub use stamp::{StampOptions, StampOptionsBuilder, StampPosition, UnknownStampPosition};
103#[cfg(feature = "svg-import")]
104pub use svg_ingest::{SvgFit, SvgIngestReport, Unsupported, UnsupportedItem};
105#[cfg(feature = "svg-text")]
106pub use svg_text::SvgFonts;
107pub use write::id::{FileId, IdSource};
108pub use write::{Encryption, EncryptionBuilder, SaveMode, SaveOptions, SaveOptionsBuilder, save};