49 questions
0 votes
0 answers
145 views
Jetpack Compose: PdfViewerFragment (androidx.pdf:pdf-viewer) not displaying PDF inside AndroidView
I am trying to display a PDF document with PdfViewerFragment from the library androidx.pdf:pdf-viewer:1.0.0-alpha10 inside a Jetpack Compose UI. I’m using AndroidView to host the fragment. The problem:...
0 votes
1 answer
1k views
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 ...
0 votes
2 answers
4k views
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 ...
1 vote
3 answers
3k views
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 well: https://drive.google.com/viewerng/...
0 votes
1 answer
79 views
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 ...
0 votes
1 answer
825 views
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 ...
3 votes
0 answers
601 views
Read PDF File in Assets folder through PdfRenderer without creating tempfile
I have a pdf file in Assets folder and would like to open it up. I need to create a File as below in order to set as a ParcelFileDescriptor to pass to the PdfRenderer. private val pdfRenderer by ...
0 votes
1 answer
417 views
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 ...
1 vote
0 answers
112 views
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 ...
1 vote
0 answers
1k views
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 > ...
2 votes
1 answer
2k views
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 ...
9 votes
1 answer
1k views
PDF opens and closes immediately
In my application I am downloading pdf to Download folder and I am trying to open using below code. String FileName="CardsDecks"; File imagePath = new File(this.getFilesDir(), "Download"); File ...
1 vote
0 answers
564 views
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: ...
0 votes
0 answers
250 views
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 ...
0 votes
1 answer
210 views
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. --------- ...