API Reference
Add-OfficePdfRow
Adds a semantic row with percentage-based columns to a generated PDF document.
Remarks
Rows are intended for report-style layouts where two or more content groups should sit beside each other in the normal PDF flow. Column widths are percentages and default to an even split. Column content may use headings, paragraphs, panels, lists, tables, horizontal rules, spacers, bookmarks, or rich Run/Runs text specifications.
Examples
Create a two-column report row.
PS>
New-OfficePdf -Path .\Report.pdf {
PdfRow -Gap 16 -Column @(
@{ Width = 35; Content = @(
@{ Type = 'Heading'; Level = 2; Text = 'Signals' }
@{ Type = 'List'; Items = @('Healthy', 'Watch', 'Needs action') }
) }
@{ Width = 65; Content = @(
@{ Type = 'Panel'; Text = 'Right-side callout content.' }
) }
)
}
Adds a row with list content on the left and a panel on the right.
Use rich text inside a row column.
PS>
New-OfficePdf -Path .\Report.pdf {
PdfBookmark 'details'
PdfRow -Column @(
@{ Content = @(
@{ Type = 'Paragraph'; Run = @(
@{ Text = 'Jump to ' }
@{ Text = 'details'; LinkDestinationName = 'details'; Color = '#7C3AED' }
) }
) }
)
}
Uses the same rich run model as Add-OfficePdfText inside a row layout.
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
Add-OfficePdfRow -Column <Object[]> [-ColumnSeparatorColor <String>] [-ColumnSeparatorWidth <Nullable`1>] [-Gap <Nullable`1>] [-KeepTogether] [-KeepWithNext] [-PassThru] [-SpacingAfter <Nullable`1>] [-SpacingBefore <Nullable`1>] [<CommonParameters>]#ContextParameters
- Column Object[]
- Column specifications. Each entry may define Width and Content, or shorthand values such as Heading, Paragraph, Run, Panel, List, Table, Rule, Spacer, and Bookmark.
- ColumnSeparatorColor String
- Optional vertical separator color between columns in #RRGGBB format.
- ColumnSeparatorWidth Nullable`1
- Optional vertical separator width in PDF points.
- Gap Nullable`1
- Horizontal gutter between columns in PDF points.
- KeepTogether SwitchParameter
- Keep the row together when possible.
- KeepWithNext SwitchParameter
- Keep the row with the next visible block when possible.
- PassThru SwitchParameter
- Emit the updated document.
- SpacingAfter Nullable`1
- Vertical spacing after the row in PDF points.
- SpacingBefore Nullable`1
- Vertical spacing before the row in PDF points.
Outputs
OfficeIMO.Pdf.PdfDocument
Add-OfficePdfRow -Column <Object[]> [-ColumnSeparatorColor <String>] [-ColumnSeparatorWidth <Nullable`1>] -Document <PdfDocument> [-Gap <Nullable`1>] [-KeepTogether] [-KeepWithNext] [-PassThru] [-SpacingAfter <Nullable`1>] [-SpacingBefore <Nullable`1>] [<CommonParameters>]#DocumentParameters
- Column Object[]
- Column specifications. Each entry may define Width and Content, or shorthand values such as Heading, Paragraph, Run, Panel, List, Table, Rule, Spacer, and Bookmark.
- ColumnSeparatorColor String
- Optional vertical separator color between columns in #RRGGBB format.
- ColumnSeparatorWidth Nullable`1
- Optional vertical separator width in PDF points.
- Document PdfDocument
- PDF document to update outside the DSL context.
- Gap Nullable`1
- Horizontal gutter between columns in PDF points.
- KeepTogether SwitchParameter
- Keep the row together when possible.
- KeepWithNext SwitchParameter
- Keep the row with the next visible block when possible.
- PassThru SwitchParameter
- Emit the updated document.
- SpacingAfter Nullable`1
- Vertical spacing after the row in PDF points.
- SpacingBefore Nullable`1
- Vertical spacing before the row in PDF points.
Outputs
OfficeIMO.Pdf.PdfDocument