FAQ - Frequently asked questions
Version 6.2.0
Questions and answers concerning both PDFsharp and MigraDoc.
In this article
- What is the license of PDFsharp and MigraDoc?
- Are PDFsharp or MigraDoc based on or do they require other libraries or tools?
- What are the support cycles for PDFsharp/MigraDoc versions?
- Save PDF to MemoryStream? Save PDF to byte array?
- Can PDFsharp and/or MigraDoc run on Web Servers?
About
See the Overview for general information about PDFsharp and MigraDoc.
See also:
PDFsharp FAQ
MigraDoc FAQ
What is the license of PDFsharp and MigraDoc?
PDFsharp is open-source software. You can copy, modify, and integrate the source code of PDFsharp in your application without restrictions at all.
If you want professional support, please visit the Support Page or contact us.
See also:
License for PDFsharp and MigraDoc
License FAQ
Are PDFsharp or MigraDoc based on or do they require other libraries or tools?
PDFsharp is newly designed and built from scratch in C#. Neither Adobe’s PDF Library nor Acrobat are required.
MigraDoc is also built from scratch.
What are the support cycles for PDFsharp/MigraDoc versions?
Generally we only support the latest released version. If the latest released version is a preview, we will publish bug fixes for severe bugs of the latest stable version.
So it is recommended practice to use the latest stable version for production code and also test early with new Preview versions.
Testing the Preview versions of PDFsharp/MigraDoc helps to make better stable versions right from the start without requiring bug fixes.
Save PDF to MemoryStream? Save PDF to byte array?
Is is easy to save a PDF document to a stream as the Save method of the PdfDocument class can take a stream.
This code snippet shows how to get a byte[] from a PdfDocument.
MemoryStream stream = new MemoryStream();
document.Save(stream, false);
byte[] bytes = stream.ToArray();
Can PDFsharp and/or MigraDoc run on Web Servers?
Yes.
The Core build can be used on any OS supported by .NET. Any fonts must be supplied by a FontResolver.
The GDI and WPF builds can only run on Windows servers. Note that virtualized servers may prevent access to the Windows fonts folder, so maybe you can only use fonts supplied by a custom font resolver.