Java Code Examples for com.shockwave.pdfium.PdfiumCore#newDocument()

The following examples show how to use com.shockwave.pdfium.PdfiumCore#newDocument() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UriSource.java    From AndroidPdfViewerV2 with Apache License 2.0 4 votes vote down vote up
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
    ParcelFileDescriptor pfd = context.getContentResolver().openFileDescriptor(uri, "r");
    return core.newDocument(pfd, password);
}
 
Example 2
Source File: InputStreamSource.java    From AndroidPdfViewerV2 with Apache License 2.0 4 votes vote down vote up
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
    return core.newDocument(Util.toByteArray(inputStream), password);
}
 
Example 3
Source File: AssetSource.java    From AndroidPdfViewerV2 with Apache License 2.0 4 votes vote down vote up
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
    File f = FileUtils.fileFromAsset(context, assetName);
    ParcelFileDescriptor pfd = ParcelFileDescriptor.open(f, ParcelFileDescriptor.MODE_READ_ONLY);
    return core.newDocument(pfd, password);
}
 
Example 4
Source File: ByteArraySource.java    From AndroidPdfViewerV2 with Apache License 2.0 4 votes vote down vote up
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
    return core.newDocument(data, password);
}
 
Example 5
Source File: FileSource.java    From AndroidPdfViewerV2 with Apache License 2.0 4 votes vote down vote up
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
    ParcelFileDescriptor pfd = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);
    return core.newDocument(pfd, password);
}
 
Example 6
Source File: UriSource.java    From AndroidPdfViewerV1 with Apache License 2.0 4 votes vote down vote up
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
    ParcelFileDescriptor pfd = context.getContentResolver().openFileDescriptor(uri, "r");
    return core.newDocument(pfd, password);
}
 
Example 7
Source File: InputStreamSource.java    From AndroidPdfViewerV1 with Apache License 2.0 4 votes vote down vote up
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
    return core.newDocument(Util.toByteArray(inputStream), password);
}
 
Example 8
Source File: AssetSource.java    From AndroidPdfViewerV1 with Apache License 2.0 4 votes vote down vote up
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
    File f = FileUtils.fileFromAsset(context, assetName);
    ParcelFileDescriptor pfd = ParcelFileDescriptor.open(f, ParcelFileDescriptor.MODE_READ_ONLY);
    return core.newDocument(pfd, password);
}
 
Example 9
Source File: ByteArraySource.java    From AndroidPdfViewerV1 with Apache License 2.0 4 votes vote down vote up
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
    return core.newDocument(data, password);
}
 
Example 10
Source File: FileSource.java    From AndroidPdfViewerV1 with Apache License 2.0 4 votes vote down vote up
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
    ParcelFileDescriptor pfd = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);
    return core.newDocument(pfd, password);
}
 
Example 11
Source File: UriSource.java    From AndroidPdfViewer with Apache License 2.0 4 votes vote down vote up
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
    ParcelFileDescriptor pfd = context.getContentResolver().openFileDescriptor(uri, "r");
    return core.newDocument(pfd, password);
}
 
Example 12
Source File: InputStreamSource.java    From AndroidPdfViewer with Apache License 2.0 4 votes vote down vote up
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
    return core.newDocument(Util.toByteArray(inputStream), password);
}
 
Example 13
Source File: AssetSource.java    From AndroidPdfViewer with Apache License 2.0 4 votes vote down vote up
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
    File f = FileUtils.fileFromAsset(context, assetName);
    ParcelFileDescriptor pfd = ParcelFileDescriptor.open(f, ParcelFileDescriptor.MODE_READ_ONLY);
    return core.newDocument(pfd, password);
}
 
Example 14
Source File: ByteArraySource.java    From AndroidPdfViewer with Apache License 2.0 4 votes vote down vote up
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
    return core.newDocument(data, password);
}
 
Example 15
Source File: FileSource.java    From AndroidPdfViewer with Apache License 2.0 4 votes vote down vote up
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
    ParcelFileDescriptor pfd = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);
    return core.newDocument(pfd, password);
}