--- title: "How to download PDF without preview" slug: "download-pdf-without-preview" updated: 2026-02-03T06:07:13Z published: 2026-02-03T06:07:13Z canonical: "helpcenter.autify.com/download-pdf-without-preview" --- > ## Documentation Index > Fetch the complete documentation index at: https://helpcenter.autify.com/llms.txt > Use this file to discover all available pages before exploring further. # How to download PDF without preview Due to browser specifications, clicking a PDF link may prioritize the preview display (PDF viewer), preventing the file from being downloaded. In this procedure, we will force a direct download by converting the step into Playwright code and simulating a **click while holding the Alt key**. ## Procedure 1. **Open the target scenario:** Select the test scenario you want to edit. 2. **Select the target step:** Select the "Click Step" that clicks the PDF link. 3. **Convert to Playwright code step:** Select **[Convert to Playwright Code Step]** from the step menu. 4. **Modify the code (Specify Alt key):** Add `{ modifiers: ['Alt'] }` to the `click` method in the displayed code. ```typescript // Before await page.getByRole("link", {name: "Document PDF"}).click(); // After (Specifying Alt key) await page.getByRole("link", {name: "Document PDF"}).click({ modifiers: ['Alt'] }); ``` 5. **(Optional) Add a wait step for download completion:** Click actions in Playwright code complete very quickly. If the PDF file size is large or the network environment is slow, and the **test ends (or proceeds to the next step) before the download is finished**, add a "Wait Step" (e.g., about 5 to 10 seconds) immediately after the code step. 6. **Save:** Click **[Save]** at the top right of the screen. ## Verification Method Run the scenario and confirm the following behavior at the relevant step: - The PDF preview does not open in the browser. - The file is downloaded successfully. - If necessary, verify in the **[Test Results]** details that the step completed successfully. ## Notes - **Use of Browser Shortcuts**: This procedure utilizes the standard browser shortcut where clicking a link while holding the Alt key saves the link target. - **Criteria for Waiting**: Normally, the process works without a wait step. Consider adding Step 5 only if you observe behavior suggesting the download hasn't finished (e.g., the browser closes before the file is saved).