In this video, we will look at handling document‑based web media.
One of the most common tasks we need to perform with document‑based web
media is taking PDF files and converting them into a format such as
Microsoft Word so we can edit the document.
One simple library for converting text‑based PDFs is
pdf2docx. After installing the library using pip 3, we can
convert from PDF to DOC very easily.
The conversion process itself is done by calling the parse method and
passing in the input PDF name and the required output Word file name.
The start and end parameters refer to the page numbers, and this
enables you to start from a subset of the data within the PDF if you
need this level of precision.