0

Hyperlink text not aligned properly in PDF. For example,if textfragment have Both normal text and hyperlink text irrespective of fragment.IsInLineParagraph = true/false;

in detail: have a multiple lines of hyperlink text with normal text, Hyperlink content coming in new line and not coming as inline text (continuous with normal text). Please find the attached screenshot. enter image description here

        TextFragment fragment = new Aspose.Pdf.Text.TextFragment();
        TextSegment segment1 = new TextSegment("Before hyperlink ");
        segment1.TextState.FontSize = 12;
        segment1.TextState.Font= Aspose.Pdf.Text.FontRepository.FindFont("Arial");
        fragment.Segments.Add(segment1);
        fragment.IsInLineParagraph = true;
        floatBox.Paragraphs.Add(fragment);

        fragment = new Aspose.Pdf.Text.TextFragment();
        fragment.IsInLineParagraph = true;
        TextSegment segment = new TextSegment("This is Hyperlink This is HyperlinkThis is HyperlinkThis is HyperlinkThis is HyperlinkThis is HyperlinkThis is HyperlinkThis is HyperlinkThis is HyperlinkThis is Hyperlink ");
        segment.TextState.ForegroundColor = Aspose.Pdf.Color.FromArgb(0, 119, 204);
        segment.TextState.Underline = true;
        segment.TextState.FontSize = 12;
        segment.TextState.Font = Aspose.Pdf.Text.FontRepository.FindFont("Arial");
        fragment.Segments.Add(segment);
        fragment.Hyperlink = new WebHyperlink("www.aspose.com");
        fragment.IsInLineParagraph = true;
        floatBox.Paragraphs.Add(fragment);

        fragment = new Aspose.Pdf.Text.TextFragment(" after hyperlink");
        fragment.IsInLineParagraph = true;
        floatBox.Paragraphs.Add(fragment);

Please Let me know if i miss anything in code or provide me solution how to resolve it.

Thanks in Advance!

it'sme
  • 531
  • 6
  • 23
  • 2
    Hi, My name is Nayyer and I am developer evangelist at Aspose. I have tested the above stated scenario and have managed to reproduce the same issue. For the sake of correction, its been logged in our issue tracking system. If you can please post the query in our forums, we can share the issue tracking ID so that you can keep record of its resolution. Aspose team is sorry for your inconvenience. – codewarior Jun 09 '15 at 19:55
  • Thanks for your reply Nayyer. posted same in Aspose fourms. [link](http://www.aspose.com/community/forums/permalink/633775/633775/showthread.aspx#633775) – it'sme Jun 10 '15 at 06:06

0 Answers0