# New-TableButtonPDF

Allows more control when adding buttons to Table. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteHTML API Reference.

Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML/1.40.0)

Stars **1,025**

Forks **114**

Open issues 

PowerShell Gallery downloads **7,576,901**

Release **v1.45.0**

Language: PowerShell Updated: 2026-11-19

Command 

**Module**

`PSWriteHTML`

Allows more control when adding buttons to Table

## Syntax

```
New-TableButtonPDF
[[-ButtonName] <String>]
[[-Extension] <String>]
[[-FileName] <String>]
[-Footer]
[-Header]
[[-MessageBottom] <String>]
[[-MessageTop] <String>]
[[-Orientation] <portrait|landscape>]
[[-PageSize] <String>]
[[-Title] <String>]
[<CommonParameters>]
```

[#](#method-new-tablebuttonpdf-string-string-string-switchparameter-switchparameter-string-string-string-string-string)

Parameter set: `All Parameter Sets`

## Description

. Works only within Table or New-HTMLTable scriptblock.

## Examples

### Example 1

```powershell
Dashboard -Name 'Dashimo Test' -FilePath $PSScriptRoot\DashboardEasy05.html -Show {
    Section -Name 'Test' -Collapsable {
        Container {
            Panel {
                Table -DataTable $Process {
                    TableButtonPDF
                    TableButtonCopy
                    TableButtonExcel
                } -Buttons @() -DisableSearch -DisablePaging -HideFooter
            }
            Panel {
                Table -DataTable $Process -Buttons @() -DisableSearch -DisablePaging -HideFooter
            }
            Panel {
                Table -DataTable $Process {
                    TableButtonPDF -PageSize A10 -Orientation landscape
                    TableButtonCopy
                    TableButtonExcel
                } -Buttons @() -DisableSearch -DisablePaging -HideFooter
            }
        }
    }
}
```

## Parameters

**-ButtonName String optionalposition: 1aliases: DisplayName**

**-Extension String optionalposition: 5**

The extension to give the created file name. (default .pdf)

**-FileName String optionalposition: 4**

File name to give the created file (plus the extension defined by the extension option). The special character * is automatically replaced with the value read from the host document's title tag.

**-Footer SwitchParameter optional**

Indicate if the table footer should be included in the exported data or not.

**-Header SwitchParameter optional**

Indicate if the table header should be included in the exported data or not.

**-MessageBottom String optionalposition: 2**

Message to be shown at the bottom of the table, or the caption tag if displayed at the bottom of the table.

**-MessageTop String optionalposition: 3**

Message to be shown at the top of the table, or the caption tag if displayed at the top of the table.

**-Orientation String optionalposition: 7**

Paper orientation for the created PDF. This can be portrait or landscape

Possible values: `portrait`, `landscape`

**-PageSize String optionalposition: 6**

Paper size for the created PDF. This can be A3, A4, A5, LEGAL, LETTER or TABLOID. Other options are available.

Possible values: `4A0`, `2A0`, `A0`, `A1`, `A2`, `A3`, `A4`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, `B0`, `B1`, `B2`, `B3`, `B4`, `B5`, `B6`, `B7`, `B8`, `B9`, `B10`, `C0`, `C1`, `C2`, `C3`, `C4`, `C5`, `C6`, `C7`, `C8`, `C9`, `C10`, `RA0`, `RA1`, `RA2`, `RA3`, `RA4`, `SRA0`, `SRA1`, `SRA2`, `SRA3`, `SRA4`, `EXECUTIVE`, `FOLIO`, `LEGAL`, `LETTER`, `TABLOID`

**-Title String optionalposition: 0**

Document title (appears above the table in the generated PDF). The special character * is automatically replaced with the value read from the host document's title tag.

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:5A920583615F7BA6E0C083F88931270375F49996597BD3054CC48A582323250F -->
