I need help adding an Absolute Position Formatted Textbox on the first page of an existing PDF Document. This is what I have so far but it does not work. Any ideas… I
public void InsertBlurb( Document doc )
{
Page page = doc.Pages[1];
FloatingBox box = new Aspose.Pdf.FloatingBox();
box.Top = blurbConfig.top - 80 ;
box.Left = blurbConfig.left - 80;
box.Height = blurbConfig.height;
box.Width = blurbConfig.width;
box.HorizontalAlignment = HorizontalAlignment.Left;
box.VerticalAlignment = VerticalAlignment.Top;
box.BackgroundColor = Aspose.Pdf.Color.FromRgb( System.Drawing.Color.White );
box.ZIndex = 10;
box.Border = new BorderInfo(BorderSide.Box);
box.Margin = new MarginInfo(0,0,0,0);
string blurb = "<p>A couple paragraphs with <b>bold</b> and <i>italic</i><p>";
HtmlFragment blurbFragment = new HtmlFragment( blurb );
blurbFragment.Margin = new MarginInfo(0, 0, 0, 0);
blurbFragment.TextState = new TextState();
blurbFragment.TextState.Font = FontRepository.FindFont("Arial");
blurbFragment.TextState.FontSize = 10;
blurbFragment.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb( System.Drawing.Color.Black );
box.Paragraphs.Add(blurbFragment);
page.Paragraphs.Add(box);
}