How to add hyperlink with iText7?

Example

var content = new MemoryStream();

var writer = new PdfWriter(content);
// Allows subsequent access to content.
writer.SetCloseStream(false);

var pdf = new PdfDocument(writer);
var document = new Document(pdf);
document.SetFontProvider(new BasicFontProvider());

var font = PdfFontFactory.CreateFont(
    fontProgram: FontConstants.TIMES_ROMAN);
var paragraph = new Paragraph().SetFont(font);

var link = new Link("text", 
    PdfAction.CreateURI(
        "http://pages.itextpdf.com/ebook-stackoverflow-questions.html"));
paragraph.Add(link);

document.Add(paragraph);
document.Close();

How to set up paragraph properties in iText7?

Adding links to existing documents

How to insert a hyperlink to another page in an existing PDF?

iText documentation

How to set up paragraph properties in iText7?

Example

var paragraph = new Paragraph();
paragraph.Add(finalText);
paragraph.SetBackgroundColor(ColorConstants.LIGHT_GRAY);
paragraph.SetFontFamily(
    new string[] { iText.IO.Font.Constants.StandardFonts.COURIER });
paragraph.SetFontSize(10);
paragraph.SetPadding(_defaultPadding);
paragraph.SetBorder(
    new iText.Layout.Borders.SolidBorder(ColorConstants.GRAY, 1));
_preformatted = false;
_document.Add(paragraph);