Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
bf8a66b
chore: update module version to 1.0.8 and refresh dependencies
rebelinux May 21, 2026
31d051e
Merge branch 'AsBuiltReport:dev' into dev
rebelinux May 21, 2026
7f68380
style: format Pester.yml for consistency and readability
rebelinux May 21, 2026
fb015fa
fix: add missing environment variable assignment for SixLaborsLicense…
rebelinux May 21, 2026
bb964fb
fix: move environment variable assignment for SixLaborsLicenseKey to …
rebelinux May 21, 2026
a4f93d3
fix: move environment variable assignment for SixLaborsLicenseKey to …
rebelinux May 21, 2026
69f9fb1
fix: move environment variable assignment for SixLaborsLicenseKey to …
rebelinux May 21, 2026
f5643ea
fix: move environment variable assignment for SixLaborsLicenseKey to …
rebelinux May 21, 2026
2c8d12e
fix: update environment variable assignment for SixLaborsLicenseKey i…
rebelinux May 21, 2026
bdce772
fix: correct casing of SixLaborsLicenseKey in AbrDiagrammer.csproj
rebelinux May 21, 2026
5d1ed6d
fix: remove redundant environment variable setting for SixLaborsLicen…
rebelinux May 21, 2026
65a674a
fix: reduce retention days for test results from 30 to 10 in Pester.yml
rebelinux May 21, 2026
85fa4a4
fix: increase retention days for test results from 10 to 30 in Pester…
rebelinux May 21, 2026
f082efb
fix: enhance watermark placement and rotation in AddWatermarkToImage …
rebelinux May 21, 2026
06ec816
Refert Back changes
rebelinux May 21, 2026
0b112a3
Improve the name resolutions in Get-AbrNodeIP cmdlet
rebelinux May 28, 2026
6cae15b
Fix missing TableBorderColor parameter in Add-HtmlSignatureTable call…
rebelinux Jun 15, 2026
90e247a
Fix TableBorderColor
rebelinux Jun 16, 2026
04cbc8b
Add -Dpi parameter to New-AbrDiagram
tpcarman Jun 16, 2026
268710d
Add IconWidth/IconHeight parameters to Add-HtmlNodeTable
tpcarman Jun 16, 2026
5e0e9f5
Merge pull request #27 from AsBuiltReport/feature/diagram-dpi
rebelinux Jun 16, 2026
3d5821f
Merge branch 'dev' into dev
rebelinux Jun 16, 2026
32f2cb9
Merge pull request #28 from rebelinux/dev
rebelinux Jun 16, 2026
805d783
Fix issue The parameter 'MainDiagramLabelTableBackgroundColor' has be…
rebelinux Jun 16, 2026
abef88d
Merge pull request #29 from rebelinux/dev
rebelinux Jun 16, 2026
df6dc76
Update CHANGELOG.md
rebelinux Jun 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/Pester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Pester Tests

on:
push:
branches: [ "dev", "main" ]
branches: ["dev", "main"]
pull_request:
branches: [ "dev" ]
branches: ["dev"]
workflow_dispatch:

