EvotecIT / PSWritePDF

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

Merge-PDF not producing any output File (no error message) #52

Closed HannesRiebenbauer closed 5 months ago

HannesRiebenbauer commented 5 months ago

Hi,

I am trying to use Merge-PDF, however it is not working for me. I do not get any error messages, however no output file is being generated.

PS C:\mydir> Test-Path -PathType Leaf .\0001_.pdf
True

PS C:\mydir> Test-Path -PathType Leaf .\0006_.pdf
True

PS C:\mydir> Merge-PDF -InputFile .\0001_.pdf, .\0006_.pdf -OutputFile .\out.pdf -Verbose

PS C:\mydir> Test-Path -PathType Leaf .\out.pdf
False

I tried PDFs from different sources because I thought maybe the issue is with my PDFs being produced from my own code, however the result (no result) is always the same.

> Get-InstalledModule PSWritePDF | Format-List

Name                       : PSWritePDF
Version                    : 0.0.20
Type                       : Module
Description                : Little project to create, read, modify, split, merge PDF files on Windows, Linux and Mac.
Author                     : Przemyslaw Klys
CompanyName                : Przemyslaw.Klys
Copyright                  : (c) 2011 - 2022 Przemyslaw Klys @ Evotec. All rights reserved.
PublishedDate              : 02.10.2022 17:24:49
InstalledDate              : 28.06.2024 14:04:38
UpdatedDate                : 
LicenseUri                 : https://github.com/EvotecIT/PSWritePDF/blob/master/LICENSE
ProjectUri                 : https://github.com/EvotecIT/PSWritePDF
IconUri                    : https://evotec.xyz/wp-content/uploads/2019/11/PSWritePDF.png
Tags                       : {PDF, macOS, linux, windows...}
Includes                   : {Function, RoleCapability, Command, DscResource...}
PowerShellGetFormatVersion : 
ReleaseNotes               : 
Dependencies               : {}
RepositorySourceLocation   : https://www.powershellgallery.com/api/v2
Repository                 : PSGallery
PackageManagementProvider  : NuGet
AdditionalMetadata         : @{summary=Little project to create, read, modify, split, merge PDF files on Windows, Linux and Mac.; SourceName=PSGallery; 
                             installeddate=28.06.2024 14:04:38; copyright=(c) 2011 - 2022 Przemyslaw Klys @ Evotec. All rights reserved.; tags=PDF macOS linux windows 
                             PSModule PSEdition_Desktop PSEdition_Core; Type=Module; InstalledLocation=C:\Program Files\WindowsPowerShell\Modules\PSWritePDF\0.0.20; 
                             description=Little project to create, read, modify, split, merge PDF files on Windows, Linux and Mac.; published=02.10.2022 17:24:49; 
                             PackageManagementProvider=NuGet}
InstalledLocation          : C:\Program Files\WindowsPowerShell\Modules\PSWritePDF\0.0.20
PrzemyslawKlys commented 5 months ago

have you tried full path? Probably relative paths are broken?

HannesRiebenbauer commented 5 months ago

have you tried full path? Probably relative paths are broken?

I did use full paths for the input files, but not for the output file. Indeed it works with full paths. I tried again with relative paths for the input files and it works like this as well. So, not using the full path for the output file was the issue.