Hi,
I am trying to convert html to pdf using plugin with proper way,Its work fine locally but don't know on server it does'nt give any error while convert html to pdf but while load or fetch genrated file it gives error file not found
As i look in to method found that .pdf file is not generating also not giving error for conversion
here is my source code
string tempPath = Path.Combine(_appFolders.TempFilePath, "test.pdf");
HtmlConverter.PluginPath = _appFolders.SpirePlugin;
PdfMargins margin = new PdfMargins();
margin.Top = 60;
margin.Bottom = 90;
string input = @"<strong>This is a test for converting HTML string to PDF </strong>
<ul><li>Spire.PDF supports to convert HTML in URL into PDF</li>
<li>Spire.PDF supports to convert HTML string into PDF</li>
<li>With the new plugin</li></ul>";
try
{
HtmlConverter.Convert(input, tempPath, true, 100000, new SizeF(612, 792), margin, LoadHtmlType.SourceCode);
//here its not give any error and pass suceesfully but not generating pdf file,i also check for folder permision and give full access for that
}
catch (Exception ex)
{
throw new UserFriendlyException("Html to pdf conversion fail " + ex.Message);
}
byte[] bytes = System.IO.File.ReadAllBytes(tempPath); //got error here that file not found because not generating
i used 64bit plugin for conversion as my server is 64bit,it was working before but suddnely what happen it does'nt work on server but work locally