How to Fix Missing CGM Images When Converting HTML to PDF
Question details
The user needs to convert old HTML manuals containing CGM format graphics into PDF documents without losing the images.

- 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.
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.
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.
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.
Use a code editor like Notepad++, VS Code, or simply Notepad to open your original HTML file.
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.
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.

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. Open WPS Office: Launch WPS Office on your computer and navigate to the 'PDF' tab on the main dashboard, then select 'Create PDF'.
- 2. Import Document: Choose 'From File' to import your properly formatted document or web page containing the newly converted standard images.
- 3. Export to PDF: Review the layout to ensure all graphics are correctly displayed, then click 'Export to PDF' to save your final document.

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.




