render_to_png
Render CDXML reaction schemes to high-resolution PNG images using ChemDraw's native engine at 300 DPI.
Instructions
Render a CDXML file to PNG using ChemDraw COM.
Uses ChemDraw's native rendering engine (via COM automation) at 300 DPI with a solid white background. ChemDraw must be installed (Professional 16+) and closed before calling this tool.
This tool uses ChemDraw COM exclusively — no RDKit fallback. For a quick preview without ChemDraw, use draw_molecule which returns CDXML that can be opened directly.
Args: cdxml_path: Path to the CDXML file to render. output_path: Output PNG path. If not given, writes to the same directory as the input with a .png extension.
Returns: Dict with keys: ok, input, output (absolute path to PNG file). Returns {ok: False, error: "..."} if ChemDraw COM is unavailable or rendering fails.
Safety override: Render CDXML to a validated PNG through a staging file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cdxml_path | Yes | ||
| output_path | No |