Nitesh Kothari
Nitesh Kothari

Reputation: 888

Image file to PDF Conversion in Windows Phone Silverlight 8.1

I am writing Windows Phone 8.1 Silverlight app,

I have to convert Image File to PDF.

Is there any way, how to do it and which Libraries are available freely?

Thanks!!

Upvotes: 0

Views: 305

Answers (2)

Nitesh Kothari
Nitesh Kothari

Reputation: 888

Here is the answer, whoever wants it. Its working and tested.

I have added ComponentOne Library in Windows Phone 8.1 Project.

using C1.Phone.Pdf;
using C1.Phone.PdfViewer;

C1PdfDocument pdf = new C1PdfDocument(PaperKind.PrcEnvelopeNumber3Rotated);
pdf.Landscape = true;

var rc = new System.Windows.Rect(20,30,300,200);
pdf.DrawImage(wbitmp, rc);

var fillingName = "Test.pdf";
var gettingFile = IsolatedStorageFile.GetUserStoreForApplication();

using (var loadingFinalStream = gettingFile.CreateFile(fillingName))
{
   pdf.Save(loadingFinalStream);
}

Upvotes: 0

rtome
rtome

Reputation: 1993

There's a client site js library called jsPDF which is worth giving a try.

Upvotes: 0

Related Questions