Skip image

Use SkipImagesStrategy when you want to convert a document to Markdown without exporting any images. Image references will be omitted from the output.

Using static method

from groupdocs.markdown import MarkdownConverter, ConvertOptions, SkipImagesStrategy

def skip_images_static():
    """Convert a PDF to Markdown while skipping all images."""

    # Step 1: Configure the skip-images strategy to omit images from output
    options = ConvertOptions()
    options.image_export_strategy = SkipImagesStrategy()

    # Step 2: Convert using keyword argument for options
    MarkdownConverter.to_file("business-plan.pdf", "skip-images-static.md", convert_options=options)

if __name__ == "__main__":
    skip_images_static()

business-plan.pdf is sample file used in this example. Click here to download it.

**HOME**** ****BASED**** ****PROFESSIONAL**** **

**SERVICES**** **

***Business****** ******Plan****** ***

**TABLE**** ****OF**** ****CONTENTS**** **

Introduction  3

...

Download full output

**HOME BASED PROFESSIONAL SERVICES *Business Plan* TABLE OF CONTENTS** 

Introduction  3

1. Executive Summary  5
1. Company Overview  6
1. Business Description  7
1. Market Analysis  8
1. Operating Plan  10
1. Marketing and Sales Plan  11
[TRUNCATED]

Download full output

Using instance API

from groupdocs.markdown import MarkdownConverter, ConvertOptions, SkipImagesStrategy

def skip_images_instance():
    """Skip all images during conversion using the instance API."""

    # Step 1: Configure the skip-images strategy
    options = ConvertOptions()
    options.image_export_strategy = SkipImagesStrategy()

    # Step 2: Open the document with a context manager
    with MarkdownConverter("business-plan.pdf") as converter:
        # Step 3: Convert using keyword argument for options
        converter.convert("skip-images-instance.md", convert_options=options)

if __name__ == "__main__":
    skip_images_instance()

business-plan.pdf is sample file used in this example. Click here to download it.

**HOME**** ****BASED**** ****PROFESSIONAL**** **

**SERVICES**** **

***Business****** ******Plan****** ***

**TABLE**** ****OF**** ****CONTENTS**** **

Introduction  3

...

Download full output

**HOME BASED PROFESSIONAL SERVICES *Business Plan* TABLE OF CONTENTS** 

Introduction  3

1. Executive Summary  5
1. Company Overview  6
1. Business Description  7
1. Market Analysis  8
1. Operating Plan  10
1. Marketing and Sales Plan  11
[TRUNCATED]

Download full output