简体   繁体   English

如何将字节转换为Xamarin格式的PDF

[英]How to convert byte to PDF in xamarin forms

I received data from web services as byte I catch them in this property 我从网络服务接收到数据,因为我在该属性中将它们捕获为字节

   public byte[] Content { get; set; }

I have a web view to display the content of that byte. 我有一个Web视图来显示该字节的内容。 How to do this 这个怎么做

is it need to convert to pdf or can these content directly called by the webview 是否需要转换为pdf或webview可以直接调用这些内容?

string myFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "myFile.pdf");
System.IO.File.WriteAllBytes(myFilePath, Content);

Then like @Jason suggested, you can pass the myFilePath to your webview 然后像@Jason建议的那样,您可以将myFilePath传递到myFilePath

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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