Skip to content

Commit 1f41ced

Browse files
Aspose.PDF for Rust via C++ 25.8
1 parent a12907e commit 1f41ced

38 files changed

+518
-15
lines changed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
[package]
22
name = "asposepdf"
3-
version = "1.25.7"
3+
version = "1.25.8"
44
edition = "2021"
55
license = "MIT"
6-
license-file = "LICENSE_COMMERCIAL.txt"
76
description = "Aspose.PDF for Rust via C++ is a powerful toolkit that allows developers to manipulate PDF files directly and helps do various tasks for PDF. Contains unique features for converting PDF to other formats."
87
readme = "README.md"
98
repository = "https://github.com/aspose-pdf/aspose-pdf-rust-cpp"

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 Aspose Pty Ltd
3+
Copyright (c) 2025 Aspose Pty Ltd.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

LICENSE_COMMERCIAL.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The shared library (DLL, SO, DYLIB) and its associated files are proprietary
1+
The shared library (DLL/LIB, SO, DYLIB) and its associated files are proprietary
22
and are not covered under the MIT License. Detailed terms and conditions are
33
specified in the Aspose EULA.
44

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,26 @@ Contains unique features for converting PDF to other formats.
1818
- **Document-level operations**
1919
- `optimize`, `optimize_resource`, `grayscale`, `rotate`, `set_background`, `repair`
2020
Optimize PDF layout and resources, convert to grayscale, rotate pages, set background, and repair corrupted documents.
21+
- `replace_text`, `add_page_num`, `add_text_header`, `add_text_footer`
22+
Replace text, add page numbers, and insert custom text in the header or footer of the document.
2123

2224
- **Page-level operations**
2325
- `rotate`, `set_size`, `grayscale`, `add_text`
2426
Rotate individual pages, set page size, convert pages to grayscale, and add text.
27+
- `page_replace_text`, `page_add_page_num`, `page_add_text_header`, `page_add_text_footer`
28+
Replace text on a specific page, add page number to a page, and insert custom text in the header or footer of a page.
2529

2630
- **Content extraction**
2731
- `extract_text`
2832
Retrieve plain text content from PDF pages.
33+
- `export_fdf`, `export_xfdf`, `export_xml`
34+
Export data from the previously opened PDF document with AcroForm to FDF, XFDF, or XML formats.
2935

3036
### PDF converting and saving
3137

3238
- **Microsoft Office:**
3339
- `DOC`, `DOCX`, `XLSX`, `PPTX`
40+
- `DOCX` with Enhanced Recognition Mode (fully editable tables and paragraphs)
3441
- **Images:**
3542
- `JPEG`, `PNG`, `BMP`, `TIFF`
3643
- **PDFs:**

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ fn main() -> Result<(), Box<dyn Error>> {
122122
println!("cargo:rustc-link-lib=dylib={}", lib_base_name);
123123
println!("cargo:rerun-if-changed={}", lib_dir.display());
124124

125-
// Platform-specific rpath handling
125+
// Platform-specific rpath handling (macos/linux)
126126
#[cfg(target_os = "macos")]
127127
println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path");
128128
#[cfg(target_os = "linux")]

examples/add_page_num.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
use asposepdf::Document;
2+
3+
fn main() -> Result<(), Box<dyn std::error::Error>> {
4+
// Open a PDF-document with filename
5+
let pdf = Document::open("sample.pdf")?;
6+
7+
// Add page number to a PDF-document
8+
pdf.add_page_num()?;
9+
10+
// Save the previously opened PDF-document with new filename
11+
pdf.save_as("sample_add_page_num.pdf")?;
12+
13+
Ok(())
14+
}

examples/add_text_footer.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
use asposepdf::Document;
2+
3+
fn main() -> Result<(), Box<dyn std::error::Error>> {
4+
// Open a PDF-document with filename
5+
let pdf = Document::open("sample.pdf")?;
6+
7+
// Add text in Footer of a PDF-document
8+
pdf.add_text_footer("FOOTER")?;
9+
10+
// Save the previously opened PDF-document with new filename
11+
pdf.save_as("sample_add_text_footer.pdf")?;
12+
13+
Ok(())
14+
}

examples/add_text_header.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
use asposepdf::Document;
2+
3+
fn main() -> Result<(), Box<dyn std::error::Error>> {
4+
// Open a PDF-document with filename
5+
let pdf = Document::open("sample.pdf")?;
6+
7+
// Add text in Header of a PDF-document
8+
pdf.add_text_header("HEADER")?;
9+
10+
// Save the previously opened PDF-document with new filename
11+
pdf.save_as("sample_add_text_header.pdf")?;
12+
13+
Ok(())
14+
}

examples/export_fdf.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
use asposepdf::Document;
2+
3+
fn main() -> Result<(), Box<dyn std::error::Error>> {
4+
// Open a PDF-document with filename
5+
let pdf = Document::open("sample.pdf")?;
6+
7+
// Export from the previously opened PDF-document with AcroForm to FDF-document
8+
pdf.export_fdf("sample.fdf")?;
9+
10+
Ok(())
11+
}

examples/export_xfdf.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
use asposepdf::Document;
2+
3+
fn main() -> Result<(), Box<dyn std::error::Error>> {
4+
// Open a PDF-document with filename
5+
let pdf = Document::open("sample.pdf")?;
6+
7+
// Export from the previously opened PDF-document with AcroForm to XFDF-document
8+
pdf.export_xfdf("sample.xfdf")?;
9+
10+
Ok(())
11+
}

0 commit comments

Comments
 (0)