Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

Handling Microsoft PowerPoint file format: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=Handling Microsoft PowerPoint (file format)=
[[Category:Developing_with_Qt]]<br />[toc align_right=&quot;yes&amp;quot; depth=&quot;2&amp;quot;]


This page discusses various available options for working with [http://en.wikipedia.org/wiki/Microsoft_PowerPoint#File_formats Microsoft PowerPoint] ''[en.wikipedia.org]'' documents in your Qt application. Please also read the general considerations outlined on the [[Handling Document Formats]] page.
= Handling Microsoft PowerPoint (file format) =


''<font size="0.9em"><font color="#335">Note that this information is collaboratively collected by the community, with no promise of completeness or correctness. In particular, use your own research and judgment when evaluating third-party libraries or tools!</font></font>''
This page discusses various available options for working with &quot;Microsoft PowerPoint&amp;quot;:http://en.wikipedia.org/wiki/Microsoft_PowerPoint#File_formats documents in your Qt application. Please also read the general considerations outlined on the [[Handling_Document_Formats | Handling Document Formats]] page.


''<font size="0.9em"><font color="#530"><span class="caps">NOTE</span>: This page is a stub. Please help expanding it.</font></font>''
p{width:60%;border:solid 1px #99a;background:#eef;color:#335;padding:2pt 4pt;font-size:0.9em;line-height:150%;font-style:italic}. Note that this information is collaboratively collected by the community, with no promise of completeness or correctness. In particular, use your own research and judgment when evaluating third-party libraries or tools!
 
p{border:dashed 1px #a94;background:#fbf3dd;color:#530;padding:2pt 4pt;font-size:0.9em;line-height:150%;font-style:italic}. NOTE: This page is a stub. Please help expanding it.


One needs to distinguish between two different formats (this page deals with both of them):
One needs to distinguish between two different formats (this page deals with both of them):


{| class="infotable line" style="width: 95%; margin-left: 2.5%"
table{width:95%;margin-left:2.5%}.<br />| |''. Legacy &quot;PowerPoint Presentation&amp;quot; format |''. &quot;Office Open XML Presentation&amp;quot; format |<br />| ''classification:'' | binary | XML-based |<br />| ''main filename extension:'' | {font:1em monospace}.ppt | {font-family:monospace}.pptx |<br />| ''main internet media type:'' | {font:0.9em monospace}application/vnd.ms-powerpoint | {font:0.9em monospace}application/vnd.openxmlformats-officedocument.presentationml.presentation |<br />| ''native format of PowerPoint:'' | until PowerPoint 2003 | since PowerPoint 2007 |
|
! Legacy “PowerPoint Presentation” format
! “Office Open <span class="caps">XML</span> Presentation” format
|-
| ''classification:''
| binary
| <span class="caps">XML</span>-based
|-
| ''main filename extension:''
| <span style="font: 1em monospace">.ppt</span>
| <font face="monospace">.pptx</font>
|-
| ''main internet media type:''
| <span style="font: 0.9em monospace">application/vnd.ms-powerpoint</span>
| <span style="font: 0.9em monospace">application/vnd.openxmlformats-officedocument.presentationml.presentation</span>
|-
| ''native format of PowerPoint:''
| until PowerPoint 2003
| since PowerPoint 2007
|}


==Reading / Writing==
== Reading / Writing ==


===Using PowerPoint itself===
=== Using PowerPoint itself ===


If you are exclusively targeting the Windows platform and Microsoft PowerPoint will be installed on all target machines, then you can use [http://doc.qt.io/qt-4.8/activeqt.html Qt’s ActiveX framework] ''[qt.io]'' to access PowerPoint’s .ppt and .pptx processing functionality through <span class="caps">OLE</span> automation. For an introductory code example (and a way to list the <span class="caps">API</span> provided by the PowerPoint <span class="caps">COM</span> object), consult [[Using ActiveX Object in QT|this how to]] ''[qt.io]'' (focuses on Microsoft Excel, but it works the same way for PowerPoint).
If you are exclusively targeting the Windows platform and Microsoft PowerPoint will be installed on all target machines, then you can use &quot;Qt’s ActiveX framework&amp;quot;:http://doc.qt.io/qt-4.8/activeqt.html to access PowerPoint’s .ppt and .pptx processing functionality through OLE automation. For an introductory code example (and a way to list the API provided by the PowerPoint COM object), consult &quot;this how to&amp;quot;:http://wiki.qt.io/Using_ActiveX_Object_in_QT (focuses on Microsoft Excel, but it works the same way for PowerPoint).


{| class="infotable line" style="width: 95%; margin-left: 2.5%"
table{width:95%;margin-left:2.5%}.<br />| |''. DLL file name |''. COM object name |''. platforms |''. license |<br />| &quot;'''Microsoft PowerPoint'''&quot;:http://office.microsoft.com/powerpoint/ | ? | {font-family:monospace}PowerPoint.Application | Windows | {color:#458}commercial |
|
! <span class="caps">DLL</span> file name
! <span class="caps">COM</span> object name
! platforms
! license
|-
|
[http://office.microsoft.com/powerpoint/ '''Microsoft PowerPoint'''] ''[office.microsoft.com]''
| ?
| <font face="monospace">PowerPoint.Application</font>
| Windows
| <font color="#458">commercial</font>
|}


===Using independent parser/writer libraries===
=== Using independent parser/writer libraries ===




{| class="infotable line" style="width: 95%; margin-left: 2.5%"
table{width:95%;margin-left:2.5%}.<br />| |''. API |''. {font-family:monospace}.ppt |''. {font-family:monospace}.pptx |''. reading |''. writing |''. platforms |_. license |<br />| &quot;'''…'''&quot;:http://… | … | … | … | … | … | … | … |
|
! <span class="caps">API</span>
! <font face="monospace">.ppt</font>
! <font face="monospace">.pptx</font>
! reading
! writing
! platforms
! license
|-
|
[http:// '''…''']
| …
| …
| …
| …
| …
| …
| …
|}


===Using manual <span class="caps">XML</span> processing===
=== Using manual XML processing ===


Files using the <span class="caps">XML</span>-based (.pptx) format could be processed using Qt’s <span class="caps">XML</span> handling classes (see [[Handling Document Formats]]).
Files using the XML-based (.pptx) format could be processed using Qt's XML handling classes (see [[Handling_Document_Formats | Handling Document Formats]]).




===Using batch conversion tools===
=== Using batch conversion tools ===




==Rendering==
== Rendering ==


===Using PowerPoint itself===
=== Using PowerPoint itself ===


''<font size="0.9em"><font color="#530"><span class="caps">TODO</span>: If you know whether PowerPoint’s <span class="caps">COM</span> object (see above) supports rendering individual pages from a .ppt/.pptx presentation to images (e.g. for thumbnails), please edit this section.</font></font>''
p{border:dashed 1px #a94;background:#fbf3dd;color:#530;padding:2pt 4pt;font-size:0.9em;line-height:150%;font-style:italic}. TODO: If you know whether PowerPoint's COM object (see above) supports rendering individual pages from a .ppt/.pptx presentation to images (e.g. for thumbnails), please edit this section.




==Interactive Viewing==
== Interactive Viewing ==


===Using PowerPoint itself===
=== Using PowerPoint itself ===


''<font size="0.9em"><font color="#530"><span class="caps">TODO</span>: If you know whether PowerPoint provides a “viewer” ActiveX control that can be embedded in a Qt application through ActiveQT, please fill out this section (include links to relevant resources!)</font></font>''
p{border:dashed 1px #a94;background:#fbf3dd;color:#530;padding:2pt 4pt;font-size:0.9em;line-height:150%;font-style:italic}. TODO: If you know whether PowerPoint provides a &quot;viewer&amp;quot; ActiveX control that can be embedded in a Qt application through ActiveQT, please fill out this section (include links to relevant resources!)




===Manual solution===
=== Manual solution ===




<font color="#fff">.</font>
p{color:#fff;border-bottom:solid 1px #ccc}. .


==See Also==
== See Also ==


* [[Handling Document Formats]]
* [[Handling_Document_Formats | Handling Document Formats]]
** ''other Microsoft Office formats:''
** ''other Microsoft Office formats:''
*** [[Handling Microsoft Word file format|Microsoft Word]]
*** [[Handling_Microsoft_Word_(file_format) | Microsoft Word]]
*** [[Handling Microsoft Excel file format|Microsoft Excel]]
*** [[Handling_Microsoft_Excel_(file_format) | Microsoft Excel]]
** ''other “Presentation” document formats:''
** ''other &quot;Presentation&amp;quot; document formats:''
*** [[Handling OpenDocument Presentation|OpenDocument Presentation]]
*** [[Handling_OpenDocument_Presentation | OpenDocument Presentation]]
 
===Categories:===
 
* [[:Category:Developing with Qt|Developing_with_Qt]]

Revision as of 09:32, 24 February 2015


[toc align_right="yes&quot; depth="2&quot;]

Handling Microsoft PowerPoint (file format)

This page discusses various available options for working with "Microsoft PowerPoint&quot;:http://en.wikipedia.org/wiki/Microsoft_PowerPoint#File_formats documents in your Qt application. Please also read the general considerations outlined on the Handling Document Formats page.

p{width:60%;border:solid 1px #99a;background:#eef;color:#335;padding:2pt 4pt;font-size:0.9em;line-height:150%;font-style:italic}. Note that this information is collaboratively collected by the community, with no promise of completeness or correctness. In particular, use your own research and judgment when evaluating third-party libraries or tools!

p{border:dashed 1px #a94;background:#fbf3dd;color:#530;padding:2pt 4pt;font-size:0.9em;line-height:150%;font-style:italic}. NOTE: This page is a stub. Please help expanding it.

One needs to distinguish between two different formats (this page deals with both of them):

table{width:95%;margin-left:2.5%}.
| |. Legacy "PowerPoint Presentation&quot; format |. "Office Open XML Presentation&quot; format |
| classification: | binary | XML-based |
| main filename extension: | {font:1em monospace}.ppt | {font-family:monospace}.pptx |
| main internet media type: | {font:0.9em monospace}application/vnd.ms-powerpoint | {font:0.9em monospace}application/vnd.openxmlformats-officedocument.presentationml.presentation |
| native format of PowerPoint: | until PowerPoint 2003 | since PowerPoint 2007 |

Reading / Writing

Using PowerPoint itself

If you are exclusively targeting the Windows platform and Microsoft PowerPoint will be installed on all target machines, then you can use "Qt’s ActiveX framework&quot;:http://doc.qt.io/qt-4.8/activeqt.html to access PowerPoint’s .ppt and .pptx processing functionality through OLE automation. For an introductory code example (and a way to list the API provided by the PowerPoint COM object), consult "this how to&quot;:http://wiki.qt.io/Using_ActiveX_Object_in_QT (focuses on Microsoft Excel, but it works the same way for PowerPoint).

table{width:95%;margin-left:2.5%}.
| |. DLL file name |. COM object name |. platforms |. license |
| "Microsoft PowerPoint":http://office.microsoft.com/powerpoint/ | ? | {font-family:monospace}PowerPoint.Application | Windows | {color:#458}commercial |

Using independent parser/writer libraries

table{width:95%;margin-left:2.5%}.
| |. API |. {font-family:monospace}.ppt |. {font-family:monospace}.pptx |. reading |. writing |. platforms |_. license |
| "":http://… | … | … | … | … | … | … | … |

Using manual XML processing

Files using the XML-based (.pptx) format could be processed using Qt's XML handling classes (see Handling Document Formats).

Using batch conversion tools

Rendering

Using PowerPoint itself

p{border:dashed 1px #a94;background:#fbf3dd;color:#530;padding:2pt 4pt;font-size:0.9em;line-height:150%;font-style:italic}. TODO: If you know whether PowerPoint's COM object (see above) supports rendering individual pages from a .ppt/.pptx presentation to images (e.g. for thumbnails), please edit this section.

Interactive Viewing

Using PowerPoint itself

p{border:dashed 1px #a94;background:#fbf3dd;color:#530;padding:2pt 4pt;font-size:0.9em;line-height:150%;font-style:italic}. TODO: If you know whether PowerPoint provides a "viewer&quot; ActiveX control that can be embedded in a Qt application through ActiveQT, please fill out this section (include links to relevant resources!)

Manual solution

p{color:#fff;border-bottom:solid 1px #ccc}. .

See Also