Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

The PTC Community email address has changed to Learn more.

suppress graphics using compose_using_xsl()?


suppress graphics using compose_using_xsl()?

Is there a parameter that will suppress graphics processing? My XSL
stylesheet is suppressing the graphic element but PE/Editor are still
creating the graphics folder and populating it even thought it's not
referenced by the resulting XML.

Paul Nagai

Hi Paul--

Try adding this to the params[] array you pass to compose::compose_using_xsl():


(or if that doesn't work, try "true" instead of 1).


Thanks, Clay. That worked. I had found and tried dontDownloadGraphics, but
that didn't do anything (well, with respect to the folder/graphics I'm
trying to suppress). FWIW, the correct syntax is "true". Or, more
completely (but omitting the stylesheet and output params):

$myparams["dontCopyGraphics"] = "true";
compose::compose_using_xsl($doc, $myparams)

I should have bought you more drinks in Anaheim.

Cool, glad you got it working. And, there's always next year. 🙂

Interesting development. From a "leaving a mess" perspective this is
working. However, I just noticed that the folder is appearing and
disappearing during composition. (I haven't figured out how to watch for
the file(s) themselves. I might need a bigger test file, more graphics,
and/or bigger graphics to do that.) I hope it's just the folder and not the
files, though. Otherwise the performance hit will remain ...

And yes, definitely next year. Budget faeries willing.

Top Tags