PDFsharp: Frequently Asked Questions

Modified on 2009/11/17 16:26 by Thomas Hövel — Categorized as: FAQ, PDFsharp FAQ

Questions and answers about PDFsharp

See also: MigraDoc FAQs


Questions and answers about PDFsharp

What is PDFsharp

PDFsharp is a .NET library for creating and modifying Adobe PDF documents programmatically. It is written in C# and can be used from any .NET language like VB.NET.

Is PDFsharp based on or does it require other libraries or tools?

PDFsharp is newly designed and built from scratch in C#. Neither Adobe's PDF Library nor Acrobat are required.

What is the license of PDFsharp?

PDFsharp is Open Source. 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: PDFsharp License

Can PDFsharp show PDF files? Print PDF files? Create images from PDF files?

PDFsharp comes with a preview control designed to visualize drawing operations of the XGraphics object, but it cannot render PDF files.

Further the DrawImage function can be used to draw so called form XObjects in PDF pages. If you try to render such an object in the preview, only the bounding box is drawn to show that it cannot be rendered.

The PDFsharp Samples show how to invoke Adobe Reader or Acrobat to view or print PDF files and how to invoke GhostScript to create images from PDF pages.

Can I use PostScript fonts with PDFsharp?

PDFsharp cannot work with PostScript fonts. Only TrueType fonts and OpenType fonts with TrueType outlines can be used with PDFsharp. Read more...

Can PDFsharp run on Web Servers under Medium Trust?

Not yet with PDFsharp 1.30. Most Medium Trust problems are solved by now and we are looking forward to have support for Medium Trust very soon.

Does PDFsharp support for Arabic, Hebrew, CJK (Chinese, Japanese, Korean)?

Not yet with PDFsharp 1.30. Right-to-left languages are not yet supported. Only simple languages like English or German are supported, with an easy one-to-one relationship between characters and glyphs.

Which PDF versions are supported by PDFsharp?

With PDFsharp you can create files with PDF versions from 1.2 (Adobe Acrobat Reader 3.0) through 1.7 (Adobe Reader 8.0).
PDFsharp fully supports PDF 1.4 (Adobe Reader 5.0) including the transparency features introduced with this version.
Some features of PDF 1.5 (Adobe Reader 6.0) are not yet implemented. Therefore PDFsharp cannot yet open all files marked for PDF 1.5 or higher (but that's on our Roadmap).

Does PDFsharp support PDF/A?

Not yet with PDFsharp 1.30.

Does PDFsharp support AcroForms?

There is limited support for AcroForms included with PDFsharp 1.30.

Can I use PDFsharp to convert HTML or RTF to PDF?

No, and we do not plan to write such a converter in the near future.

Can I use PDFsharp to convert PDF to Word, RTF, HTML?

No, and we do not plan to write such a converter in the near future.

Can I use PDF files created with SQL Server 2008 Reporting Services?

There is an issue with the PDFs created by SQL Server 2008 Reporting Services. We are working on it.
As a workaround, create reports with SQL Server 2005 Reporting Services. Workaround for SQL Server 2008 Reporting Services: For the DeviceSettings parameter for the Render method on the ReportExecutionService object, pass this value:
theDeviceSettings = "True";
This disables PDF file compression for SSRS 2008. Then, PDFSharp is able to handle the resulting uncompressed PDF file. (Note: SSRS 2005 ignores this setting so it can be passed to both SSRS versions.) (Tip from ballinator, posted on our forum.

Can I use PDFsharp to extract text from PDF?

This can be done at a low level. You can get at the characters in the order they are drawn - and most applications draw them from top-left to bottom-right. There are no high-level functions that return words, paragraphs, or whole pages.

Can PDFsharp simulate Bold or Italics?

Not yet with PDFsharp 1.30. Style simulation is on our Roadmap.