New to Telerik Document ProcessingStart a free 30-day trial

Create Pdf from Image

Updated on Feb 19, 2026
Product VersionProductAuthor
2022.2.613RadPdfProcessingDimitar Karamfilov

Description

The example is showing how to create a PDF file by using an image.

Solution

In this example you will create a brand new PDF document, add a page to it, and draw the image using the FixedContentEditor.

csharp

	// If you are working in a .NET Core application, you will need to also provide an image resolver. You can use the default implementation provided in Telerik.Documents.ImageUtils:
	// Telerik.Documents.ImageUtils.ImagePropertiesResolver defaultImagePropertiesResolver = new Telerik.Documents.ImageUtils.ImagePropertiesResolver();
	// Telerik.Windows.Documents.Extensibility.FixedExtensibilityManager.ImagePropertiesResolver = defaultImagePropertiesResolver;

    var doc = new RadFixedDocument();
    var page = doc.Pages.AddPage();
    var editor = new FixedContentEditor(page);

    using (FileStream fs = new FileStream(@"..\..\telerik_logo.jpg", FileMode.Open))
    {
        editor.DrawImage(fs);
    }

    var provider = new PdfFormatProvider();
    File.WriteAllBytes(@"result.pdf", provider.Export(doc));

See Also

In this article
DescriptionSolutionSee Also
Not finding the help you need?
Contact Support