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
1
vote
3 answers

Google's PDF embed doesn't work on Android webview, any alternatives?

I would like to show a PDF in an application embedded in a WebView. It works fine until I would like to use get parameters in the URL. So for example this works…
Adam Varhegyi
  • 11,307
  • 33
  • 124
  • 222
1
vote
0 answers

Android EditText.drawToBitmap() Shows No Text

I'm trying to convert a layout to a PDF. It is full of views from a simple TextView to custom views. Everything works just fine except for the EditText. I see the underline for the EditText but no value. One attempt is to draw the view directly to a…
1
vote
0 answers

PDFDocument - multiple pages

I am using the PDFDocument class to convert RelativeLayout which gets populated at runtime to PDF. I know how to do this for 1 page of PDF, however, if at runtime, the RelativeLayout has no of pages > 1, then I do not know how to do this. I think I…
1
vote
1 answer

How to get tff font file from Font folder in android

i am creating a pdf file in android in which different languages are there. i am having notoserifdevanagaribold.tff in my font folder under res directory but i am not able to access it in a string variable. i am using itext7 to create a pdf file. in…
Ajinkya kadam
  • 542
  • 1
  • 6
  • 16
1
vote
0 answers

My application crashes on Oreo 8.1 version but works fine for lower OS versions

my Android application is working fine for Android versions under 8.1 ( an application based on Mupdf ) , when testing on Android 8.1 it keeps crashing with this error : /xxx.xxx.xxx.xxxx A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr…
1
vote
1 answer

AndroidPdfViewer is not working in KitKat Version

I am Using this Library For AndroidPdfViewer https://github.com/barteksc/AndroidPdfViewer E/PDFView: load pdf error java.lang.NullPointerException at com.github.barteksc.pdfviewer.util.Util.toByteArray(Util.java:36) at…
1
vote
0 answers

PdfDocument Dynamically Inflate Layout

Iam trying to inflate a layout into a pdf with PdfDocument. I want to dynamically insert childs to the root which is the TableLayout. But the child overlays the root view in the created pdf. Any ideas? Iam trying to inflate a layout into a…
Nick
  • 2,818
  • 5
  • 42
  • 60
1
vote
1 answer

PdfDocument Inflatting Layout

Iam trying to inflate a layout into a pdf with PdfDocument. In the design view everything looks ok, but when the pdf is created, spaces arent preserved. As you can see in pictures i want the spaces exactly like the first one.Any ideas? Iam trying to…
Nick
  • 2,818
  • 5
  • 42
  • 60
1
vote
0 answers

Generate PDF having multiple images as individual pages using Android SDK PDFDocument API

I cannot find any sample as to how one can generate a pdf file made up of individual images as pages using Android SDK's new PDFDocument API I am trying to generate a pdf file by picking up images from an arraylist of image file names and then…
beerBear
  • 969
  • 2
  • 17
  • 41
1
vote
0 answers

Android Webview to PDF using PdfDocument

When attempting to create a PDF using PdfDocument from a Webview, my content is always blank. Trying a very simple example (writting a report writter) and yet the string does not show up in the PDF. The PDF is getting create, however the text is…
justdan0227
  • 1,374
  • 18
  • 48
1
vote
0 answers

Convert Android view into PDF

I am trying to convert android view into PDF using itextpdf libray but I am only getting half of view as pdf. Here I am Sharing my code Code for getting the view View v1 =…
1
vote
1 answer

How to Use URL by replacing File Storage path in Android

I am Printing Pdf using Google Cloud Printing from my Storage of my phone. i want to use pdf URL by replacing this. How to use URL? For Example: i want to replace /print/test.pdf" …
user4247042
1
vote
1 answer

Android Printing Framework - Landscape PDF file gets rotated sideways and gets clipped in preview

I have the following code for to print a PDF file using the Android Printing Framework: Here is my PrintDocumentAdapter class: @TargetApi(Build.VERSION_CODES.KITKAT) public class PrintPDFAdapter extends PrintDocumentAdapter { private File…
Pink Jazz
  • 784
  • 4
  • 13
  • 34
0
votes
0 answers

Android. How to correctly open page with PdfRenderer?

I'm trying to implement PdfViewer with Pdf Renderer Api and Jetpack Compose. Here is my code: @Composable fun PdfViewer(uri: Uri) { val context = LocalContext.current val rendererScope = rememberCoroutineScope() val mutex = remember {…
0
votes
0 answers

How to prevent auto rotate on mobile in Adobe PDF Embed API embedMode: "SIZED_CONTAINER"

I use Adobe PDF Embed API with embedMode: "SIZED_CONTAINER", when I try open the pdf on mobile phone (chrome), pdf is auto rotating to landscape mode. adding showAnnotationTools: false, showDownloadPDF: false, showPrintPDF: false, enableFormFilling:…
Łukasz
  • 1
  • 1