Skip to content

Commit 5f18821

Browse files
FLUT-962885: Add how to for syncfusion_pdfviewer_android
1 parent c94a16c commit 5f18821

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
layout: post
3+
title: Rendering PDF pages using PDFium on Android| Syncfusion
4+
description: You can learn here all about rendering the PDF pages using PDFium on Android
5+
platform: flutter
6+
control: SfPdfViewer
7+
documentation: ug
8+
keywords: flutter pdf viewer, flutter view pdf, pdf viewer in flutter, flutter open pdf, flutter pdf view
9+
---
10+
11+
# How to render PDF pages using PDFium on Android?
12+
13+
The Syncfusion Flutter PDF Viewer allows users to render PDF pages using the PDFium library on Android. This enables rendering PDF pages with better performance on Android devices running API levels below 35. By default, the PDF Viewer uses the [PdfRenderer](https://developer.android.com/reference/android/graphics/pdf/PdfRenderer) to render PDF pages on the Android platform.
14+
15+
However, the `PdfRenderer` does not support loading password-protected documents on Android devices running API levels below 35. To load password-protected documents on Android, we decrypt the PDF document using the `syncfusion_flutter_pdf` library and employ the decrypted bytes to load the PDF document.
16+
17+
To improve the performance of loading password-protected PDF documents on API levels below 35, we can use the PDFium library to load and render the PDF documents.
18+
19+
To render PDF pages using PDFium on Android devices running API levels below 35, add the syncfusion_pdfviewer_android dependency in the `pubspec.yaml` file.
20+
21+
{% highlight dart %}
22+
23+
dependencies:
24+
25+
syncfusion_flutter_pdfviewer: ^xx.x.xx
26+
syncfusion_pdfviewer_android: ^xx.x.xx
27+
28+
{% endhighlight %}
29+
30+
N> Here **xx.x.xx** denotes the current version of the [Syncfusion<sup>&reg;</sup> Flutter PDF Viewer](https://pub.dev/packages/syncfusion_flutter_pdfviewer/versions) package. Please use the same version as the `syncfusion_flutter_pdfviewer` package.
31+
32+
N> PdfRenderer will be used for rendering PDF pages on Android devices running API levels 35 and above, even if the `syncfusion_pdfviewer_android` dependency is added.

flutter-toc.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@
560560
<li><a href="/Flutter/pdf-viewer/How-to/Add-SignaturePad-signatures-to-Syncfusion-Flutter-PdfViewer">Add SignaturePad signatures to Syncfusion Flutter PdfViewer</a></li>
561561
<li><a href="/Flutter/pdf-viewer/How-to/Resolve-Library-not-loaded-rpath-libswiftCore-dylib-error">Resolve Library not loaded: @rpath/libswiftCore.dylib error</a></li>
562562
<li><a href="/Flutter/pdf-viewer/How-to/custom-widget-on-flutterflow">Custom Widget on FlutterFlow</a></li>
563+
<li><a href="/Flutter/pdf-viewer/How-to/Render-pages-using-pdfium-android.md">Render PDF Pages using pdfium in Android</a></li>
563564
</ul>
564565
</li>
565566
</ul>

0 commit comments

Comments
 (0)