Questions tagged [android-pdf-api]

Android APIs for manipulation of PDF content.

Android APIs for manipulation of PDF content.

Reference: https://developer.android.com/reference/android/graphics/pdf/package-summary.html

50 questions
0
votes
1 answer

Android Bitmap from View to PDF A4

Hi I am trying to create an A4 PDF from a view, following this resource . I have been able to successfully create the pdf but it is cutting the bottom of my view off. I have made several adjustments to the view size and adjusted all the measure…
958
  • 178
  • 1
  • 9
0
votes
2 answers

How to open pdf files in webview in pdfactivity?

Hello I'm developing app to open pdf files in webview in pdfactivity. I tried opening through intent its redirecting to system inbuilt apps but not pdfactivity.java. find the code below, I declared this in my webview activity, private class…
0
votes
1 answer

Android Failed to Show PDF using AssetManager

I want to open a PDF from the assets folder from my activity button action and I used the below codes but nothing happens. public class AssetsProvider extends ContentProvider { @Override public AssetFileDescriptor openAssetFile(Uri uri,…
0
votes
1 answer

Is it important to close PdfRenderer and when

I am using PdfRenderer in my app. In this app a user can open a PDF file and browse it. He can open another PDF file in the same session. I just noticed, that I don't close it at all after use or before opening a new PDF. I just do the…
mspnr
  • 416
  • 4
  • 12
0
votes
1 answer

Android: PDF created using PrintedPdfDocument looks different on different devices

I am trying to render a view to a PrintedPdfDocument. The size of the page, as expected, is in units 1/72nd of an inch. So, for an A0 size page (width = 33.11 in), document.getPageWidth() returns 2384 (33.11 * 72). The page canvas width equates one…
0
votes
0 answers

Android Oreo 8.0 Native C++ crash , but works fine for Android 7

I am working on an app (pdf viewer) using muPdf library , it's working fine for Android 7 (pdf pages and previews are shown without problems) , but it keeps crashing when i test it on emulator or real device with Android 8. 2019-01-22…
0
votes
1 answer

MuPDF error when changing device orientation

I use MuPDF library to view PDF on android application , it's ok when viewing the pdf on portrait pode , but once change the orientation to landscape the app crash. --------- beginning of crash 2019-01-14…
0
votes
1 answer

How do I draw to a PDF page using PdfDocument?

One of my Android Studio activities has a diagram, which I want the user to be able to export to a PDF file. I'm trying to use the built-in PdfDocument, but finding it difficult to find much information online (apart from the official docs). I can…
Sharon
  • 3,471
  • 13
  • 60
  • 93
0
votes
1 answer

How to add photos taken from camera to a document template in android studio

I am very new to android and I need to make an app which basically should add photos taken via the app camera to a template which contains header, some text, three images and its description. I have no idea how to start this project. Can someone…
0
votes
2 answers

Android spooler crashes with SIGSEV while printing pdf with a page range

When I try to print a 16-page PDF document with only certain pages selected (i.e. page range) the spooler crashes due to a SIGSEV (please see the dump below). The same crash also happens when I try to 'print' to PDF. Printing all pages of the…
bdristan
  • 1,048
  • 1
  • 12
  • 36
0
votes
0 answers

Create Password Protected File in Android

I have to create a PDF, which will be downloaded from server and while saving in local memory or say SD Card, I have to create a password protected PDF File here, so what process should I follow here. Please help me, need your guidance. Any help…
abissa
  • 163
  • 1
  • 10
0
votes
1 answer

Coordinates and clipping on Android PdfDocument

I have been happily producing a PDF document in the Android PDF class PdfDocument. After puzzling over the "subtle" documentation I divined that the coordinate system was in PostScript (1/72") private static final int A4_WIDTH = 595; private static…
Ian Spencer
  • 546
  • 3
  • 8
0
votes
0 answers

Android - PdfDocument not working properly in Marshmallow with custom typefaces

I have this method to generate a PDF from the current activity: public boolean convertToPDF(String pdfFileName) { PdfDocument document = new PdfDocument(); View content = GraphActivity.rl_main; int pageNumber = 1; …
0
votes
1 answer

Webview to display pdf file in offline mode

Using webview the following code will execute fine on online and it will display the PDF file. After that if i goes to offline it will not display the cached pdf file. mWebview.getSettings().setJavaScriptEnabled(true); String…
krish
  • 213
  • 1
  • 10
0
votes
1 answer

PDF Rendering issue in Android

I am using https://github.com/JoanZapata/android-pdfview to render PDFs in android. It shows pdf file with grey box, how can I fix this ? please click the attached link to see image Are there any free pdf rendering library for android? Thanks PDF…
Jackliu7
  • 11
  • 1