From 53ed9bba32a19488f9a552c099edaf5c4ca17a99 Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Mon, 14 Sep 2020 06:28:17 +1000 Subject: [PATCH] docs: Fix simple typo, embdded -> embedded There is a small typo in docs/index.rst, docxtpl/__init__.py. Should read `embedded` rather than `embdded`. --- docs/index.rst | 2 +- docxtpl/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 99a82fd..dd60994 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -311,7 +311,7 @@ Instead, you should use zipname replacement:: The zipname is the one you can find when you open docx with WinZip, 7zip (Windows) or unzip -l (Linux). The zipname starts with "word/embeddings/". Note that the file to be replaced is renamed by MSWord, so you have to guess a little bit... -This works for embdded MSWord file like Excel or PowerPoint file, but won't work for others like PDF, Python or even Text files : +This works for embedded MSWord file like Excel or PowerPoint file, but won't work for others like PDF, Python or even Text files : For these ones, MSWord generate an oleObjectNNN.bin file which is no use to be replaced as it is encoded. diff --git a/docxtpl/__init__.py b/docxtpl/__init__.py index a3ab3c7..aa1b1ee 100644 --- a/docxtpl/__init__.py +++ b/docxtpl/__init__.py @@ -450,7 +450,7 @@ class DocxTemplate(object): self.pic_to_replace[embedded_file] = fh.read() def replace_embedded(self, src_file, dst_file): - """Replace one embdded object by another one into a docx + """Replace one embedded object by another one into a docx This has been done mainly because it is not possible to add images in docx header/footer. @@ -477,7 +477,7 @@ class DocxTemplate(object): the template : thus replace_embedded() cannot be used as CRC is not the same as the original file. - This method works for embdded MSWord file like Excel or PowerPoint file, + This method works for embedded MSWord file like Excel or PowerPoint file, but won't work for others like PDF, Python or even Text files : For these ones, MSWord generate an oleObjectNNN.bin file which is no use to be replaced as it is encoded.