Hi since the last update the folowing script in PowerShell raise an error. The script did not change at all, so something is wrong with the current version.
current version: 22.2.0
last version: 21.6.0
Please try the script below. Before trying please change path of pdf file and aspose.pdf.dll
Script:
$inputFilePath = “D:\weg\200701124019.00108075.pdf”
$asposeDllPath = “D:\LCS\Winyard\Testprojekte\AsposeCreatePDFFile\AsposeCreatePDFFile\bin\Debug”
function Test
{
[CmdletBinding()]
[OutputType([boolean])]
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]$Filename
)
[Aspose.PDF.Document] $PDFDoc = New-Object Aspose.PDF.Document($inputFilePath)
Write-Host ("Filename: "+$Filename)
Write-Host ($PDFDoc.Pages.count)
Return $true
}
$ergebnis = Test -Filename $inputFilePath
$ergebnis.ToString()