Trial version for specific configuration


#1

Hi ,
I downloaded Aspose.Html release 18.6
We try to merge Html files and convert to pdf file.
We have a problem on server with Windows Server 2003 and Framework 2.0
We need trial version for this configuration. What version we need to download ?
We would appreciate your assistant finding out if there is a version for the unmentioned configuration, before we purchase the product.
Kind regards,
Slava


Correct link to dropbox to get source test spose,HTML to pdf
#2

@slavaziz

Thank you for contacting support.

Please note that Aspose.HTML for .NET 18.7 is the latest available version of the API and you can work with it over any .NET supported platform. If License is not set for the API, then it works in Evaluation mode because there is not any separate build for evaluation purpose.

Moreover, you may consider applying for a free 30-days temporary license with which you can evaluate API features without any limitation. For more information about applying a license, you may visit Licensing.


#3

Hi,
I insert temporary license on our web application. But this is not helping on our server with Windows Server 2003 and Framework 2.0
This is a error :

HTML2PDF: before renderer.Render
HTML2PDF: error in render Object reference not set to an instance of an object.

on command : renderer.Render(device, _document);

This is our Function:
public string ConvertToPDF()
{
//string path = apppath+htmlArr[0]
string path =System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath.ToString() + “result\” + htmlArr[0];

        AddToFile("HTML2PDF: path=" + path);

        string filename = Path.GetFileName(path).Split('_')[0];
        AddToFile("HTML2PDF: filename=" + filename);
        string resoutputfile = outputpath + @"\"+filename+".PDF";
        AddToFile("HTML2PDF: resoutputfile=" + resoutputfile);
        //string outputfile = outputpath + @"\"+filename + DateTime.Now.ToString("yyyyMMddHHmmss")+".PDF";
        string outputfile = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath.ToString() + "result\\a.pdf";
        AddToFile("HTML2PDF: outputfile=" + outputfile);
        PdfRenderingOptions options = new PdfRenderingOptions();
        HTMLDocument _document = new HTMLDocument(path);
        AddToFile("HTML2PDF: new HTMLDocument");
        PdfDevice device = new PdfDevice(options, outputfile);
        
        renderer = new HtmlRenderer();
        try
        {
            string aa = _document.NodeName;
            string ss1 = device.Options.JpegQuality.ToString();
            AddToFile("HTML2PDF: before renderer.device " + ss1);
            AddToFile("HTML2PDF: before renderer._document " + aa);
            AddToFile("HTML2PDF: before renderer.Render");
            renderer.Render(device, _document);
            AddToFile("HTML2PDF: after renderer.Render");


            AddDocument(outputfile);
            File.Delete(outputfile);
            if (htmlArr.Length > 1)
            {
                for (int i = 1; i < htmlArr.Length; i++)
                {
                    path = apppath + htmlArr[i];
                    _document = new HTMLDocument(path);
                    AddToFile("HTML2PDF: after new HTMLDocument i=" + i.ToString());
                    AddToFile("HTML2PDF: before renderer.Render i=" + i.ToString());
                    renderer.Render(device, _document);
                    AddToFile("HTML2PDF: after renderer.Render i=" + i.ToString());
                    AddDocument(outputfile);
                    File.Delete(outputfile);
                }
            }
            AddToFile("HTML2PDF: before PDFNewDoc.Save");
            PDFNewDoc.Save(resoutputfile);
            AddToFile("HTML2PDF: after PDFNewDoc.Save");
            return filename + ".PDF";
        }
        catch (Exception e1)
        {
            AddToFile("HTML2PDF: error in render "+e1.Message);
            return "";
        }
    }
   private void AddToFile(string str)
    {
        bool blog = true;
        try
        {
            if (blog)
            {
                string path = @"D:\CodaApp\InvoiceWebTest\InvoceWebLog.txt";
                TextWriter writer = new StreamWriter(path, true);
                writer.WriteLine(str);
                writer.Close();
            }
        }
        catch { }

    }

Best Regards ,
Slava


#4

@slavaziz

We are unable to compile the code snippet shared by you as there are some undeclared variables and methods. Would you please create a narrowed down sample application reproducing this issue, along with the source files so that we may try to reproduce and investigate it in our environment.


Dropbox link for source code
#5

Here is correct link


#6

@slavaziz

Thank you for sharing requested data.

This Web Application works fine in Windows 10 environment. We are preparing environment for Windows Server 2003 with .NET Framework 2.0 and will get back to you with our findings soon. Please be patient and spare us little time.