jobs:
Expand All @@ -13,8 +13,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ windows-latest, ubuntu-latest, macos-latest ]
shell: [ pwsh, powershell ]
os: [windows-latest, ubuntu-latest, macos-latest]
shell: [pwsh, powershell]
exclude:
- os: ubuntu-latest
shell: powershell
Expand Down Expand Up @@ -42,7 +42,8 @@ jobs:
run: dotnet publish ./Sources/Diagrammer -c Release
if: matrix.shell == 'pwsh'
- name: Copy the library PWSH
run: Copy-Item -Path ./Sources/Diagrammer/bin/Release/net8.0/publish/*
run:
Copy-Item -Path ./Sources/Diagrammer/bin/Release/net8.0/publish/*
-Destination ./AsBuiltReport.Diagram/Src/Bin/Assemblies/net80
-Recurse
if: matrix.shell == 'pwsh'
Expand All @@ -51,7 +52,8 @@ jobs:
run: dotnet publish ./Sources/DiaConvertImageToPDF -c Release
if: matrix.os == 'windows-latest' && matrix.shell == 'powershell'
- name: Copy the library for Windows PowerShell
run: Copy-Item -Path ./Sources/DiaConvertImageToPDF/bin/Release/net48/publish/*
run:
Copy-Item -Path ./Sources/DiaConvertImageToPDF/bin/Release/net48/publish/*
-Destination ./AsBuiltReport.Diagram/Src/Bin/Assemblies/net48
-Recurse
if: matrix.os == 'windows-latest' && matrix.shell == 'powershell'
Expand Down
2 changes: 1 addition & 1 deletion AsBuiltReport.Diagram/AsBuiltReport.Diagram.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AsBuiltReport.Diagram.psm1'

# Version number of this module.
ModuleVersion = '1.0.7'
ModuleVersion = '1.0.8'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
25 changes: 22 additions & 3 deletions AsBuiltReport.Diagram/Src/Private/Add-HtmlNodeTable.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ function Add-HtmlNodeTable {
.PARAMETER SubgraphIconHeight
Allow to set a subgraph icon height.

.PARAMETER IconWidth
Allow to set the icon width. When combined with IconHeight, the icon's table cell is fixed to that size and the image is scaled to fit.

.PARAMETER IconHeight
Allow to set the icon height. When combined with IconWidth, the icon's table cell is fixed to that size and the image is scaled to fit.

.PARAMETER TableBackgroundColor
Allow to set a table background color (Hex format EX: #FFFFFF).

Expand Down Expand Up @@ -400,6 +406,18 @@ function Add-HtmlNodeTable {
)]
[string] $SubgraphIconHeight,

[Parameter(
Mandatory = $false,
HelpMessage = 'Allow to set the icon width'
)]
[string] $IconWidth,

[Parameter(
Mandatory = $false,
HelpMessage = 'Allow to set the icon height'
)]
[string] $IconHeight,

[Parameter(
Mandatory = $false,
HelpMessage = 'Allow to set a table background color'
Expand Down Expand Up @@ -634,16 +652,17 @@ function Add-HtmlNodeTable {
}
}
} else {
$IconSizeAttr = if ($IconWidth -and $IconHeight) { ' fixedsize="true" width="{0}" height="{1}"' -f $IconWidth, $IconHeight } else { '' }
if ($MultiIcon) {
while ($Number -ne $Group.Count) {
if ($Icon.Count -gt 1) {
foreach ($Element in $Group[$Number]) {
$TDICON += '<TD ALIGN="{0}" colspan="1"><img src="{1}"/></TD>' -f $Align, $Icon[$iconNumber]
$TDICON += '<TD ALIGN="{0}" colspan="1"{1}><img src="{2}"/></TD>' -f $Align, $IconSizeAttr, $Icon[$iconNumber]
$iconNumber++
}
} else {
foreach ($Element in $Group[$Number]) {
$TDICON += '<TD ALIGN="{0}" colspan="1"><img src="{1}"/></TD>' -f $Align, $Icon
$TDICON += '<TD ALIGN="{0}" colspan="1"{1}><img src="{2}"/></TD>' -f $Align, $IconSizeAttr, $Icon
}
}
$TR += '<TR>{0}</TR>' -f $TDICON
Expand Down Expand Up @@ -708,7 +727,7 @@ function Add-HtmlNodeTable {
} else {

$TDICONMatch = if ($Icon.Count -eq 1) { $Icon } else { $Icon[0] }
$TDICON += '<TD ALIGN="{0}" colspan="{1}"><img src="{2}"/></TD>' -f $Align, $inputObject.Count, $TDICONMatch
$TDICON += '<TD ALIGN="{0}" colspan="{1}"{2}><img src="{3}"/></TD>' -f $Align, $inputObject.Count, $IconSizeAttr, $TDICONMatch

$TR += '<TR>{0}</TR>' -f $TDICON

Expand Down
22 changes: 13 additions & 9 deletions AsBuiltReport.Diagram/Src/Private/Get-AbrNodeIP.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,21 @@ function Get-AbrNodeIP {
)
process {
try {
try {
if ('InterNetwork' -in [System.Net.Dns]::GetHostAddresses($Hostname).AddressFamily) {
$IPADDR = ([System.Net.Dns]::GetHostAddresses($Hostname) | Where-Object { $_.AddressFamily -eq 'InterNetwork' })[0].IPAddressToString
} elseif ('InterNetworkV6' -in [System.Net.Dns]::GetHostAddresses($Hostname).AddressFamily) {
$IPADDR = ([System.Net.Dns]::GetHostAddresses($Hostname) | Where-Object { $_.AddressFamily -eq 'InterNetworkV6' })[0].IPAddressToString
} else {
if ([string]::IsNullOrEmpty($Hostname)) {
$IPADDR = $Null
} else {
try {
if ('InterNetwork' -in [System.Net.Dns]::GetHostAddresses($Hostname).AddressFamily) {
$IPADDR = ([System.Net.Dns]::GetHostAddresses($Hostname) | Where-Object { $_.AddressFamily -eq 'InterNetwork' })[0].IPAddressToString
} elseif ('InterNetworkV6' -in [System.Net.Dns]::GetHostAddresses($Hostname).AddressFamily) {
$IPADDR = ([System.Net.Dns]::GetHostAddresses($Hostname) | Where-Object { $_.AddressFamily -eq 'InterNetworkV6' })[0].IPAddressToString
} else {
$IPADDR = $Null
}
} catch {
Write-Verbose -Message "Unable to resolve Hostname Address: $Hostname"
$IPADDR = $Null
}
} catch {
Write-Verbose -Message "Unable to resolve Hostname Address: $Hostname"
$IPADDR = $Null
}
$NodeIP = switch ([string]::IsNullOrEmpty($IPADDR)) {
$true { 'Unknown' }
Expand Down
48 changes: 44 additions & 4 deletions AsBuiltReport.Diagram/Src/Public/New-AbrDiagram.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@
.PARAMETER SignatureLogoName
Name (key in $ImagesObj) to use as the signature logo.

.PARAMETER SignatureTableBorderColor
Border color for the signature table (RGB hex or color name). Default: '#000000'.

.PARAMETER Logo
Path to a custom main diagram logo file.

Expand Down Expand Up @@ -111,6 +114,9 @@
.PARAMETER MainDiagramLabel
Main label/title displayed at the top of the diagram.

.PARAMETER MainDiagramLabelTableBackgroundColor
Main label/title displayed at the top of the diagram.

.PARAMETER MainDiagramLabelFontsize
Font size for the main diagram label. Default: 24.

Expand All @@ -123,6 +129,9 @@
.PARAMETER MainGraphAttributes
Hashtable of graph attributes to override or augment defaults (examples: fontname, fontcolor, imagepath, style, nodesep, ranksep, bgcolor).

.PARAMETER Dpi
Raster output resolution in dots per inch for PNG/JPG formats (Ex: 300). Default: 96 (Graphviz default).

.PARAMETER WaterMarkColor
Color used for watermark text. Default: 'DarkGray'.

Expand Down Expand Up @@ -338,6 +347,20 @@
)]
[string] $SignatureLogoName,

[Parameter(
Mandatory = $false,
HelpMessage = 'Please provide the signature table border color in RGB format (Ex: #FFFFFF) or color string'
)]
[ValidateNotNullOrEmpty()]
[string] $SignatureTableBorderColor = '#000000',

Check warning

Code scanning / PSScriptAnalyzer

The parameter 'SignatureTableBorderColor' has been declared but not used. Warning

The parameter 'SignatureTableBorderColor' has been declared but not used.
Comment thread
rebelinux marked this conversation as resolved.
Dismissed

[Parameter(
Mandatory = $false,
HelpMessage = 'Please provide the signature table border color in RGB format (Ex: #FFFFFF) or color string'
)]
[ValidateNotNullOrEmpty()]
[string] $SignatureTableBackgroundColor = '#000000',

Check warning

Code scanning / PSScriptAnalyzer

The parameter 'SignatureTableBackgroundColor' has been declared but not used. Warning

The parameter 'SignatureTableBackgroundColor' has been declared but not used.
Comment thread
rebelinux marked this conversation as resolved.
Dismissed

[Parameter(
Mandatory = $false,
HelpMessage = 'Please provide the path to the custom logo'
Expand Down Expand Up @@ -427,6 +450,12 @@
)]
[string] $MainDiagramLabel,

[Parameter(
Mandatory = $false,
HelpMessage = 'Set the Main Label Table Background color used at the top of the diagram'
)]
[string] $MainDiagramLabelTableBackgroundColor = '#ffffff',

Check warning

Code scanning / PSScriptAnalyzer

The parameter 'MainDiagramLabelTableBackgroundColor' has been declared but not used. Warning

The parameter 'MainDiagramLabelTableBackgroundColor' has been declared but not used.
Comment thread
rebelinux marked this conversation as resolved.
Dismissed

[Parameter(
Mandatory = $false,
HelpMessage = 'Set the Main Label font size used at the top of the diagram'
Expand Down Expand Up @@ -488,7 +517,14 @@
HelpMessage = 'Set the image size in percent (100% is default)'
)]
[ValidateRange(1, 100)]
[int] $MainGraphLogoSizePercent = 100
[int] $MainGraphLogoSizePercent = 100,

Check warning

Code scanning / PSScriptAnalyzer

The parameter 'MainGraphLogoSizePercent' has been declared but not used. Warning

The parameter 'MainGraphLogoSizePercent' has been declared but not used.
Comment thread
rebelinux marked this conversation as resolved.
Dismissed

[Parameter(
Mandatory = $false,
HelpMessage = 'Allow to set the raster output resolution in dots per inch (Ex: 300). Default: 96 (Graphviz default)'
)]
[ValidateRange(72, 600)]
[int] $Dpi
)

begin {
Expand Down Expand Up @@ -567,6 +603,10 @@
if ($MainGraphSize) {
$MainGraphAttributes['size'] = $MainGraphSize
}

if ($Dpi) {
$MainGraphAttributes['dpi'] = $Dpi
}
}

process {
Expand Down Expand Up @@ -599,9 +639,9 @@
if ($Signature) {
Write-Verbose -Message 'Generating diagram signature'
if ($CustomSignatureLogo) {
$Signature = (Add-HtmlSignatureTable -ImagesObj $ImagesObj -Rows "Author: $($AuthorName)", "Company: $($CompanyName)" -TableBorder 2 -CellBorder 0 -Align 'left' -Logo $CustomSignatureLogo -IconDebug $IconDebug)
$Signature = (Add-HtmlSignatureTable -ImagesObj $ImagesObj -Rows "Author: $($AuthorName)", "Company: $($CompanyName)" -TableBorder 2 -CellBorder 0 -Align 'left' -Logo $CustomSignatureLogo -IconDebug $IconDebug -TableBorderColor $SignatureTableBorderColor -TableBackgroundColor $SignatureTableBackgroundColor -CellBackgroundColor $SignatureTableBackgroundColor -FontColor $Fontcolor)
} else {
$Signature = (Add-HtmlSignatureTable -ImagesObj $ImagesObj -Rows "Author: $($AuthorName)", "Company: $($CompanyName)" -TableBorder 2 -CellBorder 0 -Align 'left' -Logo 'Logo_Footer' -IconDebug $IconDebug)
$Signature = (Add-HtmlSignatureTable -ImagesObj $ImagesObj -Rows "Author: $($AuthorName)", "Company: $($CompanyName)" -TableBorder 2 -CellBorder 0 -Align 'left' -Logo 'Logo_Footer' -IconDebug $IconDebug -TableBorderColor $SignatureTableBorderColor -TableBackgroundColor $SignatureTableBackgroundColor -CellBackgroundColor $SignatureTableBackgroundColor -FontColor $Fontcolor)
}
} else {
Write-Verbose -Message 'No diagram signature specified'
Expand All @@ -622,7 +662,7 @@
if ($DisableMainDiagramLogo) {
$FormatedMainLogo = ''
} else {
$FormatedMainLogo = (Add-HtmlLabel -ImagesObj $ImagesObj -Label $MainDiagramLabel -IconType $CustomLogo -IconDebug $IconDebug -ImageSizePercent $MainGraphLogoSizePercent -Fontsize $MainDiagramLabelFontsize -FontColor $MainDiagramLabelFontColor -FontName $MainDiagramLabelFontname -FontBold:$MainDiagramLabelFontBold -FontItalic:$MainDiagramLabelFontItalic -FontUnderline:$MainDiagramLabelFontUnderline -FontOverline:$MainDiagramLabelFontOverline -FontSubscript:$MainDiagramLabelFontSubscript -FontSuperscript:$MainDiagramLabelFontSuperscript -FontStrikeThrough:$MainDiagramLabelFontStrikeThrough -CellSpacing 0 -IconPath $IconPath)
$FormatedMainLogo = (Add-HtmlLabel -ImagesObj $ImagesObj -Label $MainDiagramLabel -TableBackgroundColor $MainDiagramLabelTableBackgroundColor -CellBackgroundColor $MainDiagramLabelTableBackgroundColor -IconType $CustomLogo -IconDebug $IconDebug -ImageSizePercent $MainGraphLogoSizePercent -Fontsize $MainDiagramLabelFontsize -FontColor $MainDiagramLabelFontColor -FontName $MainDiagramLabelFontname -FontBold:$MainDiagramLabelFontBold -FontItalic:$MainDiagramLabelFontItalic -FontUnderline:$MainDiagramLabelFontUnderline -FontOverline:$MainDiagramLabelFontOverline -FontSubscript:$MainDiagramLabelFontSubscript -FontSuperscript:$MainDiagramLabelFontSuperscript -FontStrikeThrough:$MainDiagramLabelFontStrikeThrough -CellSpacing 0 -IconPath $IconPath)
}

SubGraph MainGraph -Attributes @{Label = $FormatedMainLogo; fontsize = 24; penwidth = 0; labelloc = 't'; labeljust = 'c' } {
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.8] - 2026-06-16

### :toolbox: Added

- Add `-Dpi` parameter to `New-AbrDiagram`, allowing the raster output resolution (PNG/JPG) to be set directly via the Graphviz `dpi` graph attribute instead of being fixed at the Graphviz default of 96
- Add `-IconWidth`/`-IconHeight` parameters to `Add-HtmlNodeTable`, allowing the rendered icon size in a node's HTML table to be set explicitly instead of being derived solely from the source image's pixel dimensions

### :arrows_clockwise: Changed

- Improve the name resolutions in `Get-AbrNodeIP` cmdlet

### :wrench: Fixed

- Fix missing TableBorderColor parameter in `Add-HtmlSignatureTable` calls in `New-AbrDiagram` function
- Fix missing TableBorderColor parameter in Main Logo section calls in `New-AbrDiagram` function


## [1.0.7] - 2026-05-02

### :arrows_clockwise: Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<LangVersion>8.0</LangVersion>
<TargetFramework>net48</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Version>1.0.6</Version>
<Version>1.0.8</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Sources/DiaConvertImageToPDF/Todo.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- [ ] Add support for Watermark in SVG output format to DiaConvertImageToPDF
- [ ] Use the Diagrammer c# package as a reference to add watermark support to SVG output format
- [x] Add support for Watermark in SVG output format to DiaConvertImageToPDF
- [x] Use the Diagrammer c# package as a reference to add watermark support to SVG output format
2 changes: 1 addition & 1 deletion Sources/Diagrammer/AbrDiagrammer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.7" />
</ItemGroup>

</Project>
</Project>
Loading