Skip to content

Commit 2cd617c

Browse files
fix: 🐛 Correct encoding and file path references in examples
* Fixed encoding from `IDENTITY_H` to `IdentityH` in `Example01_Simple.ps1`. * Updated file path in `Example01_Simple3.ps1` to use `$PSScriptRoot` for consistency. * Removed commented import statement in `Example01_WithSectionsMix.ps1` for clarity. * Added `.pdf` files to `.gitignore` to prevent accidental commits.
1 parent 4849ce8 commit 2cd617c

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ Lib/Standard/*
2121
Lib/Core/*
2222
Lib/*
2323
CLAUDE.MD
24-
.claude/*
24+
.claude/*
25+
Example/*/*.pdf

Example/Example01.HelloWorld/Example01_Simple.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Import-Module .\PSWritePDF.psd1 -Force
22

33
New-PDF {
4-
Register-PDFFont -FontName 'Verdana' -FontPath 'C:\Windows\fonts\verdana.ttf' -Encoding IDENTITY_H -Cached -Default
4+
Register-PDFFont -FontName 'Verdana' -FontPath 'C:\Windows\fonts\verdana.ttf' -Encoding IdentityH -Cached -Default
55
New-PDFText -Text 'Hello ', 'World' -Font HELVETICA, TIMES_ITALIC -FontColor GRAY, BLUE -FontBold $true, $false, $true
66
New-PDFText -Text 'Testing adding text. ', 'Keep in mind that this works like array.' -Font HELVETICA -FontColor RED
77
New-PDFText -Text 'This text is going by defaults.', ' This will continue...', ' and we can continue working like that.'

Example/Example01.HelloWorld/Example01_Simple3.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ New-PDF -FilePath "$PSScriptRoot\Example01_Simple3-3.pdf" -PDFContent {
1515

1616
}
1717

18-
New-PDF -FilePath "D:\Example01_Simple2.pdf" -PDFContent { 'Test' }
18+
New-PDF -FilePath "$PSScriptRoot\Example01_Simple2.pdf" -PDFContent { 'Test' }

Example/Example01.HelloWorld/Example01_WithSectionsMix.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Import-Module .\PSWritePDF.psd1 -Force
1+
Import-Module .\PSWritePDF.psd1 -Force
22

33
New-PDF -PageSize A4 -Rotate {
44
New-PDFText -Text 'Hello ', 'World' -Font HELVETICA, TIMES_ITALIC -FontColor GRAY, BLUE -FontBold $true, $false, $true

0 commit comments

Comments
 (0)