Page 1 of 1

Can a PDF be placed in a RichView?

Posted: Mon Oct 28, 2019 9:25 pm
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)?

Re: Can a PDF be placed in a RichView?

Posted: Tue Oct 29, 2019 2:01 pm
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.