Ziv Barber
unread,Jul 23, 2013, 8:04:52 PM7/23/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to node-of...@googlegroups.com
I do need to update the documentation.
Please check also the example code in examples/make_pptx.js
Interesting properties for both addShape and addText:
'color' - declaring the color for the text itself.
'fill' - declaring the color of the background.
'line' - right now declaring the color of the border line.
cy - vertical size of the object
cx - horizontal size of the object
y - vertical position
x - horizontal position
You can use '%' for cy and cx when 100% = the total size of the slide.
To center your object in either vertical or horizontal, pass 'c' as either 'y' or 'x'.
As for drawing lines:
line_head - the shape of the arrow on the "head" point of the line. Example: "triangle" or "stealth".
line_tail - the shape of the arrow on the "tail" point of the line.
flip_vertical: true - use this to flip the line vertical. For example to draw a line from bottom-left to top-right instead of the normal top-left to bottom-right.
The 'line' property effecting the color of the line.
Please note that ALL the color properties can be either a string to just enter the color code (for example "ffffff" for white color) or an object which will allow in future versions to support all the color options of PowerPoint and not just solid color.
Right now the only supported color option when passing object as the color:
{ type: 'solid', color: '<color code>' }
addImage supporting jpeg, gif, bmp, png and should support also all the image formats supported by Office but I didn't checked it yet.
A new method called addSP will support more then one paragraph in a single text object. This feature is needed to support lists, etc.
As for placing graphs inside PPTX:
Right now you can draw it yourself using addShape/addText but I'm going to allow using embedded Excel files (this is how PowerPoint really implementing graphs).
I'm also designing another way to use Officegen instead of calling the API directly - more on that later.