Free Support Forum - aspose.com

Problem in conversion of Doc with drop-downs fields

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:

1. 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).

2. 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).

3. 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).

4. 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.

Hi Ofer,


Thanks for your inquiry. I have tested the scenario and have not found any issue in shared four cases. The output files are same in all cases except PreserveFormFields case. I have attached the output files and test application for your kind reference. The only issue I have faced is, the Tiff footer is black.

It would be great if you please check the scenario again at your side. Could you please share your working environment here for testing? I will investigate the issue at the same environment on my side and provide you more information. I am using Windows 7 - 64 bit, Visual Studio 2010 and Aspose.Words net2.0.

Did you try exactly all scenarios as I described in my post? I repeated the tests many times and they produce the results I have attached. The only difference is that I’m working on a Windows 2008 R2.


What reason is for the PDF to be large, 10 times the original file? Usually with these configurations we receive a PDF file similar in size to the original doc.

Did you use PreserveFormFields = false or true?

I will have a look at the files you have produced and advise.

What are you going to do in regards to the black footer?




Hi Ofer,


Thanks for sharing the more information. I have tested all scenarios, please check the Visual Studio application in my previous post. I will check the same scenario at Windows 2008 R2/Visual Studio 2010 and share my finding with you.
ofer_b@leumi-card.co.il:
Did you use PreserveFormFields = false or true?
Yes, I have used both value (true and false) for PreserveFormFields.
ofer_b@leumi-card.co.il:
What reason is for the PDF to be large, 10 times the original file? Usually with these configurations we receive a PDF file similar in size to the original doc.
You have use the value of PdfSaveOptions.EmbedFullFonts and PdfSaveOptions.EmbedStandardWindowsFonts as true, this increase the size of output PDF file. Please read following forum link for your kind reference.
http://www.aspose.com/community/forums/permalink/412778/412778/showthread.aspx#412778
http://www.aspose.com/community/forums/permalink/412778/412988/showthread.aspx#412988
ofer_b@leumi-card.co.il:
What are you going to do in regards to the black footer?
I have managed to reproduce the same issue (black footer) at my side. I have logged this issue as WORDSNET-7281 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Good day,


Thanks for your quick reply.

I have gone through your tester and it’s different to the one I have described. We have two separate projects. One is a console application and the other is a class library that is a helper that executes the
Aspose code. That’s the way we are working in the production environment, BizTalk calls a separate helper assembly.

While having only a console application we reached the same results as yours. On separating the projects, I got the results I have described in the initial post.

I’m still running more tests and will inform you on the results.

Thanks again.





Hi Ofer,


Thanks for sharing the details.Could you please attach your test application here for testing? I will investigate the issue on my side and provide you more information.

Regarding the issue (The TIF footer is black), You have used TiffCompression as Ccitt4. In this case, the output image is black and white. Please use TiffCompression as Lzw, Rle to get a colored image. Please read following documentation links for your kind reference.
http://www.aspose.com/docs/display/wordsnet/TiffCompression+Enumeration
http://www.aspose.com/docs/display/wordsnet/ImageSaveOptions+Class

Good day,


Thanks for your quick reply.

I have changed the TIF and PDF configuration to the sample below and all is working well.

We will keep checking and keep you posted if it’s successful in all cases.

Thanks again for all you assistance.

pdfOptions.UseHighQualityRendering
= true;
pdfOptions.EmbedFullFonts = false; pdfOptions.EmbedStandardWindowsFonts = false; pdfOptions.PreserveFormFields = false;

pdfOptions.PrettyFormat = true;

pdfOptions.UseCoreFonts = true;

imgOptions.ImageColorMode
= Aspose.Words.Saving.ImageColorMode.Grayscale;
imgOptions.Resolution = 300; imgOptions.PrettyFormat = true; imgOptions.UseHighQualityRendering = true; imgOptions.ImageContrast = 0.6f;

imgOptions.ImageBrightness = 0.6f;

imgOptions.TiffCompression = Aspose.Words.Saving.TiffCompression.Ccitt4;


Hi Ofer,


Thanks for your feedback. It is nice to hear from you that Doc to Tiff and PDF conversion works fine at your end. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.

Good day,


During more tests on a previous document we have sent, we found another problem.

In the conversion from DOC to TIFF and PDF, certain lines are missing, usually first lines in articles (all documents attached).

- Page 2 in the PDF attached, in article A sub article 6 and 7 the first line is missing.
- Page 3 in the PDF attached, in article B sub article 1 and 7 the first line is missing.

Look at the DOC attached and see the correct document. It happens the same in the TIF.

Probably a conversion problem.

Kind regards,

Mike

Hi Mike,


Thanks for your inquiry. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-7350 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-7281;WORDSNET-7350) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.