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
fromgroupdocs.markdownimportMarkdownConverter,ConvertOptions,SkipImagesStrategydefskip_images_static():"""Convert a PDF to Markdown while skipping all images."""# Step 1: Configure the skip-images strategy to omit images from outputoptions=ConvertOptions()options.image_export_strategy=SkipImagesStrategy()# Step 2: Convert using keyword argument for optionsMarkdownConverter.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
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]
fromgroupdocs.markdownimportMarkdownConverter,ConvertOptions,SkipImagesStrategydefskip_images_instance():"""Skip all images during conversion using the instance API."""# Step 1: Configure the skip-images strategyoptions=ConvertOptions()options.image_export_strategy=SkipImagesStrategy()# Step 2: Open the document with a context managerwithMarkdownConverter("business-plan.pdf")asconverter:# Step 3: Convert using keyword argument for optionsconverter.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
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]