Skip to content

Introduction to UnoPdf

As developers, we often face the challenge of integrating PDF functionalities into our web applications. UnoPdf is designed to make this process straightforward and efficient, both for frontend and backend development.

Frontend Development with UnoPdf

For frontend developers, UnoPdf offers a comprehensive suite of web components, enabling the addition of PDF interactions directly within the web user interface. This flexibility is crucial for creating dynamic and responsive applications. UnoPdf is versatile, supporting a variety of frameworks including Vue, React, and vanilla JavaScript. This means that regardless of your preferred development environment, UnoPdf can seamlessly integrate into your project.

Furthermore, UnoPdf allows for programmatic access to PDF documents. This capability is not just about viewing PDFs; it's about manipulating them, enriching them with interactive elements, and integrating them into the core of your application's user experience.

Here is a minimal example in React:

tsx
function App() {
    const [formData, setFormData] = useState<Record<string, string>>({});
    
    const onLoaded = async ({ target }: PdfDocumentCustomEvent<string | null>) => {
        setFormData(await target.getFormData());
    };

    const onFormDataChanged = async ({ target }: PdfDocumentCustomEvent<unknown>) => {
        setFormData(await target.getFormData());
    };

    return (
        <>
            <PdfApplication />
            <PdfUploader />
            <PdfDocument   
                onLoaded={onLoaded}
                onFormdatachanged={onFormDataChanged}
            />
            <PdfPages pageMode={PageMode.Multi} />
        </>
    );
}

Backend Development with UnoPdf

On the backend side, UnoPdf's RESTful API is a powerful tool for creating, editing, reading, and saving PDF documents. Its RESTful nature ensures compatibility with a wide range of development frameworks and languages, such as Java, .NET, Python, Node.js, and Ruby. This flexibility opens up numerous possibilities for backend integration, allowing for the handling of PDFs in a way that aligns with your existing architecture and coding practices.

Building Rich Integrations

With UnoPdf, we, as developers, can build rich integrations of PDF documents into our web applications. The API provides access to the PDF's object model, encompassing elements like pages, fields, layers, links, tags, and widgets. Notably, UnoPdf can render PDF documents accurately to HTML, CSS, and SVG. This capability is essential for displaying and manipulating PDFs within web applications without relying on additional rendering software or making concessions in rendering quality.

Enabling Organizational Workflows

UnoPdf enables us to create user or customer-centered workflows involving PDFs. Whether it's displaying detailed PDFs with intricate drawings or diagrams, crafting fill-out forms, or building approval and signing workflows, UnoPdf allows users to fully interact with and annotate documents within our web applications. This functionality is particularly valuable for organizations that rely heavily on document-centric processes and seek to enhance their digital interaction capabilities.

Next steps