
_Lisansı dosya adıyla ayarlar._

```rust
pub fn set_license(&self, filename: &str) -> Result<(), PdfError>
```

**Arguments**
  * **filename** - the path to the license-file

**Returns**
  * **Ok(())** - if the operation succeeds
  * **Err(PdfError)** - if the operation fails

**Example**

```rust
use asposepdf::Document;

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

    // Dosya adıyla lisansı ayarla
    pdf.set_license("Aspose.PDF.RustViaCPP.lic")?;

    // Artık lisanslı PDF belgesiyle çalışabilirsiniz
    // ...

    Ok(())
}

```