Reputation: 888
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
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