EvotecIT / PSWritePDF

PowerShell Module to create, edit, split, merge PDF files on Windows / Linux and MacOS
GNU Affero General Public License v3.0
197 stars 21 forks source link

Module issue with UNC paths #4

Closed sporkabob closed 4 years ago

sporkabob commented 4 years ago

Cmdlets like Split-PDF, Merge-PDF, and Convert-PDFToText don't work with UNC paths.

WARNING: Split-PDF - Error has occured: Exception calling ".ctor" with "1" argument(s): "Microsoft.PowerShell.Core\FileSystem::\FileServer01\Data\test.pdf not found as file or resource."

The Resolve-Path cmdlet adds the Microsoft.PowerShell.Core\FileSystem:: to the UNC path which causes iText to puke, this doesn't happen with local file paths. I switched Resolve-Path to Convert-Path and it seems to be working fine on my local copy.

PrzemyslawKlys commented 4 years ago

Thank you. Would you be able to submit PR for this? To be honest I never knew ConvertTo-Path existed and I used Resolve-Path because of other issues.

PrzemyslawKlys commented 4 years ago

Fixed in 0.0.7