Difference in image output for html files between Aspose versions


#1

We use Aspose.Words to convert html files to images. We recently moved from version 17.3 to 18.10 and noticed the images are different between the two releases. I can provide a lot more detail but here is a code snippet that resembles the code we use:

var directory = args[0];
var sourceFileName = args[1];

			using (var fileStream = Assembly.GetExecutingAssembly()
				.GetManifestResourceStream($"AsposeWordsTiffTest.TestFiles.{sourceFileName}"))
			{
				var asposeDocument = new Document(fileStream);

				for (var i = 0; i < asposeDocument.PageCount; i++)
				{
					var saveOptions = new ImageSaveOptions(SaveFormat.Tiff)
					{
						PageIndex = i,
						PageCount = 1,
						Resolution = 200,
						TiffCompression = TiffCompression.Ccitt4,
					};

					var file = Path.Combine(directory, $"{sourceFileName}_{i}.tif");
					asposeDocument.Save(file, saveOptions);
				}
			}

I can send a VS solution and example html files that generate images that differ between the version if necessary. Thanks in advance.


#2

@thayesxx

Thanks for your inquiry. Please ZIP and attach the following resources here for testing.

  • Input file(s).
  • output file(s) showing undesired behavior.
  • working source code to reproduce this issue.

We will then investigate the issue on our end and provide you more information.

P.S. If your file size is big then you may upload the ZIP file to Dropbox or any other file hosting service and share the download link here for testing.


#3
Summary

I have attached zip AsposeWordsTiffTest.zip. If you open zip and navigate to AsposeWordsTiffTest.zip\AsposeWordsTiffTest you will see a AsposeReadme.docx. The dlls and license files used for testing are located in AsposeWordsTiffTest\packages. Let me know if you have questions


#4

@thayesxx

Unfortunately, we have not found the attachment with your post. Please attach it again.
Thanks for your cooperation.


#5

They are in the zip see AsposeWordsTiffTest.zip\AsposeWordsTiffTest\AsposeWordsTiffTest\TestFiles

there are two files: HTML embedded.html and TooLongEmbedded.html


#6

@thayesxx

I am afraid, we do not see any attachments in this thread. If your file size is big then you may upload the ZIP file to Dropbox or any other file hosting service and share the download link here for testing.

Also, please try the latest version of Aspose.Words for .NET i.e. 18.12 and let us know how it goes on your side.


#7

Apparently your upload function does not work for larger zips. I uploaded a zip and a full vs studio solution and I guess you did not get it.

I also attached the program.cs in a zip and another one with the html files.

Please confirm receipt of the zips and then I will upload more.

Program.zip (684 Bytes)
html files.zip (9.3 KB)


#8

@thayesxx

Thanks for sharing required files. We have received Zips of program.cs and HTML files. Please also share output file(s) showing undesired behavior. Thanks for your cooperation.


#9

Attached is the output zip.output.zip (90.9 KB)


#10

@thayesxx

Thanks for your inquiry. We have tested the scenarios and have managed to reproduce the same issues at our side. For the sake of correction, we have logged these problems in our issue tracking system as

WORDSNET-17907 : Table is rendered improperly during HTML to TIFF conversion
WORDSNET-17908 : Table width is incorrect in rendered TIFF

You will be notified via this forum thread once these issues are resolved.

We apologize for your inconvenience.


#11

Great. What is the eta on these tickets?


#12

@thayesxx

I am afraid, there is no ETA (time frame) available at the moment. We will inform you via this thread as soon as any estimates or further updates are available. We apologize for your inconvenience.