# Documentation Tools: Prevent rasterizing output cell

When building documentation using the Workbench, some of the output cells get fully rasterized. I assume this is done to save space.

Can I turn this off, either globally, or on a per-cell basis? I want to keep certain output as vector graphics.

• See this and all comments that follow. – QuantumDot Nov 14 '16 at 15:19
• @QuantumDot Would you like to summarize that in an answer? – Szabolcs Nov 15 '16 at 17:16
• In buildDocumentation I've added "ConvertGraphicsToBitmaps" option. It doesn't do anything sophisticated, on False it just Blocks ConvertGraphicsToBitmaps function and replaces it with function doing nothing. – jkuczm Nov 19 '16 at 20:45

I don't know any option that would control this behavior, but there are hacks that can completely prevent this rasterization.

Rasterization is performed by ConvertGraphicsToBitmaps function from DocumentationBuildCommon package. This function performs rasterization of output cells from given NotebookObject and returns Null, that's all it does, so we can safely override it with function that only returns Null.

For this override to take effect during documentation build, governed by docbuild.xml file, we can add following code, right before <ant antfile="${appPath}/DocumentationBuild/SystemFiles/ant/Build/notebook.xml" line: <mathematica exe="${mathExe}">
<![CDATA[
If[Not@MemberQ[$Path, #], PrependTo[$Path, #]]&@AntProperty["appPath"]
Needs@"DocumentationBuild"
ConvertGraphicsToBitmaps = Null&
]]>
</mathematica>

First line adds directory containing documentation building packages to \$Path (this directory is stored in Ant "appPath" property), second line loads DocumentationBuild package, third overrides relevant function.