public static xdr.TextBody SetFont(this xdr.TextBody textBody, Font font, Color?color = null) { var paragraphs = textBody.Elements <a.Paragraph>(); foreach (var p in paragraphs) { p.SetFont(font, color); } return(textBody); }
public static xdr.TextBody SetHorizontalAlignment(this xdr.TextBody textBody, a.TextAlignmentTypeValues textAlignment) { var paragraphs = textBody.Elements <a.Paragraph>(); foreach (var p in paragraphs) { p.SetTextAlignment(textAlignment); } return(textBody); }
public static xdr.TextBody SetLineSpace(this xdr.TextBody textBody, float heightMultiplier) { var paragraphs = textBody.Elements <a.Paragraph>(); foreach (var p in paragraphs) { p.SetLineSpace(heightMultiplier); } return(textBody); }
public static xdr.TextBody AddText(this xdr.TextBody textBody, string text, Font font = null, Color?fontColor = null) { var p = textBody.Elements <a.Paragraph>().LastOrDefault(); if (p == null) { p = new a.Paragraph(); textBody.Append(p); } p.AddText(text, font, fontColor); return(textBody); }