CD_PPTX - Power Point XML (cdpptx.h)

This driver allows the generation of a PPTX file, the Office Open XML File Format. It is an ISO/IEC public standard, see ISO/IEC 29500-1:2012 for more information. See also Working with PresentationML documents (Open XML SDK) at Microsoft Developer Network. (since 5.10)

The driver uses the LodePNG module by Lode Vandevenne and the MiniZIP module by Gilles Vollant. Both use licenses compatible with the CD license.


The file is created by calling function cdCreateCanvas(CD_PPTX, Data). The Data parameter is a string that must contain the filename and the canvas dimensions, in the following format:

"filename [width_mmxheight_mm] [resolution]" or in C "%s %gx%g %g"

Only the parameter filename is required. The filename must be inside double quotes (") if it has spaces. width_mm and height_mm are provided in millimeters (note the lowercase "x" between them), and their default value in mm is 297mm x 210mm (size of an A4 page in landscape) for both dimensions. Resolution is the number of pixels per millimeter; its default value is "11.81 pixels/mm" (300 DPI). Width, height and resolution are real values. PPTX has some restrictions for the canvas size in mm, the minimum value is 25mm and the maximum value is 1422mm.

Any amount of such canvases may exist simultaneously. It is important to note that a call to function cdKillCanvas is required to close the file properly.

IMPORTANT: the PPTX format is actually a zip file with a collection of files inside subfolders. During the creation of the file we create a temporary folder structure that later is compressed in a zip file.

Behavior of Functions


  • Play: does nothing, returns CD_ERROR.
  • Flush: changes to a new slide, preserving the previous one.
  • Clear: does nothing.
  • Coordinate System and Clipping

  • UpdateYAxis: the orientation of axis Y is the opposite to its orientation in the CD library.
  • Complex Regions: not supported.
  • Attributes

  • FontDim: is simulated.
  • TextSize: is simulated.
  • WriteMode: does nothing, returns CD_REPLACE.
  • Colors

  • GetColorPlanes: always returns 24.
  • Palette: does nothing.
  • Foreground & Background: accepts the transparency information encoded in the color.
  • Primitives

  • Pixel: does not exist in PPTX, is simulated using a circle with radius=1.
  • Floating point primitives are NOT supported.
  • Client Images

  • GetImageRGB: does nothing.
  • Server Images

  • All functions do nothing.
  • Exclusive Attributes