We have a bug of inconsistency while trying to convert a Word document that includes a drop-down form fields (Doc.doc attached).
Different scenarios of operation calling the Aspose.Word version 11.9.0.0 produces different conversion outputs of TIF and PDF files while using the same configurations.
The code that is used is:
Aspose.Words.Document doc = new Aspose.Words.Document(@"C:\michael_fe\dev_2010\Letters\BizTalk_Version2.0\Xml instances\06d020b7-ed27-e211-b57c-00155df026db.doc");
Aspose.Words.Saving.PdfSaveOptions pdfOptions = new Aspose.Words.Saving.PdfSaveOptions();
pdfOptions.UseHighQualityRendering = true;
pdfOptions.EmbedFullFonts = true;
pdfOptions.EmbedStandardWindowsFonts = true;
pdfOptions.PreserveFormFields = true;
pdfOptions.PrettyFormat = true;
pdfOptions.UseCoreFonts = true;
doc.Save(@"06d020b7-ed27-e211-b57c-00155df026db.pdf", pdfOptions);
Aspose.Words.Saving.ImageSaveOptions imgOptions = new Aspose.Words.Saving.ImageSaveOptions(
Aspose.Words.SaveFormat.Tiff);
imgOptions.ImageColorMode = Aspose.Words.Saving.ImageColorMode.Grayscale;
imgOptions.Resolution = 300;
imgOptions.PrettyFormat = true;
imgOptions.UseHighQualityRendering = true;
imgOptions.ImageContrast = 0.5f;
imgOptions.ImageBrightness = 0.5f;
imgOptions.TiffCompression = Aspose.Words.Saving.TiffCompression.Ccitt4;
doc.Save(@"06d020b7-ed27-e211-b57c-00155df026db.tif",
imgOptions);
The only difference is where the code is been used:
- While inserting this code inside the Static Main function of a Console application (VS 2010/.NET 4.0/c#) we get the required output (Pdf_correct.pdf and Tif_correct.tif).
- While inserting this code inside a static function called from the Static Main function both in the Console application (VS 2010/.NET 4.0/c#), we get a wrong output (Pdf_faulty2.pdf and Tif_faulty2.tif).
- While inserting this code inside a separate DLL helper (VS 2010/.NET 4.0/c#) that’s been called from a Static Main function of a Console application (VS 2010/.NET 4.0/c#) we get a faulty output (Pdf_faulty1.pdf and Tif_faulty2.tif).
- Running the same as in case 3 but pdfOptions.PreserveFormFields=false, produces a correct PDF but 10 times the size (Pdf_fauly1.pdf and Tif_correct.tif). The same code running in BizTalk 2010 produces (Pdf_correct.pdf and Tif_faulty1.tif); the TIF footer is black and unreadable.
Please do advise if this is a bug or something has to be configured differently.
Our scenario is calling a separate DLL helper from BizTalk 2010.