Created
June 27, 2024 01:44
-
-
Save langheran/5828b874d01dfebbd7698813bef4661c to your computer and use it in GitHub Desktop.
C:\Users\NisimHurst\NDS\scripts\trim_pdf_images.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem ".\" -Filter *.pdf | | |
Foreach-Object { | |
$output = $_.BaseName + ".png" | |
if (Test-Path $output) { | |
Remove-Item $output | |
} | |
convert -density 300 $_.FullName -bordercolor white -border 1x1 -trim +repage -quality 100 -border 50x50 $output | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment