Git Product home page Git Product logo

gopptx's Introduction

pptx

A Golang library for replacing text or image in pptx file

For the method of processing pptx files, refer to https://github.com/nguyenthenguyen/docx

About

The library replacing text or image in slides,Supported image formats are "png" "jepg" "jpg",Other formats haven't been tested yet. Maybe they can

delete password only document edit password

the theme rename

test file password is 123456

Examples

package main

import (
	"fmt"
	"github.com/moipa-cn/pptx"
)

func main() {
	p,_:=pptx.ReadPowerPoint("./test.pptx")
	img := "./test.jpg"
	p.DeletePassWord()
	p.ReplaceSlideContent("A Golang library", "welcome", -1)
	p.ReplaceNotesSlideContent("TEST NotesSlides", "New NotesSlide", -1)
	p.ReplaceThemeName("ThemeName", "NewThemeName", -1)
	//This slide is not really deleted, it will be moved to the last page and empty the content
	err := p.DeleteSlide(-1)
	if err != nil {
		fmt.Println(err)
	}
	p.ReplaceImage(img, 1)
	p.WriteToFile("./test_1.pptx")
}

Todo

  1. ppt to pptx
  2. pptx to img
  3. pptx to pdf
  4. add slide
  5. replace theme

gopptx's People

Contributors

moipa-cn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.