Some test text!

menu
Why do I need to enable largeHeap for my app?keyboard_arrow_down

Why do I need to enable largeHeap for my app?

This tutorial only applies to Xamarin.Android.

Setting the optional android:largeHeap="true" flag in the AndroidManifest.xml file allows your application's processes to be created with a large Dalvik heap. PDF document rendering can be memory intensive and this flag is recommended to ensure that your application has enough heap memory allocated.

Example:

<?xml version="1.0" encoding="utf-8"?>
<manifest ...>

    <!-- Required permissions are added here -->
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />

    <!-- Add multidex support and enable largeHeap. 
         Also enable usesCleartextTraffic in application attributes if you are 
         working with HTTP files. If you are only working with HTTPS files, this is not required.-->
    <application 
        android:name="androidx.multidex.MultiDexApplication"
+       android:largeHeap="true"
        android:usesCleartextTraffic="true"
        ...>    
        ...
    </application>
</manifest>

Get the answers you need: Support

close

Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.