Issue with Aspose pdf save functionality

Hi,

We have purchased an Aspose.pdf licence version 7.2. Till date, saving pdf file as html was working perfectly. However, today it stopped working all of a sudden. Given below is the code snippet we are using.

Aspose.Pdf.Document doc = new Aspose.Pdf.Document(myStream);
doc.Save(htmlFilePath, Aspose.Pdf.SaveFormat.Html);

Please help me resolve this issue.

Regards,
Nikhil

Hi Nikhil,


Thanks for using our products.

Can you please share the resource PDF files which are causing the problem during conversion into HTML format, so that we can test the scenario at our end. We are sorry for this inconvenience.

PFA the file which is causing the issue.

Hi Nikhil,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the template file and sample code.

I am able to reproduce your mentioned issue after an initial test. Your issue has been registered in our issue tracking system with issue id: PDFNEWNET-34176. You will be notified via this forum thread regarding any update against your reported issue.

Sorry for the inconvenience,

Hi Nausherwan,
Will wait to hear from you. As you might have seen, the formatting also gets disturbed when conversion happens. Could you please look into it at the earliest? We are working against scorching deadlines.

Thanks,
Nikhil

Hi Nikhil,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the feedback.

After further testing, I have seen that there are formatting issues in the generated HTML file. I have logged the issue in our issue tracking system with issue id: PDFNEWNET-34194. Our development team will further check these issues and we will notify you via this forum thread regarding any updates against this issue.

Sorry for the inconvenience,

Hi Nikhil,


Thanks for your patience.

We are pleased to share that the issue reported earlier as PDFNEWNET-34194 is resolved in latest release of Aspose.Pdf for .NET 9.5.0. Please try using the latest release and in case you encounter any issue or you have any further query, please feel free to contact.

Hi Nikhil,


Thanks for your patience.

We have further investigated the issue PDFNEWNET-34176 reported earlier and have observed that as the source
document is big enough (It contains 98 pages) so the conversion process can take some time. On latest release of of Aspose.Pdf for .NET 9.5.0, the conversion goes much faster and takes about 90 seconds on one of our test machines. Furthermore, we recommend you to use progress bars etc to enlarge perceptible speed of conversion . Please take a look over following code snippet to get progress of conversion which also makes perceptible speed of conversion better.

[C#]

private static void Run_34176_tests()<o:p></o:p>

{

new License().SetLicense(@"E:\Aspose.Pdf.lic");

Console.WriteLine("Loading document ...");

Aspose.Pdf.Document doc = new Document(@"c:\pdftest\34176.pdf");

HtmlSaveOptions options = new HtmlSaveOptions();

options.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;

options.CustomProgressHandler = new UnifiedSaveOptions.ConversionProgressEventHandler(ShowProgressOnConsole);

doc.Save(@"c:\pdftest\34176.html", options);

Console.ReadLine();

}

public static void ShowProgressOnConsole(DocSaveOptions.ProgressEventHandlerInfo eventInfo)

{

switch (eventInfo.EventType)

{

case HtmlSaveOptions.ProgressEventType.TotalProgress:

Console.WriteLine(String.Format("{0} - Conversion progress : {1}% .", DateTime.Now.TimeOfDay, eventInfo.Value.ToString()));

break;

case HtmlSaveOptions.ProgressEventType.SourcePageAnalized:

Console.WriteLine(String.Format("{0} - Source page {1} of {2} analyzed.", DateTime.Now.TimeOfDay, eventInfo.Value.ToString(), eventInfo.MaxValue.ToString()));

break;

case HtmlSaveOptions.ProgressEventType.ResultPageCreated:

Console.WriteLine(String.Format("{0} - Result page's {1} of {2} layout created.", DateTime.Now.TimeOfDay, eventInfo.Value.ToString(), eventInfo.MaxValue.ToString()));

break;

case HtmlSaveOptions.ProgressEventType.ResultPageSaved:

Console.WriteLine(String.Format("{0} - Result page {1} of {2} exported.", DateTime.Now.TimeOfDay, eventInfo.Value.ToString(), eventInfo.MaxValue.ToString()));

break;

default:

break;

}

}

Thanks for the updates Nayyer.