在 Silverlight 中将独立的 PDF 文件转换为 HEX 字符串 Windows Phone 8.1

Convert Isolated PDF File to HEX String in Silverlight Windows Phone 8.1

我正在尝试将带有图像的 PDF 文件转换为 HEX 字符串,但不知道该怎么做。

查看下面我的代码:

C1PdfDocument pdf = new C1PdfDocument(PaperKind.A4);
pdf.Landscape = true;
var rc = new System.Windows.Rect();
pdf.DrawImage(wbitmp, rc);
var fillingName = txtTitle.Text + ".pdf";
var gettingFile = IsolatedStorageFile.GetUserStoreForApplication();

using (var loadingFinalStream = gettingFile.CreateFile(fillingName))
{
   pdf.Save(loadingFinalStream);
}
StorageFolder sFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
StorageFile sFile = await sFolder.GetFileAsync("PDF.pdf");
var sFileOut = await sFile.OpenReadAsync();
Stream sFileOutStream = sFileOut.AsStream();
MemoryStream ms = new MemoryStream();
await sFileOutStream.CopyToAsync(ms);
byte[] sFileOutStreamByte = ms.ToArray();
string hexString = BitConverter.ToString(sFileOutStreamByte);

希望这对您有所帮助...;-)