# PDF

This building block is a way of giving users more information using PDF documents.

**Please note**: PDF support on **Android** is available by default on devices with the **Lollipop** operating system. Android devices with older operating systems require some kind of PDF reader app to open these PDFs.&#x20;

Max file size for each PDF is 15MB.&#x20;

### **Adding the PDF building block** <a href="#add" id="add"></a>

1. Click on the **+** **Block** button.
2. Select the **PDF** block and click **Add this Block.**
3. Fill in the desired **name** of the block.<br>

   <figure><img src="https://2636455530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2wzy1sO41plYrfJfaAhN%2Fuploads%2F0KLs2XvmNsFWwCJY6iDu%2FScreenshot%202022-12-05%20at%2014.56.47.png?alt=media&#x26;token=2991a16b-e765-4045-a6ce-9330103ade24" alt=""><figcaption></figcaption></figure>
4. Click on the **icon** if you want to change the icon image used in the menu.
5. When you’re done, click **Add this Block**.

### **Adding a PDF** <a href="#content" id="content"></a>

1. Select the **PDF** block in your app.
2. Go to the **Data** tab.
3. Click on the **Create New** button.<br>

   <figure><img src="https://2636455530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2wzy1sO41plYrfJfaAhN%2Fuploads%2Fk16I8mSgt2SkTcrHITog%2FScreenshot%202022-12-05%20at%2015.00.55.png?alt=media&#x26;token=307e3f32-b2bc-47a4-9087-097bbb699adb" alt=""><figcaption></figcaption></figure>
4. Fill in the **name** you would like to give the document in the pop up

   <figure><img src="https://2636455530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2wzy1sO41plYrfJfaAhN%2Fuploads%2F7HQluKDz37UktusSDLfh%2FScreenshot%202022-12-05%20at%2014.59.49.png?alt=media&#x26;token=577a331c-c601-4d28-bf89-b2601d551d0d" alt=""><figcaption></figcaption></figure>
5. Add an image you'd like to display next to the PDF document.&#x20;
6. Upload the PDF file in the **Upload file** section.
7. Click **Save**&#x20;

#### **Editing an entry**

Hover the cursor over an existing entry to edit, rearrange or delete it.

* **Edit**: select the pen icon to change the item's name or replace the PDF file. When you're done click on Save to save.
* **Rearrange**: grab the handle on the right side of your entry to rearrange the order it will be displayed in the app.
* **Delete**: click on the garbage can to delete the entry from your block.

### **Configuring the PDF building block** <a href="#configure" id="configure"></a>

The **PDF** building block editor is composed of three editing screens: **Data**, **Settings**, and **Design**.

**Data** allows you maintain the content of the block, **Settings** allows you to choose whether a search bar is shown in this block, and the settings in the **Design** screen determine its aesthetics.&#x20;

#### **Settings**

There are several aspects of your **PDF** block that can be changed in this screen:

* The **name** of the block
* The **icon** (or image) that will be used in the app menu
* Gives you the option of enabling the search bar<br>

  <figure><img src="https://2636455530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2wzy1sO41plYrfJfaAhN%2Fuploads%2FjlrR4kGvLHy7o8CRR6zC%2FScreenshot%202022-12-05%20at%2015.10.21.png?alt=media&#x26;token=66ca0993-8a9e-4615-a3b3-e1ce0f442a54" alt=""><figcaption></figcaption></figure>

Should the need arise to keep the users of your published app from using this portion of the app, then you can always make use of the **ON/OFF** selector.

Slide the selector to **OFF** to keep users from seeing the **PDF** block. Now you can continue developing your app without worrying about users coming upon areas that you haven't finished developing as of yet. Once you are satisfied with your progress, change the selector back to **ON** to publish this portion of your app.

#### **Data**

This is where you add the documents to your app.

#### **Design**

The **Design** screen allows your to make highly detailed changes to your building block. **Design** gives the developer a remarkable amount of freedom to adjust everything exactly as he or she would like it. The options in this particular block are slightly more limited than in other blocks as the screen will be dominated by the PDF document.&#x20;

### FAQ

**Why can't I upload my PDF file to my app in AppMachine?**

Please remember that the max file size for each PDF is **15MB**. Please check whether the PDF is too large to be uploaded or whether the PDF file might be corrupt. PDF files that are too large can usually be optimized in order to be saved as a smaller file size.
