We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Textbox shading being removed from Word file

When a text box is shaded in the original Word document that shading is not included to the converted TIF file:

I used standard code to convert word to Tif. It works fine, except for some documents where shading is removed. Is there a way to not have the shading removed at the document level, without having to go into each individual paragraph and table object and doing checks/coding there?

Note that the code is not exact below. I copied and pasted from several different functions.

'************************************************************
'Load up document into doc object [which we do through a series of steps]
docExample = …

var imageSaveOptions = new ImageSaveOptions(SaveFormat.Tiff)
{
HorizontalResolution = 300,
VerticalResolution = 300,
PixelFormat = 1,
TiffCompression = [I tried all of the value]
};

foreach (var section in docExample.Sections.Cast())
{
section.PageSetup.Orientation = this.FormProps.WordOrientation;
}

docExample.Save(“C:\SaveToLocation.Tif”, imageSaveOptionsObject)
'************************************************************

Any help will be appreciated.

PS - We also have a problem with black bars or shading (not sure which) being added to document where we don’t want it. See our other query.

@Bowermml1973

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the output file that shows the undesired behavior.
  • Please attach the expected output file that shows the desired behavior.
  • Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

Samples.zip (226.0 KB)
Samples uploaded.
Code in original posting.

@Bowermml1973

Thanks for sharing the detail. Please note that Aspose.Words mimics the behavior of MS Word. If you convert your document to fixed file format e.g. PDF, XPS using MS Word, you will get the same output. The TIFF file format is also fixed file format.

As per our understanding, you want form field with grey color in output TIFF file. Please confirm it. We will then log this feature in our issue tracking system. Thanks for your cooperation.