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

Free Support Forum - aspose.com

Word merge field highlighted gray when exporting to pdf

Hi,

I have a merge field included in my word document, when I convert it to PDF using Aspose.Words the field is highlighed gray. How can I get it to not be gray, rather white. Is there a way to programatically set this property in the API? Attached is an example of the pdf. I have tried the

ShadeFormData = false

but had no success.

Thanks in advance!

Adam Serbert

Hi Adam,

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

Thanks for your request. Could you please also attach your Word document here for testing? I will investigate the issue and provide you more information.

Best regards.

Hi,

in the sample document the Attribute WordDocument.ShadeFormDate= false shows no effect when exported to pdf - all merge fields are shaded gray.

An example word document and example project are included as attachments.

=========== Environment ========================
Windows XP SP 3 (German version)
Visual Studio 2008 SP 1 (German version)
Dotnet Framework 2.0
Aspose.Word: Version 8.1.0.0
MS Word 2007 (German version)
=========== Example code =======================


=== Example Project ================

using System;
using System.Collections.Generic;
using System.Text;

using Aspose.Words;
using Aspose.Words.Rendering;

namespace WordTest
{
class Program
{
static void Main(string[] args)
{
Aspose.Words.Document currDoc = new Aspose.Words.Document(“Example_Document.doc”, LoadFormat.Doc, null);

currDoc.ShadeFormData = false; // Sonst werden MailMerge Felder mit Grau schattiert
currDoc.SaveOptions.PdfExportFormFieldsAsText = true; // MailMergeFiels als Text in PDF einbetten, nicht als PDF Formularfeld

PdfOptions pdfOptions = new PdfOptions();
pdfOptions.Compliance = PdfCompliance.PdfA1b;
pdfOptions.ExpandedOutlineLevels = 0;
pdfOptions.BookmarksOutlineLevel = 0;
pdfOptions.HeadingsOutlineLevels = 3;

currDoc.SaveToPdf(0, currDoc.PageCount, “Example_Document.pdf”, pdfOptions);

}
}
}

I included an example document with posting

Word merge field highlighted gray when exporting to pdf

Hi

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

Thank you for additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

Best regards,

The issues you have found earlier (filed as 14390) have been fixed in this update.


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

The issues you have found earlier (filed as 14390) have been fixed in this update.


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