Aspose.PDF for Rust via C++

Aspose.PDF for Rust via C++ allows developers manipulate them PDF files directly in the Rust.

Structs

Document

Document represents a PDF-document.

pub struct Document { /* private fields */ }

Implementations

Convert from PDF functions

FunctionDescription
save_docxConvert and save the previously opened PDF-document as DocX-document.
save_docConvert and save the previously opened PDF-document as Doc-document.
save_xlsxConvert and save the previously opened PDF-document as XlsX-document.
save_txtConvert and save the previously opened PDF-document as Txt-document.
save_pptxConvert and save the previously opened PDF-document as PptX-document.
save_xpsConvert and save the previously opened PDF-document as Xps-document.
save_texConvert and save the previously opened PDF-document as TeX-document.
save_epubConvert and save the previously opened PDF-document as Epub-document.
save_bookletConvert and save the previously opened PDF-document as booklet PDF-document.
save_n_upConvert and save the previously opened PDF-document as N-Up PDF-document.
save_markdownConvert and save the previously opened PDF-document as Markdown-document.
save_tiffConvert and save the previously opened PDF-document as Tiff-document.
save_docx_enhancedConvert and save the previously opened PDF-document as DocX-document with Enhanced Recognition Mode (fully editable tables and paragraphs).
save_svg_zipConvert and save the previously opened PDF-document as SVG-archive.
export_fdfExport from the previously opened PDF-document with AcroForm to FDF-document.
export_xfdfExport from the previously opened PDF-document with AcroForm to XFDF-document.
export_xmlExport from the previously opened PDF-document with AcroForm to XML-document.
page_to_jpgConvert and save the specified page as Jpg-image.
page_to_pngConvert and save the specified page as Png-image.
page_to_bmpConvert and save the specified page as Bmp-image.
page_to_tiffConvert and save the specified page as Tiff-image.
page_to_svgConvert and save the specified page as Svg-image.
page_to_pdfConvert and save the specified page as PDF-document.
page_to_dicomConvert and save the specified page as DICOM-image.

Organize PDF functions

FunctionDescription
optimizeOptimize PDF-document content.
optimize_resourceOptimize resources of PDF-document.
grayscaleConvert PDF-document to black and white.
rotateRotate PDF-document.
set_backgroundSet PDF-document background color using RGB values.
repairRepair PDF-document.
replace_textReplace text in PDF-document
add_page_numAdd page number to a PDF-document
add_text_headerAdd text in Header of a PDF-document
add_text_footerAdd text in Footer of a PDF-document
flattenFlatten PDF-document
remove_annotationsRemove annotations from PDF-document
remove_attachmentsRemove attachments from PDF-document
remove_blank_pagesRemove blank pages from PDF-document
remove_bookmarksRemove bookmarks from PDF-document
remove_hidden_textRemove hidden text from PDF-document
remove_imagesRemove images from PDF-document
remove_javascriptsRemove java scripts from PDF-document
page_rotateRotate a page in the PDF-document.
page_set_sizeSet the size of a page in the PDF-document.
page_grayscaleConvert page to black and white.
page_add_textAdd text on page.
page_replace_textReplace text on page
page_add_page_numAdd page number on page
page_add_text_headerAdd text in page header
page_add_text_footerAdd text in page footer
page_remove_annotationsRemove annotations in page.
page_remove_hidden_textRemove hidden text in page.
page_remove_imagesRemove images in page.

Core PDF functions

FunctionDescription
newCreate a new PDF-document.
openOpen a PDF-document with filename.
saveSave the previously opened PDF-document.
save_asSave the previously opened PDF-document with new filename.
set_licenseSet license with filename.
extract_textReturn the PDF-document contents as plain text.
page_addAdd new page in PDF-document.
page_insertInsert new page at the specified position in PDF-document.
page_deleteDelete specified page in PDF-document.
page_countReturn the number of pages in the PDF-document.

Miscellaneous

FunctionDescription
aboutReturn metadata information about the Aspose.PDF for Rust via C++.

Structs secondary

ProductInfo contains metadata about the Aspose.PDF for Rust via C++.

#[derive(Debug, Deserialize)]
pub struct ProductInfo {
    #[serde(rename = "product")]
    pub product: String,

    #[serde(rename = "family")]
    pub family: String,

    #[serde(rename = "version")]
    pub version: String,

    #[serde(rename = "releasedate")]
    pub release_date: String,

    #[serde(rename = "producer")]
    pub producer: String,

    #[serde(rename = "islicensed")]
    pub is_licensed: bool,
}

Enums

Enumeration of possible page size values.

pub enum PageSize {
    /// A0 size.
    A0 = 0,
    /// A1 size.
    A1 = 1,
    /// A2 size.
    A2 = 2,
    /// A3 size.
    A3 = 3,
    /// A4 size.
    A4 = 4,
    /// A5 size.
    A5 = 5,
    /// A6 size.
    A6 = 6,
    /// B5 size.
    B5 = 7,
    /// PageLetter size.
    PageLetter = 8,
    /// PageLegal size.
    PageLegal = 9,
    /// PageLedger size.
    PageLedger = 10,
    /// P11x17 size.
    P11x17 = 11,
}

Enumeration of possible rotation values.

pub enum Rotation {
    /// Non-rotated.
    None = 0,
    /// Rotated on 90 degrees clockwise.
    On90 = 1,
    /// Rotated on 180 degrees.
    On180 = 2,
    /// Rotated on 270 degrees clockwise.
    On270 = 3,
    /// Rotated on 360 degrees clockwise.
    On360 = 4,
}