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

Free Support Forum - aspose.com

SaveToPdf: Problem with paragraph spacing when using a background color

Hi,

Using Apose.Words v9.0.0.0, I’ve noticed a problem when saving to PDF when using paragraphs with a shaded background and the properties SpaceBefore and SpaceAfter. The space between the two paragraphs of the same style is not shaded in the PDF. (See attached images for the example illustrating the difference between the Word and PDF resulting documents).

My style is defined as so:
// BankTransferSummary
style = wordDocument.Styles.Add(Aspose.Words.StyleType.Paragraph, “BankTransferSummary”);
style.BaseStyle = wordDocument.Styles[Aspose.Words.StyleIdentifier.Normal].Name;

style.ParagraphFormat.Shading.BackgroundPatternColor = System.Drawing.Color.FromArgb(254,239,171);

style.ParagraphFormat.Borders.LineStyle = Aspose.Words.LineStyle.Single;
style.ParagraphFormat.Borders.Color = System.Drawing.Color.FromArgb(254,239,171);
style.ParagraphFormat.Borders.LineWidth = 1;
style.ParagraphFormat.Borders.DistanceFromText = 0;
style.ParagraphFormat.Borders.Top.DistanceFromText = 3;
style.ParagraphFormat.Borders.Bottom.DistanceFromText = 3;

// BankTransferSummaryNotice
style = wordDocument.Styles.Add(Aspose.Words.StyleType.Paragraph, “BankTransferSummaryNotice”);
style.BaseStyle = wordDocument.Styles[“BankTransferSummary”].Name;
style.Font.Size = 8;
style.ParagraphFormat.Alignment = Aspose.Words.ParagraphAlignment.Center;

style.ParagraphFormat.SpaceBefore = 12;

Can you confirm this issue?

Thanks

Dominic.

Hi

Thanks for your request. 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 fixed.

Best regards,

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


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