我想将Xamarin.Android中URL上可用的pdf打开到MuPDFReaderView中。我能够获取字节数组,但无法正常工作。
感谢您的帮助。
下面是代码。
System.Net.WebClient wc = new System.Net.WebClient();
byte[] bytes = wc.DownloadData("https://meetappdev2.blob.core.windows.net/appl622/d5fde104-4569-475f-bb9d-c551ddc1c697.pdf");
var core = new MuPDFCore(this, bytes, "");
MuPDFReaderView mDocView = new MuPDFReaderView(this);
mDocView.SetAdapter(new MuPDFPageAdapter(this, null,core));
this.AddContentView(mDocView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent));