page_remove_images

Удаляет изображения на странице.

pub fn page_remove_images(&self, num: i32) -> Result<(), PdfError>

Arguments

  • num - the page number (1-based)

Returns

  • Ok(()) - if the operation succeeds
  • Err(PdfError) - if the operation fails

Example

use asposepdf::Document;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Откройте PDF-document из файла
    let pdf = Document::open("sample.pdf")?;

    // Удалить изображения на странице
    pdf.page_remove_images(1)?;

    // Сохранить ранее открытый PDF-документ с новым именем файла
    pdf.save_as("sample_page1_remove_images.pdf")?;

    Ok(())
}