This repository contains a Blazor Server application demonstrating how to generate PDF documents using the PDFsharp library. It showcases basic PDF creation, including drawing text and graphics, and offers a user interface for downloading the generated PDF.
Check out the accompanying blog post.
- Basic PDF generation with PDFsharp.
- Drawing lines, shapes, and text in a PDF.
- Implementing a download function in a Blazor Server application.
- Example of JavaScript interop in Blazor.
- .NET 7.0 SDK or later
- Visual Studio 2022 or a compatible IDE
- Clone the repository:
git clone https://github.com/PSPDFKit-labs/pdf-generation-blazor.git
- Navigate to the project directory:
cd pdf-generation-blazor
- Restore the project dependencies:
dotnet restore
- Run the application:
dotnet run
After running the application, navigate to https://localhost:5036 (or the appropriate URL). Click the 'Download PDF' button to generate and download a sample PDF.
Contributions to this project are welcome! Please feel free to fork the repository and submit pull requests. Please ensure you have signed our CLA so that we can accept your contributions.