Closed cris16228 closed 3 years ago
Hello, I'm having problems displaying pdf files correctly, as you can see the first image is the result I'm getting
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_pdfviewer); if (core == null) core = new Core(); core.enableFullscreen(getWindow()); PDFView pdfView = findViewById(R.id.pdf_view); path = getIntent().getStringExtra(core.OFFLINE_PATH); if (path == null) { Uri uri = this.getIntent().getData(); path = uri.getPath(); } File pdf = new File(path); Uri file = Uri.fromFile(pdf); pdfView.useBestQuality(true); pdfView.fromUri(file).onRender((nbPages, pageWidth, pageHeight) -> pdfView.fitToWidth())).load(); }
And some pdfs are displayed correctly, I want to achieve something like this (Adobe Acrobat Reader):
How can I solve this issue?
Hello, I'm having problems displaying pdf files correctly, as you can see the first image is the result I'm getting
And some pdfs are displayed correctly, I want to achieve something like this (Adobe Acrobat Reader):
How can I solve this issue?