//////////////////////////////////////////////////////////////////// // Draw frame around example area //////////////////////////////////////////////////////////////////// private void DrawFrameAndBackgroundWaterMark() { // save graphics state Contents.SaveGraphicsState(); // Draw frame around the page // Set line width to 0.02" Contents.SetLineWidth(0.02); // set frame color dark blue Contents.SetColorStroking(Color.DarkBlue); // use water mark tiling pattern to fill the frame Contents.SetPatternNonStroking(WaterMark); // rectangle position: x=1.0", y=1.0", width=6.5", height=9.0" Contents.DrawRectangle(1.0, 1.0, 6.5, 9.0, PaintOp.CloseFillStroke); // restore graphics sate Contents.RestoreGraphicsState(); // draw article name under the frame // Note: the \u00a4 is character 164 that was substituted during Font resource definition // this character is a solid circle it is normally Unicode 9679 or \u25cf in the Arial family Contents.DrawText(ArialNormal, 9.0, 1.1, 0.85, "PdfFileWriter \u25cf PDF File Writer C# Class Library \u25cf Author: Uzi Granot"); // draw web link to the article Contents.DrawWebLink(Page, ArialNormal, 9.0, 7.4, 0.85, TextJustify.Right, DrawStyle.Underline, Color.Blue, "Click to view article", "http://www.codeproject.com/Articles/570682/PDF-File-Writer-Csharp-Class-Library-Version"); return; }
public void appendWebLink(string text, string href, double xPos) { cont.DrawWebLink(currentPage, contentFont, fontSize, xPos, drawY - .1, text, href); }