Have a .rtf document that I would like to save as .pdf

Posted by: john.burke on 29 August 2018, 11:59 am EST

    • Post Options:
    • Link

    Posted 29 August 2018, 11:59 am EST

    I am using WinForms and the C1 controls with great success. I have one case where I need to convert a .rtf file to .pdf. Can someone give a sample of what controls to use for this using ComponentOne WinForms controls?

    Thanks,

    John

  • Posted 30 August 2018, 12:53 am EST

    Hi John!

    You can use C1PdfDocument control, to convert .rtf file to .pdf. Here is the link to product documentation:

    http://help.grapecity.com/componentone/NetHelp/c1pdf/webframe.html#keyfeatures.html

    Below are some links that should be useful to you while dealing with rtf in the control:

    1. http://help.grapecity.com/componentone/NetHelp/c1pdf/webframe.html#renderingrtftext.html

    2. http://help.grapecity.com/componentone/NetHelp/c1pdf/webframe.html#drawingrtftext.html


    Also, you can find FlowRtf sample in ComponentOne Samples at this location: Documents\ComponentOne Samples\WinForms\C1Pdf\CS\FlowRtf

    Regards,

    Meenakshi

  • Posted 30 August 2018, 4:40 pm EST

    I found the FlowRtf sample and implemented it. It did not work so well because my rtf document is 3 pages but the sample creates a Rect that is only 1 page.

    The PDF Document has a nice feature where you can load a pdf and then export each page to a .tif or other image type.

    I kind of need something like that for the .rtf document.

  • Posted 31 August 2018, 6:05 am EST

    On running FlowRtf sample at my end, all the content of .rtf file is displayed in one rectangle. This rectangle is, actually, a RichTextBox instance.

    When ‘Show Pdf…’ button is clicked then a PDF file is opened. In this PDF, content appears on four pages (same as the original .rtf file).

    Here, the default selected document is FlowRtf.Eula.rtf.

    Further, there is no other way to achieve the requested behaviour in C1Pdf.

    • Meenakshi
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels