embed_fonts

PDF-dosyaya yazı tiplerini gömer.

pub fn embed_fonts(&self) -> Result<(), PdfError>

Arguments

Returns

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

Example

use asposepdf::Document;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Dosya adıyla bir PDF-belgesi aç
    let pdf = Document::open("sample.pdf")?;

    // PDF-dosyaya yazı tiplerini gömer
    pdf.embed_fonts()?;

    // Daha önce açılmış PDF belgesini yeni dosya adıyla kaydet
    pdf.save_as("sample_embed_fonts.pdf")?;

    Ok(())
}