简体   繁体   中英

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!!

有一个名为jsPDF的客户端站点js库,值得尝试。

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);
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM