I am trying to update my (previously working) pdf web application for using the ABCpdf.NET and ABCpdf.NET Gecko Runtime nuget packages.
I installed both packages (both versions 8.1.1.6), however when I launch my application I get the following WebSupergoo.ABCpdf8.Internal.PDFException :
Failed to add HTML: Gecko engine received an error that it could not recover from. Possible reasons: the XULRunner folder is damaged or from another version of ABCpdf.
After installing the ABCpdf.NET Gecko Runtime package, I got a dialog box saying that I need to manually copy the XULRunner folder to my output directory. To do this, I added a .csproj file to my applications:
<Target Name="AfterBuild"> <CallTarget Targets="CopyAbcpdfToDeployFolder" /> </Target> <Target Name="CopyAbcpdfToDeployFolder"> <ItemGroup> <SourceDir Include="$(ProjectDir)XULRunner\**\*.*" /> </ItemGroup> <Copy SourceFiles="@(SourceDir)" DestinationFolder="$(WebProjectOutputDir)\$(OutputPath)%(SourceDir.RecursiveDir)\XULRunner" /> </Target>
(It seems to work correctly - the XULRunner folder and its contents are present in my bin folder after assembly)
The line of the faulty code is as follows:
theDoc.AddImageUrl(url);
Can someone help me get this job?
source share