Missing Assembly error (Aspose.Font and Aspose.HTML) and table formatting error

Hello,





as in Thread Missing assemblies mentioned does Aspose.Pdf 17.1 and newer throw the Assemly Aspose.Font missing error.





We updated all the dll’s to the newest version (see below), but due to the problem mentioned above, we have to use an older version of Aspose.Pdf.


Unfortunytely, from version 16.10 on, a FileNotFoundException is thrown, because the Aspose.HTML assemly is missing, when we load an HTML document into an Aspose.Pdf document, including an HTMLLoadOption to define a CustomLoaderOfExternalResources:





Aspose.Pdf.HtmlLoadOptions htmlOptions = new Aspose.Pdf.HtmlLoadOptions(folderUrl);


htmlOptions.CustomLoaderOfExternalResources = uri => { //handling of referenced files };


Aspose.Pdf.Document htmlDocument = new Aspose.Pdf.Document(memoryStream, htmlOptions) { IgnoreCorruptedObjects = true };







I tested ALL versions starting from 11.2.0 to 16.12.0 regarding both missing assembly errors - the result:
we have to use the Aspose.Pdf 12.0.0 version, but this version does not render tables correctly (see attachment - the blackening in the screenshot is due to data protection).







So, right now, our only possibility to convert an HTML file into PDF is to use Aspose.PDF version 12.0.0, including the table rendering issue…that is really, really frustrating!









.Net 3.5, SharePoint 2010, Windows Server 2008 R2


Aspose.Pdf 12.0.0.0


Aspose.Cells 17.5.0.0


Aspose.Email 17.4.0.0


Aspose.Imaging 17.4.0.0


Aspose.Slides 17.4.0.0


Aspose.Words 17.5.0.0

Hello Bea,


Thanks for contacting support.

First of all, we humbly apologize for the inconvenience that you have faced. Secondly, would you please confirm that if you have tried the latest release of the API, which is Aspose.Pdf for .NET 17.5 because the GAC related issue has been minimized to many extents in this version.

In a case if you are facing issue with latest release of Aspose.Pdf for .NET, we will really appreciate if you share a sample input HTML file, so that we can test the scenario in our environment and address it accordingly.

We are sorry for the inconvenience.


Best Regards,

Thanks for the fast reply.





No, I did not. When was it released and why didn’t you inform about it in this thread?


Missing assemblies


And the problem is not fixed completly but “to many extents”? Could you please elaborate that (where/when is it not working).








But more important - how can I convert large text (->link below) and XML files into PDF? It seems that you removed the Aspose.Pdf.Generator namespace in 17.5.





Convert PDF documents using C# API|Aspose.PDF for .NET

Hi Bea,

Thanks for writing back.

bea.grosse-venhaus:

No, I did not. When was it released and why didn’t you inform about it in this thread?

Missing assemblies

We have been testing different scenarios related to the issues, reported in the forums, with latest release of Aspose.PDF for .NET and we have shared results accordingly in the relevant forum threads about it. The link which you have shared, has also been updated accordingly, as issue mentioned there was not seemed to be fixed after testing the scenario.

bea.grosse-venhaus:

And the problem is not fixed completly but “to many extents”? Could you please elaborate that (where/when is it not working).

As shared above that for many test scenarios (e.g PDF Concatenation, Image to PDF, etc.), the API did not throw any exception and generated the output correctly. But I am afraid that we cannot specify the features in which API is not throwing any exception, as the issue is not resolved yet and for some cases (e.g the link you shared) API is generating issue.

bea.grosse-venhaus:

But more important - how can I convert large text (->link below) and XML files into PDF? It seems that you removed the Aspose.Pdf.Generator namespace in 17.5.

As the old legacy Aspose.Pdf.Generator has been obsoleted in 17.5, so you can use following code snippet to convert large text file into PDF.

System.IO.TextReader tr = new StreamReader(dataDir + “testtext.txt”, Encoding.Default, true);

Aspose.Pdf.Document doc = new Aspose.Pdf.Document();

Page page = doc.Pages.Add();

String strLine;

while ((strLine = tr.ReadLine()) != null)

{

    Aspose.Pdf.Text.TextFragment text = new Aspose.Pdf.Text.TextFragment(strLine);

    page.Paragraphs.Add(text);

}

doc.Save(dataDir + “TexttoPDF_out.pdf”);

tr.Close();

Moreover, to convert complete TXT file into PDF at once, please check “Convert Text File into PDF” article in our API documentation and in order to convert XML files into PDF, please refer to “XML files to PDF” article. In case of any further assistance, please feel free to contact us.

Best Regards,