Skip to main content facebooktwittermenuarrow-up

Convert Image to PDF - Community / GemBox.Pdf Feature Request - GemBox Support Center

3

Convert Image to PDF Completed

It would be nice to be able to convert images to PDF. eg. for the purpose of compiling scanned documents. some may be image, some may be pdf.

Official response

Mario at GemBox

Hi,

We have added support for OCR (optical character recognition), it is available in the latest versions of GemBox.Pdf.

Regards,
Mario

Comment (1)

Mario at GemBox
Hi,

As a side note, this task can already be accomplished with GemBox.Document.
For example, like the following:


var document = new DocumentModel();
var picture = new Picture(document, "input.png");
document.Sections.Add(new Section(document, new Paragraph(document, picture)));

var pageSetup = document.Sections[0].PageSetup;
pageSetup.PageWidth = picture.Layout.Size.Width;
pageSetup.PageHeight = picture.Layout.Size.Height;

var pageMargins = pageSetup.PageMargins;
pageMargins.Left = pageMargins.Right = pageMargins.Top = pageMargins.Bottom = 0;

document.Save("output.pdf");


Regards,
Mario