- Home
- Testimonials
- Purchase
- Developer Tools
- Desktop Utilities
- Download
- Support
- Blog
- Company
The PDF SDK for .NET product has been acquired by Sybrex company in January, 2011 and not available on our web-site anymore.
NEW: Check our new rich PDF reports generator for Javascript (completely client side generation): PDF Generator SDK for Javascript: click here to read more details...
For 3rd party server side C# open-source PDF generation library?
Check the blog article: .NET Bear, Do You Know Any Free PDF Generation Libraries For Use In Commercial Applications?
Our commercial products for PDF format:
PDF Extractor SDK - extract tables, text, structured data from PDF files in your apps
PDF Renderer SDK - render PDF files to PNG, BMP, TIFF images in your apps
PDF To HTML SDK - convert PDF to HTML with images and formatting preserved
How to convert EMF into PDF in .NET applications using Bytescout.PDF library for .NET
Converting EMF into PDF document
This example demonstrates how to convert EMF into PDF using Bytescout.PDF library
IMPORTANT: for more advanced EMF to PDF conversion support (including enhanced support for EMF produced by virtual printers etc) please see PDFDoc Scout ActiveX library instead. Registered users of Bytescout.PDF can get 50% off for PDFDoc Scout ActiveX

Download example source code: bytescoutpdf_metafile_emf_to_pdf.zip (10 KB)
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using Bytescout.PDF;
using System.Drawing.Imaging;
namespace MetafileSample
{
class Program
{
static void Main(string[] args)
{
// Create main PDF Doc Engine
PDFDocEngine engine = new PDFDocEngine("demo", "demo");
// Add new document
Document document = engine.AddDocument();
// create and load metafile
Metafile mf = new Metafile("SampleMetafile.emf");
// Append new page to the document
Page page = document.AddPage(PageSizeType.A3, PageOrientationType.LandScape);
// Create new drawing
Drawing drawing = page.AddDrawing();
// Show images
drawing.PlayMetaFile(mf.GetHenhmetafile(), 0, 0, 1, 1);
// Closing drawing on the page
drawing.Close();
// Save document
document.Save("Metafile.pdf");
// open generated PDF document in default PDF viewer installed in Windows
Process.Start("Metafile.pdf");
}
}
}
Download example source code: bytescoutpdf_metafile_emf_to_pdf.zip (10 KB)
Filed in:
PDF SDK for .NET
Tutorials:


