Welcome GuestLogin

PDFsharp and MigraDoc Wiki

RSS RSS

Navigation




Quick Search
»

PoweredBy

Visit the new Website for PDFsharp & MigraDoc Foundation 6.0 for .NET 6 and find information about the new version for Windows, Linux, and other platforms.

Search Engine

Here you can search through the pages of this Namespace, their attachments and the files uploaded to the system.
Note: the results will only display the items you have permissions to read.



Filter by Category

Select allNoneInvert










This search, performed through 421.52 KB (73 documents, 3477 words), completed in 0.0 seconds and yielded 30 results.

MigraDoc 1.30 Folders — 8.7%

[...] unfinished. Below you'll find the list of tasks that have to be done. We will provide information about MigraDoc 1.50 folders after the final version of PDFsharp 1.50 was released. Currently, PDFsharp 1.50 is still under construction and folders and samples will be rearranged for the final version. Folders of MigraDoc Foundation 1.30 [...]

MigraDoc Sample: Hello MigraDoc — 7.1%

^Up Next >> This sample shows various features of MigraDoc including table of contents, tables, bookmarks, text formatting and font styles, charts, ... PDF Output File See the PDF file created by this sample: output.pdf (133 kB) Source Code Listing The Main method: static void Main() { // Create a MigraDoc document Document document = Documents.CreateDocument(); //string ddl = MigraDoc.DocumentObjectModel.IO.DdlWriter.WriteToString(document); MigraDoc.DocumentObjectModel.IO.DdlWriter.WriteToFile(document, [...]

MigraDoc Articles — 5.9%

MigraDoc Foundation Articles MigraDoc First Steps explains the Hello World sample. MigraDoc 1.30 Folders explains the folders that come with the source code ZIP. MigraDoc Known Issues lists known issues of MigraDoc Foundation. MigraDoc DDL introduces the MigraDoc Document [...]

PDFsharp 1.30 Folders — 5.1%

[...] Below you'll find the list of tasks that have to be done. We will provide information about PDFsharp 1.50 folders after the final version of PDFsharp 1.50 was released. Currently, PDFsharp 1.50 is still under construction and folders and samples will be rearranged for the final version. Folders of PDFsharp 1.30 Brief description of the folders. [...]

MigraDoc Sample: Invoice — 5.1%

[...] how to create a simple invoice of a fictional book store. The invoice document is created with the MigraDoc document object model and then rendered to PDF with PDFsharp. PDF Output File See the PDF file created by this sample: output.pdf (104 kB) Screen Shots Here is a sample screen shot: Source Code Creating the Document Nothing special here: public Document CreateDocument() { // Create a new MigraDoc document this.document = new Document(); this.document.Info.Title = "A sample invoice"; this.document.Info.Subject = "Demonstrates [...]

MigraDoc Sample: Document Viewer — 4.3%

^Up Next >> Demonstrates all techniques you need to preview and print a MigraDoc document, and convert it to a PDF, RTF, or image file. Screen Shots Here is a sample screen shot: Source Code This sample uses the MigraDoc.Rendering.Forms.DocumentPreview class to create a preview window. The DocumentPreview object receives the document as an MigraDoc DDL string. You can obtain this DDL string from your Document object using the DdlWriter class. Initializing DocumentPreview Here's the constructor: [...]

PDFsharp Sample: Graphics — 4.1%

[...] XGraphics gfx = XGraphics.FromPdfPage(page); DrawTitle(page, gfx, "Lines & Curves"); DrawLine(gfx, 1); DrawLines(gfx, 2); DrawBezier(gfx, 3); DrawBeziers(gfx, 4); DrawCurve(gfx, 5); DrawArc(gfx, 6); } Draw simple lines void DrawLine(XGraphics gfx, int number) { BeginBox(gfx, number, "DrawLine"); gfx.DrawLine(XPens.DarkGreen, 0, 0, 250, 0); gfx.DrawLine(XPens.Gold, 15, 7, 230, 15); XPen pen = new XPen(XColors.Navy, 4); gfx.DrawLine(pen, 0, 20, 250, 20); pen = new XPen(XColors.Firebrick, 6); pen.DashStyle = XDashStyle.Dash; gfx.DrawLine(pen, [...]

MigraDoc Sample: Mix MigraDoc and PDFsharp — 3.8%

^Up Next >> This sample demonstrates how to mix MigraDoc and PDFsharp. PDF Output File See the PDF file created by this sample: output.pdf (134 kB) Screen Shots Here is a sample screen shot (showing page 2 with 6 pages from MigraDoc, scaled down to fit on one page): Source Code Creating the Document We create a PdfDocument , not a (MigraDoc) Document : static void Main() { DateTime now = DateTime.Now; string filename = "MixMigraDocAndPdfSharp.pdf"; filename = Guid.NewGuid().ToString("D").ToUpper() [...]

MigraDoc: Frequently Asked Questions — 3.8%

Questions and answers about MigraDoc. See also: PDFsharp FAQ About See the MigraDoc Overview for general information about MigraDoc. What is MigraDoc? MigraDoc is the .NET library for modeling and rendering documents. See the MigraDoc Overview for general information about MigraDoc. Can MigraDoc run on Web Servers under Medium Trust? Beginning with [...]

PDFsharp: Frequently Asked Questions — 3.6%

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 [...]

MigraDoc DDL (MDDDL) — 3.1%

MigraDoc DDL, the MigraDoc Document Description Language (MDDDL), is a text based serialization of a MigraDoc document. It is used to pass a document to the DocumentPreview class. It can also be used to persist a document in a file (using the DdlWriter and DdlReader classes). Such a DDL file can also be helpful if a document doesn't quite look as expected. Here's a code snippet that shows how to save a MDDDL file in Debug build only: #if DEBUG MigraDoc.DocumentObjectModel.IO.DdlWriter dw = new MigraDoc.DocumentObjectModel.IO.DdlWriter("HelloWorld.mdddl"); [...]

MigraDoc Samples — 2.5%

[...] only show snippets here). Desktop Samples Hello World is the obligatory Hello World program for MigraDoc documents. Hello MigraDoc shows various features of MigraDoc including table of contents, tables, bookmarks, text formatting and font styles, charts, ... Document Viewer demonstrates all techniques you need to preview and print a MigraDoc document, and convert it to a PDF, RTF, or image file. Images shows how to use images in MigraDoc [...]

PDFsharp Sample: Combine Documents — 2.5%

[...] XGraphics.FromPdfPage(page1); box = page1.MediaBox.ToXRect(); box.Inflate(0, -10); gfx.DrawString(String.Format("{0} • {1}", filename1, idx + 1), font, XBrushes.Red, box, format); gfx = XGraphics.FromPdfPage(page2); box = page2.MediaBox.ToXRect(); box.Inflate(0, -10); gfx.DrawString(String.Format("{0} • {1}", filename2, idx + 1), font, XBrushes.Red, box, format); } // Save the document... const string filename = "CompareDocument1_tempfile.pdf"; outputDocument.Save(filename); Variant2: Imports [...]

MigraDoc Sample: Hello World — 2.3%

^Up Next >> This sample is the obligatory Hello World program for MigraDoc documents. PDF Output File See the PDF file created by this sample: output.pdf (9 kB) Source Code Listing The Main method: static void Main(string[] args) { // Create a MigraDoc document Document document = CreateDocument(); document.UseCmykColor = true; // ===== Unicode encoding and font program embedding in MigraDoc is demonstrated here ===== // A flag indicating whether to create a Unicode PDF or a WinAnsi PDF [...]

MigraDoc: First Steps — 2.3%

Both PDFsharp and MigraDoc provide a lot of AddXxx functions. Typically these functions return the newly created objects. Once you’ve learned the basic principles it’s quite easy to work with. Intellisense helps a lot then. And the new help system that integrates with the Visual Studio online help will provide information about any class in PDFsharp and MigraDoc – simply by hitting F1. MigraDoc - Getting Started A good place to start is the Samples folder that comes with the source code. This wiki also shows [...]

MigraDoc: Spaces in MigraDoc Documents — 2.0%

[...] space is a space. But not all spaces are equal. And they do not always behave as you expect. Spaces in MigraDoc MigraDoc documents can persist in text files ( MigraDoc DDL (MDDDL) format ). To [...]

PDFsharp Articles — 2.0%

[...] drawing. Object Streams provides information about a PDF feature that PDFsharp versions prior to 1.50 did not support. Form Objects shows how to use the XForm class to efficiently draw items that appear more than once. PDFsharp 1.30 Folders explains the folders that come with the source code ZIP. PDFsharp Known Issues lists the known issues with respect to PDFsharp. XPS to PDF Conversion introduces the XPS to PDF Converter that comes with [...]

PDFsharp Sample: Annotations — 2.0%

[...] line."; textAnnot.Icon = PdfTextAnnotationIcon.Note; gfx.DrawString("The first text annotation", font, XBrushes.Black, 30, 50, XStringFormats.Default); // Convert rectangle from world space to page space. This is necessary because the annotation is // placed relative to the bottom left corner of the page with units measured in point. XRect rect = gfx.Transformer.WorldToDefaultPage(new XRect(new XPoint(30, 60), new XSize(30, 30))); textAnnot.Rectangle = new PdfRectangle(rect); // Add the annotation [...]

Main Page — 2.0%

[...] This Wiki provides you with information about these libraries. If you are unfamiliar with PDFsharp and MigraDoc, please visit these page: PDFsharp and MigraDoc Homepage PDFsharp and MigraDoc Overview introduces PDFsharp and MigraDoc and lets you decide which [...]

Using Private Fonts — 1.8%

[...] methods, but not all platforms support both methods. IFontResolver IFontResolver is new with PDFsharp 1.50. It cannot be used with the GDI build of PDFsharp. It cannot be used with the WPF build of PDFsharp if you want to use the DocumentPreview - fonts used with IFontResolver are not available in the preview. For all other platforms (Silverlight, Windows Phone) this is the method of choice. XPrivateFontCollection XPrivateFontCollection is no longer supported and not recommended (as of PDFsharp 1.50 beta 3b). It should work with GDI and WPF [...]

MigraDoc: PageSetup, Headers, Footers — 1.8%

The PageSetup of MigraDoc can be used in two modes, depending on how you print the document. Will you print on both sides? Imagine a document with a few pages, printed on both sides and bound decoder on the long edge. At first you see page 1. Flip the page over and you will see page 2 on the left and page 3 on the right. To get this, set "MirrorMargins" in MigraDoc to true. If you do this, "LeftMargin" will become the inner margin and "RightMargin" will be the outer margin. "LeftMargin" will be the left margin [...]

Working with NuGet Packages — 1.8%

With PDFsharp 1.50 beta we have started to make preview versions of compiled assemblies available via NuGet before releasing the complete source code with samples etc. With Visual Studio you can install the NuGet Package Manager to easily access NuGet packages. This work with VS 2012 Express and also with the Community Editions of VS 2013 and VS 2015. Just open Visual Studio and go to "Tools" => "Extensions and Updates..." to install the NuGet Package Manager if you do not have it yet. To add PDFsharp or PDFsharp and MigraDoc to a project, [...]

MigraDoc: Images from Memory — 1.8%

[...] on the local file system. Now we have a solution. How to use images that are not stored in a file? MigraDoc requires a filename to access images. So what can you do if you want to use images from application resources, databases, or streams? With PDFsharp 1.50 beta 2, a new feature was added: MigraDoc now accepts filenames that contain BASE64-encoded images with the prefix "base64:". In this case, the filename does not refer to a file, the filename contains all the bits of the bitmap in an ASCII string with [...]

Using MigraDoc without .NET via MDDDL — 1.8%

MigraDoc Through the Back Door MigraDoc documents can persist in MigraDoc DDL files . Those MDDDL files are text files. Any application that can write text files can also write MDDDL files. After creating the file, you just have to invoke an EXE file that uses MigraDoc to turn the MDDDL file into a PDF file (or RTF file). Sample MDDDL File Here is a simple MDDDL sample, displaying the text "Hello, World!": \document { \section { \paragraph { Hello, World! } } } You [...]

Supported Platforms and Technologies, Available Builds — 1.5%

The development of PDFsharp started with .NET 1.1. PDFsharp used the graphics functions of GDI+, a graphics library from Microsoft encapsulated in the System.Drawing namespace . The XGraphics class of PDFsharp has functions for drawing graphics and text very similar to the System.Drawing.Graphics class . The advantage of this approach is that PDFsharp was able to draw text and graphics not only in PDF documents, but on WinForms windows and printers too. This allows creating preview functionality in WinForms. See Preview sample . After Microsoft [...]

PDFsharp Sample: Booklet — 1.3%

[...] form.PixelHeight; int inputPages = form.PageCount; int sheets = inputPages / 4; if (sheets * 4 0) vacats -= 1; else { // Set page number (which is one-based) for left side form.PageNumber = allpages + 2 * (1 - idx); box = new XRect(0, 0, width / 2, height); // Draw the page identified by the page number like an image gfx.DrawImage(form, box); } // Set page number (which is one-based) for right side form.PageNumber = 2 * idx - 1; box = new XRect(width / 2, 0, width / 2, height); // Draw the page identified [...]

PDFsharp Web Sample: Clock — 1.3%

[...] RenderClock(XGraphics gfx) { // Clocks should always look happy on hardcopies... //this.time = new DateTime(2005, 1, 1, 11, 6, 22, 500); XColor strokeColor = XColors.DarkBlue; XColor fillColor = XColors.DarkOrange; XPen pen = new XPen(strokeColor, 5); XBrush brush = new XSolidBrush(fillColor); strokeColor.A = 0.8; fillColor.A = 0.8; XPen handPen = new XPen(strokeColor, 5); XBrush handBrush = new XSolidBrush(fillColor); DrawText(gfx, pen, brush); double width = gfx.PageSize.Width; double height = gfx.PageSize.Height; gfx.TranslateTransform(width [...]

System Requirements — 1.3%

[...] requires .NET Framework 3. We strongly recommend installing .NET Framework 3.5 with at least Service Pack 1. PDFsharp no longer supports the .NET Framework [...]

MigraDoc Sample: Images — 1.3%

^Up Next >> This sample shows how to use images in MigraDoc documents. PDF Output File See the PDF file created by this sample: output.pdf (19 kB) Screen Shots Here is a sample screen shot: Source Code This snippet shows how to add an image to a MigraDoc document: /// /// Creates an absolutely minimalistic document. /// static Document [...]

MigraDoc: Known Issues — 1.0%

Table Rendering Table rendering is was very slow if tables are long. As of version 1.50 beta 2, table rendering is much faster (1.50 [...]



Visit the new Website for PDFsharp & MigraDoc Foundation 6.0 for .NET 6 and find information about the new version for Windows, Linux, and other platforms.



Miscellaneous
Home
PDFsharp
FAQ
Samples
Articles
MigraDoc
FAQ
Samples
Articles

ScrewTurn Wiki version 3.0.5.600. Some of the icons created by FamFamFam.

Impressum - Privacy Policy, Data Protection Declaration, Legal Notice