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.
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:
Braiamclosed 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
2 Answers
I've come up with a way to do this using PDFSharp, hopefully will be useful for others as well.
The new class:
Pdf To Image Using Pdfsharp
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.