PDF Conversion Issues

How to Fix Missing CGM Images When Converting HTML to PDF

Steven ParkerSteven Parker Nov 5, 2026 871 views

Question details

The user needs to convert old HTML manuals containing CGM format graphics into PDF documents without losing the images.

How to Fix Missing CGM Images When Converting HTML to PDF
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Converting an older web page or HTML manual to a PDF document.
Observed behavior
The text converts successfully, but the CGM images are missing or fail to render in the final PDF because the converter does not natively support the CGM graphic format.
Before you start

Gather all your original HTML files and the associated CGM image folders into a single working directory. Ensure you have a batch image converter installed that supports the Computer Graphics Metafile (CGM) format, alongside a basic code editor.

Solution 1Recommended

Preprocess CGM Images to PNG or JPEG and Update HTML

Convert the unsupported CGM files into universally supported raster formats like PNG, then update the image links in your HTML code before generating the PDF.

Most modern HTML-to-PDF converters, including Adobe Acrobat, lack native support for older vector formats like CGM. While creating a custom conversion plugin might seem like a direct fix, it is highly impractical and expensive.

The most reliable and cost-effective method is converting the source images first and repointing the HTML tags to the new files.

1
Convert CGM files to standard image formats

Use a batch image conversion tool to convert all your .cgm files into .png or .jpeg formats. PNG is highly recommended to preserve line art and text clarity.

2
Open the HTML manual in a text editor

Use a code editor like Notepad++, VS Code, or simply Notepad to open your original HTML file.

3
Update image references

Use the 'Find and Replace' feature (usually Ctrl + H) to change all '.cgm' extensions within the '<img>' tags to '.png' (or '.jpeg'). Save the updated HTML file.

4
Re-run the PDF conversion

Open your PDF software, select the 'Create from Web Page' or 'HTML to PDF' tool, and select your newly updated HTML file to generate the complete PDF with all graphics intact.

Preprocess CGM Images to PNG or JPEG and Update HTML
Batch Scripting Tip: If you are processing hundreds of HTML files across a large manual, consider writing a simple Python or shell script to traverse the directory, run a command-line image converter, and automate the text replacement within the HTML.
Seamless PDF Conversion

Convert Documents and Images to PDF Easily with WPS Office

Once your older images are updated to standard formats like PNG or JPEG, WPS Office provides a lightweight and powerful way to combine text and graphics into professional PDF documents, fully compatible with standard file formats.

  1. 1. Open WPS Office: Launch WPS Office on your computer and navigate to the 'PDF' tab on the main dashboard, then select 'Create PDF'.
  2. 2. Import Document: Choose 'From File' to import your properly formatted document or web page containing the newly converted standard images.
  3. 3. Export to PDF: Review the layout to ensure all graphics are correctly displayed, then click 'Export to PDF' to save your final document.
Easily create PDFs from standard web formats, images, and documentsSeamlessly view and edit PDF files with sharp rendering of PNG/JPEG graphicsExcellent compatibility with Microsoft Office formats (Word, Excel, PowerPoint)Free, fast, and feature-rich interface available on multiple platforms
microsoft office alternative - wps office

Frequently Asked Questions

Why do HTML-to-PDF converters drop support for CGM images?

CGM (Computer Graphics Metafile) is an older vector graphics format originally designed for 2D CAD and engineering graphics. Modern PDF converters optimize for standard web formats like PNG, JPEG, and SVG. Processing legacy formats natively often requires heavy, outdated dependencies.

Can I use a plug-in to render CGM files directly into PDF?

While technically possible, sourcing or building a custom plug-in that acts as a complete HTML and CGM converter for tools like Acrobat is extremely complex and expensive. Preprocessing the images externally is widely considered the most practical solution.

What is the best image format to replace CGM for PDF conversion?

PNG is typically the best replacement for CGM files. It provides lossless compression that keeps technical diagrams, line art, and embedded text within the images sharp and clear in the final converted PDF document.