We are converting Word documents to PDF. These documents are checks lists that have check boxes next to items.
The problem is the the box image in Word is being converted to a Flag image during the PDF converstion process.
How can this be corrected?
Thanks
Hi
Thanks for your inquiry. Could you please attach your document here for testing? I will check the problem on my side and provide you more information.
Best regards,
Here are samples of the problem. Thanks!
Hi
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.
As a workaround please try using Wingdings 2 font instead Wingdings in your document.
Hope this helps,
Best regards,
Andry,
We have over 500 documents that we have to recreate and post to our website. Please expedite this issue.
thanks
Hi
Thanks for your request. You can try using the following code to replace these characters in your document programmatically:
// Open document.
Document doc = new Document(@"Test001\in.doc");
// Replace Wingdings \xF06F with Wingdings 2 \x00A3 character.
Regex regex = new Regex("\xF06F", RegexOptions.IgnoreCase);
doc.Range.Replace(regex, new ReplaceEvaluator(ReplaceWingdingsCheckboxes), false);
// Save output document.
doc.SaveToPdf(@"Test001\out.pdf");
private static ReplaceAction ReplaceWingdingsCheckboxes(object sender, ReplaceEvaluatorArgs e)
{
// Set replacement.
e.Replacement = "\x00A3";
// We also should change font of the run.
((Run) e.MatchNode).Font.Name = "Wingdings 2";
// Signal to the replace engine to do replace matched text.
return ReplaceAction.Replace;
}
Hope this helps.
Best regards,
The code from Aspose was a partial fix. As the attached PDF shows, there are apparently other characters that are still be converted to flags. Whatever the character code is probably needs to be captured in the code doing the conversion.
See attached.
Hi
Thank you for additional information. Please try using the following code with some changes:
// Open document.
Document doc = new Document(@"Test079\in.doc");
// Replace Wingdings \xF06F with Wingdings 2 \x00A3 character.
Regex regex = new Regex("\xF06F|\x006F", RegexOptions.IgnoreCase);
doc.Range.Replace(regex, new ReplaceEvaluator(ReplaceWingdingsCheckboxes), false);
// Save output document.
doc.SaveToPdf(@"Test079\out.pdf");
// Set replacement.
e.Replacement = "\x00A3";
// We also should change font of the run.
Run run = (Run) e.MatchNode;
if (run.Font.Name == "Wingdings")
{
run.Font.Name = "Wingdings 2";
// Signal to the replace engine to do replace matched text.
return ReplaceAction.Replace;
}
else
{
return ReplaceAction.Skip;
}
Hope this helps.
Best regards,
The issues you have found earlier (filed as WORDSNET-3008) have been fixed in this .NET update and this Java update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.