I changed the code into:
var dataDir = @"c:\data\";
string inFile = dataDir + "Testverslag versie 10.4.0.1 PEN ACC ( APF ).ps";
string outFile = dataDir + "Testverslag versie 10.4.0.1 PEN ACC ( APF ).pdf";
if (!File.Exists(inFile))
{
return;
}
Document doc = new Document(inFile, new PsLoadOptions() { FontsFolders = new[] { @"C:\Windows\Fonts" } });
doc.Save(outFile);
But the error remeains the same:
System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=Aspose.PDF
StackTrace:
at #=z8kQPmMCMQiqYwLLtpxARbtg8nbUt.#=zf$tdttQ=(Document #=zev7n9N8=, Stream #=zTMIvp0u$XC5b, PsLoadOptions #=zjqkcKb_AEEKT)
at Aspose.Pdf.Document.#=zNLf_q1I=(Stream #=zgnMJO48=, LoadOptions #=zEKblAOo=)
at Aspose.Pdf.Document…ctor(String filename, LoadOptions options)
at AsposePdf.Form1.ConvertToPdf(String fileNaam) in C:\Dev\TestApps\AsposePdf\AsposePdf\Form1.cs:line 58
What is the difference between your en mine environment.
Dirk