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.
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.
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.

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.

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,
}