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();
        }
Exemplo n.º 2
0
 private void LoadDocument()
 {
     PDFView.FromAsset(PDFPath)
     .DefaultPage(1)
     .OnPageChange(this)
     .EnableDoubletap(true)
     .EnableSwipe(true)
     .ShowMinimap(false)
     .Load();
 }
Exemplo n.º 3
0
        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 = "អភិវឌ្ឈន៍កម្មវិធី";
        }
Exemplo n.º 4
0
        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 = "សាកលវិទ្យាល័យន័រតុន";
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 7
0
        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();
        }