nativescript-pdfbox
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

NativeScript PdfBox android

Build Status

Apache Pdfbox for NativeScript. This plugin allows you to extract the text from a PDF file.

Sample Android

The screenshot is based on the sample.pdf included in the demo project.

Based on:

The plugin is currently only avaiable for Android.

Installation

tns plugin add nativescript-pdfbox

Usage

import * as fs from 'tns-core-modules/file-system';
import { PdfBox } from 'nativescript-pdfbox';
 
const appPath = fs.knownFolders.currentApp().path;
const mySampleFile = appPath + '/sample.pdf';
const removeLineBreaks: boolean = true; // optional, default is false
 
const pdfbox: PdfBox = new PdfBox();
pdfbox
    .getText(mySampleFile, removeLineBreaks)
    .then(text => {
        this.messageNotRemovedLB = text;
        super.notifyPropertyChange('messageNotRemovedLB', text);
    });

License

Apache License Version 2.0, January 2004

Package Sidebar

Install

npm i nativescript-pdfbox

Weekly Downloads

0

Version

0.2.0

License

Apache-2.0

Last publish

Collaborators

  • svzi