Lazarus

Programming => General => Topic started by: pixelink on August 26, 2019, 10:12:56 pm

Title: [DONE] Is there a way to View Power Point slides and DOC files??
Post by: pixelink on August 26, 2019, 10:12:56 pm
Is there a way to View Power Point slides and DOC files natively in LAZ WITHOUT OpenURL??
Control or library or and ideas

Both old and or new versions of MS Power Point would be nice
Title: Re: Is there a way to View Power Point slides and DOC files??
Post by: winni on August 26, 2019, 10:38:48 pm
Hi!

There is an article in the wiki but

a) only german
b) from 2012
c) obvious only windows

https://wiki.lazarus.freepascal.org/PowerpointAutomation/de (https://wiki.lazarus.freepascal.org/PowerpointAutomation/de)

Winni
Title: Re: Is there a way to View Power Point slides and DOC files??
Post by: pixelink on August 27, 2019, 01:07:25 am
Hi!

There is an article in the wiki but

a) only german
b) from 2012
c) obvious only windows

https://wiki.lazarus.freepascal.org/PowerpointAutomation/de (https://wiki.lazarus.freepascal.org/PowerpointAutomation/de)

Winni

If I think I read it right (I translated it)
This is OLE.. which means it can open and save data in a PowerPoint file itself.
And, it doesn't open it natively... meaning I was hoping that it can open it inside a control in LAZ, not using Active X or opening a file outside the app.

So, this won't be much help... but thanks for the effort.
Title: Re: Is there a way to View Power Point slides and DOC files??
Post by: Leledumbo on August 27, 2019, 08:42:37 pm
Is there a way to View Power Point slides and DOC files natively in LAZ WITHOUT OpenURL??
Control or library or and ideas

Both old and or new versions of MS Power Point would be nice
OLE embedding is the closest you can get. Writing native viewer component for these file formats is overkill, it's just like writing another LibreOffice or WPS Office or StarOffice or any other office suites claiming for compatibility with MS Office (and I believe you know the compatibility sutation with those suites I've mentioned).
Title: Re: Is there a way to View Power Point slides and DOC files??
Post by: wp on August 27, 2019, 09:33:32 pm
OLE embedding is the closest you can get. Writing native viewer component for these file formats is overkill, it's just like writing another LibreOffice or WPS Office or StarOffice or any other office suites claiming for compatibility with MS Office (and I believe you know the compatibility sutation with those suites I've mentioned).
I don't think that it's overkill. We already have fpvectorial which provides the basic infrastructure for the tree of objects contained in the slides. What only is needed is a reader for the pptx format. I opened one: like Excel's xlsx or Word's docx this is a renamed zip file of a series of xml files; the slides, for example, are found in folder pptx/slides as files slide1.xml, slide2.xml, etc. I think once the details of fpvectorial are understood it is relatively easy to read the basic information contained, of course, without the transition and effect gimmicks. All we need is a motivated developer who dives into the details...
Title: Re: Is there a way to View Power Point slides and DOC files??
Post by: Leledumbo on August 27, 2019, 09:44:30 pm
I think once the details of fpvectorial are understood it is relatively easy to read the basic information contained, of course, without the transition and effect gimmicks. All we need is a motivated developer who dives into the details...
This is the diifficult part and often the most incompatible part (along with the layout) with MS Office. It's still sound overkill unless you really want 0 3rd part dependency that much, like how fpspreadsheet has progressed. By that time, we should be ready to make an office suite ourselves ;) but I'm not really into that.
Title: Re: Is there a way to View Power Point slides and DOC files??
Post by: trev on August 28, 2019, 02:56:51 am
For pesky Word .doc files I use antiword (Windows, macOS, FreeBSD and various other Unix derivatives) - C source available (http://www.winfield.demon.nl/ & https://opensourceprojects.eu/p/antiword/code/ci/b93da7ab51a5733c30aa36b359234ca29f1c42ae/tree/). It does not handle the evil .docx files.
TinyPortal © 2005-2018