https://github.com/curtisalexander/convert-docx-to-pdf
https://github.com/curtisalexander/convert-docx-to-pdf
docx pdf powershell
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/curtisalexander/convert-docx-to-pdf
- Owner: curtisalexander
- License: mit
- Created: 2019-07-20T17:05:05.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-27T11:20:20.000Z (almost 7 years ago)
- Last Synced: 2025-12-12T21:35:35.820Z (7 months ago)
- Topics: docx, pdf, powershell
- Language: PowerShell
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# convert-docx-to-pdf
Convert-DocxToPdf converts a directory of Word documents (docx) into pdfs on Windows.
## Use
### Preamble
The details below are produced from PowerShell using the following command. It removes the path prefix to the script.
```powershell
@"
(Get-Command .\Convert-DocxToPdf.ps1).Source | Split-Path |
ForEach-Object {
(Get-Help .\Convert-DocxToPdf.ps1 -Detailed |
Out-String -Stream).replace((Join-Path `$_ '\'), '')
}
"@ | Invoke-Expression
```
### Tool Use
```
NAME
Convert-DocxToPdf.ps1
SYNOPSIS
Convert-DocxToPdf converts a directory of Word documents (docx) into pdfs
SYNTAX
Convert-DocxToPdf.ps1 [-docxDir] []
DESCRIPTION
Convert-DocxToPdf converts a directory of Word documents (docx) into pdfs.
The resulting pdf files will have the same filename as the Word documents.
PARAMETERS
-docxDir
The full path to the directory containing the Word documents
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
-------------------------- EXAMPLE 1 --------------------------
PS > Convert-DocxToPdf -docxDir "C:\Users\myuser\Documents\Word"
REMARKS
To see the examples, type: "get-help Convert-DocxToPdf.ps1 -examples".
For more information, type: "get-help Convert-DocxToPdf.ps1 -detailed".
For technical information, type: "get-help Convert-DocxToPdf.ps1 -full".
For online help, type: "get-help Convert-DocxToPdf.ps1 -online"
```