typora-issues icon indicating copy to clipboard operation
typora-issues copied to clipboard

Support importing embedded media with PDF/pandoc import/export

Open jayjlawrence opened this issue 6 years ago • 2 comments

See #1725 which is incorrectly closed. The issue is IMPORT of DOC to Typora, not EXPORT of Typora to DOC.

You say:

--extract-media is not needed for docx export

If the source format is a binary container (docx, epub, or odt), the media is extracted from the container and> the original filenames are used. Otherwise the media is read from the file system or downloaded, and new filenames are constructed based on SHA1 hashes of the contents. Its means Pandoc will fetch the image automatically. If not work, please upgrade Typora to latest version first.

While this may be true when writing a DOCX file using Pandoc it is not true when generating MD content. The author of Pandoc explicitly states that Pandoc will only write content that is specified when invoking it. So, without they "extract-media" option being explicitly supplied Pandoc will NOT write image files associated to the MD being generated.

You necessarily must add the "--extract-media" option to Typora's invocation of Pandoc when IMPORTING a DOCX file.

This is such a roadblock for me that I even posted a bounty for it! This is a quick-win issue to resolve!

jayjlawrence avatar Jan 11 '19 00:01 jayjlawrence