Evotec

Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-TableButtonPDF

Aliases: New-HTMLTableButtonPDF
Namespace PSWriteHTML
Aliases
New-HTMLTableButtonPDF

Allows more control when adding buttons to Table

Remarks

Allows more control when adding buttons to Table. Works only within Table or New-HTMLTable scriptblock.

Examples

Authored help example

EXAMPLE 1


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
            }
        }
    }
}
        

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.

Syntax

New-TableButtonPDF [-ButtonName <String>] [-Extension <String>] [-FileName <String>] [-Footer] [-Header] [-MessageBottom <String>] [-MessageTop <String>] [-Orientation <portrait|landscape>] [-PageSize <4A0>] [-Title <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

ButtonName String optionalposition: 1pipeline: Falsealiases: DisplayName
Extension String optionalposition: 5pipeline: False
The extension to give the created file name. (default .pdf)
FileName String optionalposition: 4pipeline: False
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 optionalposition: namedpipeline: False
Indicate if the table footer should be included in the exported data or not.
Header SwitchParameter optionalposition: namedpipeline: False
Indicate if the table header should be included in the exported data or not.
MessageBottom String optionalposition: 2pipeline: False
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: 3pipeline: False
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: 7pipeline: Falsevalues: 2
Paper orientation for the created PDF. This can be portrait or landscape
Possible values: portrait, landscape
PageSize String optionalposition: 6pipeline: Falsevalues: 50
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: 0pipeline: False
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.