Merge-PWPDFs bug

With the updated Merge-PWPDFs cmdlet if the Output file already exists the command returns an empty ProjectWise document as the result, even if the file was overwritten or versioned successfully.

If the output file does not exist, the document returns a projectwise document object that points to the created PDF.

$Docs = Get-PWDocumentsBySearch -FolderPath 'test\pdf\in' -Filename '%.pdf'
$pdf = Merge-PWPDFs -InputDocument $Docs -VersionExisting -OutputFolder '\test\pdf\out' -OutputName 'test.pdf'
$pdf

$pdf will be empty if test.pdf already exists. Doesn't matter if -versionexisting or -replaceexisting is used.

Parents Reply Children