PDF to Markdown Converter That Keeps Images

How to convert a PDF to Markdown while keeping images: extract each figure, link it with a relative path, and check the result before you publish.

If your PDF has diagrams, charts, or screenshots, a plain text conversion usually drops them or leaves blank gaps in the Markdown file. Writers moving research notes, technical documentation, or course material into a Markdown site run into this often. Many PDF to Markdown guides focus on headings and paragraphs and say little about pictures.

This guide shows you how to get a Markdown file where every figure is saved as an image file and linked from the right place in the text. You will need the PDF, an empty folder for the output, and a Markdown preview tool to check the result. Each step explains why it matters, so you can adapt the method to your own files.

OmniDoc can help with two parts of the workflow: its PDF editor can OCR scanned PDFs and export to Word, and its document translation accepts Markdown files. OmniDoc does not list a direct PDF to Markdown export, so the image extraction and linking below use general methods that work with any converter.

Can a PDF to Markdown converter keep images? The short answer

Yes, if the conversion saves each picture as its own image file and writes a Markdown image link that points to that file. Markdown cannot hold a PDF page inside the text, so the images have to live beside the .md file. The table below shows what to do in common situations.

Your situationWhat to doWhy
The PDF has selectable text and embedded figuresExtract each figure as a PNG or JPEG and link it with a relative pathMarkdown needs an image file to point to, and the text can stay as text
The PDF is scannedRun OCR first, then convert the text layerWithout OCR, the converter only sees page pictures, so the text stays locked in images
The figures are line drawings or charts with small labelsExport at high resolution, and use PNG for sharp linesCompressed or low-resolution figures lose the small labels
You need to edit figures or captions before writing MarkdownExport the PDF to Word first, then work from that copyWord is easier to edit, and the original PDF stays untouched
You will publish the Markdown to a website or repositoryKeep the images folder beside the .md file and upload bothImage links break if the files are separated or renamed

Before you start

Check these points before you run any conversion. Each one prevents a common problem later.

  • Find out whether the PDF has a text layer. Open the PDF and try to select a line of text. If you can highlight it, the text is real and the converter can read it. If you cannot, the file is probably scanned, and you need OCR first.
  • Decide where the Markdown file will live. Relative image paths depend on folder structure. If the .md file moves to another folder later, the links will break unless the images folder moves with it.
  • Choose an image format. PNG keeps sharp edges and small text in diagrams. JPEG works well for photographs and makes smaller files. Pick one format for the whole document so the output is consistent.
  • Keep the original PDF untouched. Work on a copy. If a conversion goes wrong, you can start again without losing the source.
  • Confirm you have permission to reuse the figures. If the PDF belongs to someone else, check the license before you publish the extracted images on a public site.

Converting a PDF to Markdown with images, step by step

  1. Sort out the PDF type. Use the selection test from the checklist above. Digital PDFs can skip OCR, and scanned PDFs need it before anything else.
  2. Run OCR on scanned pages. Open the PDF in the OmniDoc desktop client, use its OCR feature on the scanned pages, and save a copy. The copy now has a text layer that a converter can read.
  3. Export to Word if you need to edit first. If captions, figure numbers, or table layouts need cleanup, use the PDF editor's export to Word. Make those fixes in the Word file, then convert that file to Markdown.
  4. Extract the images into one folder. Use a general-purpose converter or a short script that saves each embedded picture into an images folder. Name the files in order, such as figure-01.png and figure-02.png, so they are easy to link and check.
  5. Convert the text to Markdown. Let the converter write headings, paragraphs, and lists. Where a figure sits in the text, leave a placeholder, such as a line that says FIGURE 1, so you know where to insert the link.
  6. Replace each placeholder with an image link. Start the link with an exclamation mark, then put the alt text in square brackets and the relative path in parentheses. For Figure 1, the alt text is the caption from the PDF and the path points to the file in your images folder, such as images/figure-01.png.
  7. Place the .md file beside the images folder. Keep the folder structure exactly as you planned it. Do not rename the folder after you write the links.
  8. Preview the Markdown file. Open the .md file in a Markdown preview tool from the same folder. If every figure loads and sits in the right place, the output is ready to check in detail.

Check the result

Once the Markdown file is ready, check the pieces that conversion often gets wrong. Work through the table, and fix each problem before you publish.

CheckHow to see itIf it's wrong
Every figure appearsScroll the preview and compare each figure with the PDF pageRe-extract the missing figure, or check whether it was drawn as vector art instead of an embedded picture
Image paths resolveOpen the .md file from its own folder and confirm each picture loadsFix the folder name or path, and keep the path relative
Figures sit near the right textCompare the Markdown and the PDF side by sideMove the image link to the paragraph where the PDF places the figure
Figure quality is readableZoom in on the smallest labels in each figureRe-export at higher resolution, and switch to PNG for line drawings
Captions and numbers matchCheck figure numbers and captions against the PDFCorrect them by hand, since converters often misread numbering

OCR and conversion can misread characters, especially in equations, code, and numbers. Compare any important content with the original PDF before you publish, and rebuild tables and equations by hand when the output looks wrong.

❓ FAQ

1. Why do my images show as broken links in the Markdown preview?

The path is usually wrong. Check that the images folder sits in the same location as the .md file, and that the file names in the link match the names on disk exactly, including capitals and extensions.

2. Will the images still work after I upload the Markdown to a website?

Only if you upload the images folder too and keep the relative paths intact. If your site hosts images somewhere else, replace each relative path with the full image URL.

3. Can OmniDoc export a PDF directly to Markdown?

OmniDoc's PDF editor exports to Word, Excel, and PowerPoint, and its document translation accepts Markdown files. A direct PDF to Markdown export is not among its listed features, so use the extraction and linking steps in this guide.

4. What should I do with tables and equations?

Compare them with the PDF after conversion. Rebuild simple tables by hand in Markdown, and check every equation against the original, because converters can drop symbols or change their layout.

5. Can I translate the Markdown file after I convert it?

Yes. OmniDoc's document translation accepts Markdown input and can output a bilingual version side by side or a translation-only version, with pictures kept. Run the translation on a copy, then check the key terms against the source.

📝 Summary

A PDF to Markdown converter keeps images when each figure is extracted as its own file and linked with a relative path. Check whether your PDF has a text layer, run OCR when it does not, and keep the .md file and images folder together. Then preview every figure and caption before you publish.

Open OmniDoc to convert and tidy up your documents

Updated 2026-11-04