const HEADER_HEIGHT = 392_471
keep the right aspect ratio: SLIDE_WIDTH / SLIDE_HEIGHT = IMAGE_WIDTH / IMAGE_HEIGHT
const IMAGE_WIDTH = 8_446_273
const SLIDE_HEIGHT = 5_143_500
Measurements in OOXML are made in English Metric Units (EMUs) where 1 inch = 914,400 EMUs The intent is to have a measurement unit that doesn't require floating points when dealing with centimeters, inches, points (DPI). Office Open XML (OOXML) http://officeopenxml.com/prPresentation.php https://startbigthinksmall.wordpress.com/2010/01/04/points-inches-and-emus-measuring-units-in-office-open-xml/
const SLIDE_WIDTH = 9_144_000
var APP_XML string
var CONTENT_TYPES_XML string
var CORE_XML string
var PPTX_TEMPLATE []byte
var PRESENTATION_XML string
var RELS_PRESENTATION_XML string
var RELS_SLIDE_XML string
var SLIDE_XML string
func Validate(pptxContent []byte, nSlides int) error
type AppXmlContent struct { SlideCount int TitlesOfPartsCount int Titles []string D2Version string }
type BoardTitle struct { LinkID string Name string BoardID string LinkToSlide int }
type ContentTypesXmlContent struct { FileNames []string }
type CoreXmlContent struct { Title string Subject string Creator string Description string LastModifiedBy string Created string Modified string }
type Link struct { ID string Index int Top int Left int Width int Height int SlideIndex int ExternalUrl string Tooltip string }
type Presentation struct { Title string Description string Subject string Creator string // D2Version can't have letters, only numbers (`[0-9]`) and `.` // Otherwise, it may fail to open in PowerPoint D2Version string Slides []*Slide // contains filtered or unexported fields }
func NewPresentation(title, description, subject, creator, d2Version string, includeNav bool) *Presentation
func (p *Presentation) AddSlide(pngContent []byte, titlePath []BoardTitle) (*Slide, error)
func (p *Presentation) SaveTo(filePath string) error
type PresentationSlideXmlContent struct { ID int RelationshipID string }
type PresentationXmlContent struct { SlideWidth int SlideHeight int Slides []PresentationSlideXmlContent }
type RelsPresentationSlideXmlContent struct { RelationshipID string FileName string }
type RelsPresentationXmlContent struct { Slides []RelsPresentationSlideXmlContent }
type RelsSlideXmlContent struct { FileName string RelationshipID string Links []RelsSlideXmlLinkContent }
type RelsSlideXmlLinkContent struct { RelationshipID string ExternalUrl string SlideIndex int }
type Slide struct { BoardTitle []BoardTitle Links []*Link Image []byte ImageId string ImageWidth int ImageHeight int ImageTop int ImageLeft int ImageScaleFactor float64 }
func (s *Slide) AddLink(link *Link)
type SlideLinkXmlContent struct { ID int RelationshipID string Name string Action string Left int Top int Width int Height int }
type SlideXmlContent struct { Title string TitlePrefix []SlideXmlTitlePathContent Description string HeaderHeight int ImageID string ImageLeft int ImageTop int ImageWidth int ImageHeight int Links []SlideLinkXmlContent }
type SlideXmlTitlePathContent struct { Name string RelationshipID string }