public DecodingAsyncTask(DocumentSource docSource, string password, int[] userPages, PdfView pdfView,
                          PdfiumCore pdfiumCore)
 {
     this.docSource  = docSource;
     this.userPages  = userPages;
     this.cancelled  = false;
     this.pdfView    = pdfView;
     this.password   = password;
     this.pdfiumCore = pdfiumCore;
     token           = tokenSource.Token;
 }
Exemplo n.º 2
0
 public PdfFile(PdfiumCore pdfiumCore, PdfDocument pdfDocument, FitPolicy pageFitPolicy, Size viewSize,
                int[] originalUserPages,
                bool isVertical, int spacing, bool autoSpacing)
 {
     this.pdfiumCore        = pdfiumCore;
     this.pdfDocument       = pdfDocument;
     this.pageFitPolicy     = pageFitPolicy;
     this.originalUserPages = originalUserPages;
     this.isVertical        = isVertical;
     this.spacingPx         = spacing;
     this.autoSpacing       = autoSpacing;
     Setup(viewSize);
 }
        public PdfView(Context context, IAttributeSet attrs) : base(context, attrs)
        {
            renderingHandlerThread = new HandlerThread("PDF renderer");

            if (IsInEditMode)
            {
                return;
            }

            CacheManager     = new CacheManager();
            animationManager = new AnimationManager(this);
            dragPinchManager = new DragPinchManager(this, animationManager);
            PagesLoader      = new PagesLoader(this);
            paint            = new Paint();
            debugPaint       = new Paint();
            debugPaint.SetStyle(Paint.Style.Stroke);

            pdfiumCore = new PdfiumCore(context);
            SetWillNotDraw(false);
        }
 public override PdfDocument CreateDocument(Context context, PdfiumCore core, string password)
 {
     return(core.NewDocument(ParcelFileDescriptor.Open(FileUtils.FileFromAssetAsync(context, assetName),
                                                       ParcelFileMode.ReadOnly)));
 }
 public override PdfDocument CreateDocument(Context context, PdfiumCore core, string password)
 {
     return(core.NewDocument(context.ContentResolver.OpenFileDescriptor(uri, "r"), password));
 }
 public abstract PdfDocument CreateDocument(Context context, PdfiumCore core, string password);
Exemplo n.º 7
0
 public override PdfDocument CreateDocument(Context context, PdfiumCore core, string password)
 {
     return(core.NewDocument(ParcelFileDescriptor.Open(file, ParcelFileMode.ReadOnly), password));
 }
 public override PdfDocument CreateDocument(Context context, PdfiumCore core, string password)
 {
     return(core.NewDocument(data, password));
 }
 public override PdfDocument CreateDocument(Context context, PdfiumCore core, string password)
 {
     return(core.NewDocument(Util.Util.ToByteArray(inputStream), password));
 }