protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.pdfView); resourcePdf = Intent.Extras.GetString("src"); pdfView = FindViewById <PDFView>(Resource.Id.pdfView); pdfView.FromAsset(resourcePdf).Load(); }
private void LoadDocument() { PDFView.FromAsset(PDFPath) .DefaultPage(1) .OnPageChange(this) .EnableDoubletap(true) .EnableSwipe(true) .ShowMinimap(false) .Load(); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.softdevelope); var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar); PdfSD = FindViewById <PDFView>(Resource.Id.PdfSD); PdfSD.FromAsset("Test.pdf").Load(); SetActionBar(toolbar); ActionBar.Title = "អភិវឌ្ឈន៍កម្មវិធី"; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Norton); var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar); PdfNU = FindViewById <PDFView>(Resource.Id.PdfNU); PdfNU.FromAsset("Test.pdf").Load(); SetActionBar(toolbar); ActionBar.Title = "សាកលវិទ្យាល័យន័រតុន"; }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.Inflate(Resource.Layout.localDocuments_fragment, container, false); if (!string.IsNullOrEmpty(fileName)) { pdfView = view.FindViewById <PDFView>(Resource.Id.pdfView); pdfView.FromAsset(fileName).DefaultPage(10).SwipeVertical(true).EnableDoubletap(true).Load(); } return(view); }
protected override void OnElementChanged(ElementChangedEventArgs <SamplePDFView> e) { var layout = Inflate(Context, Resource.Layout.PDFLayout, null); if (pdfView == null) { uiLayout = layout as Android.Widget.RelativeLayout; } pdfView = uiLayout.FindViewById <PDFView>(Resource.Id.pdfView); pdfView.FromAsset("sample.pdf").Load(); SetNativeControl(uiLayout); }
private void DisplayFromAsset(string assetFileName) { pdfFileName = assetFileName; pdfView.FromAsset(SAMPLE_FILE) .DefaultPage(pageNumber) .OnPageChange(this) .EnableAnnotationRendering(true) .OnLoad(this) .ScrollHandle(new DefaultScrollHandle(this)) .Spacing(10) // in dp .OnPageError(this) //.pageFitPolicy(FitPolicy.BOTH) .Load(); }