new
Crea un nuevo documento PDF.
pub fn new() -> Result<Self, PdfError>
Arguments
Returns
- Ok(Self) - if the operation succeeds
- Err(PdfError) - if the operation fails
Example
use asposepdf::Document;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Crear un nuevo PDF-documento
let pdf = Document::new()?;
// Guardar el PDF-documento previamente abierto con un nuevo nombre de archivo
pdf.save_as("sample_new.pdf")?;
Ok(())
}