---
title: "How to set the default height and width of the embedded PDF"
slug: "how-to-set-the-default-height-and-width-of-the-embedded-pdf"
description: "Preview size of the PDF files in the article would vary for browsers. However, you can configure the desired height and width of the PDF file."
tags: ["Customization"]
updated: 2025-12-28T14:06:57Z
published: 2026-01-31T18:00:00Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.document360.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to set the default height and width of the embedded PDF

Preview size of the PDF files in the article would vary for browsers. However, you can configure the desired height and width of the PDF file.

### Solution

1. Navigate to **Settings** (<nor class="fa-solid fa-gear" data-tomark-pass=""></nor>) > **Knowledge base site** > **Site customization** > **Custom CSS & JavaScript** in the Knowledge base portal.

![Site customization options including CSS, JavaScript, and theme settings for a knowledge base.](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/Custom%20css%20&amp;%20js.png)
2. From the left navigation pane, click on the **CSS**tab and paste the following CSS snippet:

```css
object {
height: 500px !important;
width: 500px !important;
}
```

1. Update the desired height and weight as per your requirement.
2. Click **Save**.

![](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/image-1766930810821.png)

### Outcome

![2_Screenshot-outcome_set_of_height_&amp;_width.png](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/2_Screenshot-outcome_set_of_height_&amp;_width.png)
