Pdfsharp Pdf To Image

Shows how to deal with PDF objects that are not (yet) covered by specialized PDFsharp classes (as an example it adds an OpenAction to an existing PDF file) XForms: shows how to create an XForm object from scratch. You can think of such an object as a template, that, once created, can be drawn frequently anywhere in your PDF document. I am trying to convert multiple images to pdf using pdfsharp library. I am able to convert single image and it works pretty well. And while converting bulk images to single pdf I am facing problem that it takes all the images and converts them but after conversion If I check it shows me only the last image as it is not appending to the existing image and it overwrites the previous image. Hey guys I have this C# code to convert any image file to.pdf using pdfsharp.dll. But I want to select multiple images for conversion please help. Here's my code (plz note.

Active3 years, 6 months ago

I've researched quite a bit but most answers I've found involve using iText which is only free for authors of open source software.

My question is how to utilise a free (preferably well maintained) PDF library to convert an image into PDF. More specifically I'm using Selenium to test a webpage and part of the requirements are for a screenshot of a results page to be saved in PDF format.

What I have at the moment:

Braiam
3,6569 gold badges36 silver badges66 bronze badges
Ory ZaidenvormOry Zaidenvorm

closed as off-topic by sujith karivelil, Carbine, usr2564301, Kevin Guan, BraiamMar 23 '16 at 13:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • 'Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.' – sujith karivelil, Carbine, usr2564301, Kevin Guan, Braiam
PdfsharpIf this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

Pdfsharp

I've come up with a way to do this using PDFSharp, hopefully will be useful for others as well.

The new class:

Ory ZaidenvormOry Zaidenvorm

Pdf To Image Using Pdfsharp

Pdfsharp Pdf To Image

A quick and easy way is to build an HTML file and embed the images as base64 data. It would be more portable than a PDF and can be easily printed as PDF.

An example :

Florent B.Florent B.

Pdfsharp Add Image

30.2k4 gold badges42 silver badges72 bronze badges

Not the answer you're looking for? Browse other questions tagged c#pdf or ask your own question.