Can a PDF be placed in a RichView?

General TRichView support forum. Please post your questions here
Post Reply
VicFan
Posts: 11
Joined: Sun Jul 28, 2019 8:34 pm

Can a PDF be placed in a RichView?

Post by VicFan »

I see you have AddPicture() and InsertRTFFromFileEd() available, but is there any way to draw other formats on the canvas, mainly PDF, but also DOC and DOCX formats (even if the PC has to run Acrobat or Microsoft Word or some other library that you recommend to actually interpret the file)?
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Can a PDF be placed in a RichView?

Post by Sergey Tkachenko »

I do not think that PDF can be imported correctly in TRichView.
PDF page is more like a metafile: it contains text, pictures and other objects each on specified coordinates. While in TRichView text and pictures are positioned automatically in a text flow (there is possibility to add content in text boxes which can be positioned at the specified coordinates, but it is inefficient to put each text line in its own text box).

As for DocX import, you can use MS Office converters ( https://www.trichview.com/resources/thi ... erters.exe ) with TRVOfficeConverter component. The results are not very good, though, converters may lose some text formatting.
Post Reply