Skip to content

p0rygon/generate_document

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

generate_document

This is a tool generating a PDF document from a DOCX document.

Usage

How to import

from generate_document import replace_docx

How to use

replace_docx(src, dest, replace_list)

src is path of the template DOCX file\n

dest is path of the output PDF file\n

replace_list is the list of texts you want to change... like below.

[['original text 1', 'new text 1'], ['original text 2', 'new textg 2'], ...]

※ Caution : path of template file must be full-path like 'C:\Users...\template.docx'

Dependency

  • python-docx
  • MS Office Word on Windows
  • pywin32 (for module 'wincom32')

About

generating PDF document from DOCX file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages