how to use DrawText for multiline text - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: how to use DrawText for multiline text

how to use DrawText for multiline text 2 years 10 months ago #10005

  • gabmor
  • gabmor's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 17
  • Thank you received: 0
Hi, I successfully use the draw text method por a single but when the text has two or more lines draw the text on the same line how can I do this?.

this is my code
Document.DocFont docFont = m_doc.NewFontCID("Roboto-Regular", 8);//embed font to PDF file
            Page page = m_doc.GetPage(0);
            page.ObjsStart();

            ResFont resFont = page.AddResFont(docFont);
            PageContent content = new PageContent();
            content.Create();
            content.TextBegin();
            content.TextSetFont(resFont, 15);
            content.SetFillColor(Color.BLACK);
            content.TextSetRenderMode(0); // fill
            content.TextMove(50, 700);
            content.DrawText(largeText);
            content.TextEnd();

            page.AddContent(content, false);
            PDFVPage vpage = m_reader.getLayout().vGetPage(0);
            m_reader.getLayout().vRenderSync(vpage);

            content.Destroy();
            page.Close();

Please Log in or Create an account to join the conversation.

how to use DrawText for multiline text 2 years 10 months ago #10024

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 846
  • Karma: 43
  • Thank you received: 12
plz try string like "line1 \n line2."

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum