rotate
PDF-dosyayı döndürür.
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>> {
// Dosya adıyla bir PDF-belgesi aç
let pdf = Document::open("sample.pdf")?;
// PDF-dosyayı Döndür
pdf.rotate(Rotation::On270)?;
// Daha önce açılmış PDF belgesini yeni dosya adıyla kaydet
pdf.save_as("sample_rotate.pdf")?;
Ok(())
}