Aspose.pdf.Heading text went to out of the page - DOM pdf approach

389 views Asked by At

I am trying to build list text using the heading objects. While entering the text into heading text, the list text is went to out of the page.

        Document pdfDoc = new Document();
        pdfDoc.PageInfo.Width = 612.0;
        pdfDoc.PageInfo.Height = 792.0;
        pdfDoc.PageInfo.Margin = new MarginInfo();
        pdfDoc.PageInfo.Margin.Left = 72;
        pdfDoc.PageInfo.Margin.Right = 72;
        pdfDoc.PageInfo.Margin.Top = 72;
        pdfDoc.PageInfo.Margin.Bottom = 72;

        Page pdfPage = pdfDoc.Pages.Add();
        pdfPage.PageInfo.Width = 612.0;
        pdfPage.PageInfo.Height = 792.0;
        pdfPage.PageInfo.Margin = new MarginInfo();
        pdfPage.PageInfo.Margin.Left = 72;
        pdfPage.PageInfo.Margin.Right = 72;
        pdfPage.PageInfo.Margin.Top = 72;
        pdfPage.PageInfo.Margin.Bottom = 72;

        Heading heading = new Heading(0);

        heading.Text = "(a) Text contends that the trial incorrectly completed the Support Worksheet that accompanied the trial. Calculation of the resulting Calculation of the resulting modified child support amount.";

        pdfPage.Paragraphs.Add(heading);
        string outFile = "D:/Text_Xhtmls/Heading.pdf";

Please find the image for your reference- image

0

There are 0 answers