rotate
Gira el documento PDF.
pub fn rotate(&self, rotation: Rotation) -> Result<(), PdfError>
Arguments
- rotation - rotation angle as enum
Rotation:None,On90,On180,On270, orOn360
Returns
- Ok(()) - if the operation succeeds
- Err(PdfError) - if the operation fails
Example
use asposepdf::{Document, Rotation};
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Abrir un documento PDF con nombre de archivo
let pdf = Document::open("sample.pdf")?;
// Girar documento PDF
pdf.rotate(Rotation::On270)?;
// Guardar el PDF-documento previamente abierto con un nuevo nombre de archivo
pdf.save_as("sample_rotate.pdf")?;
Ok(())
}