page_remove_annotations
Elimina anotaciones en la página.
pub fn page_remove_annotations(&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>> {
// Abrir un PDF-documento desde un archivo
let pdf = Document::open("sample.pdf")?;
// Eliminar anotaciones en la página
pdf.page_remove_annotations(1)?;
// Guardar el PDF-documento previamente abierto con un nuevo nombre de archivo
pdf.save_as("sample_page1_remove_annotations.pdf")?;
Ok(())
}