Miramo PDF configurations

There are a few extra considerations for IXIASOFT CCMS Output Generator and its configuration when using Miramo PDF.

For general information on Miramo PDF, please refer to the Miramo PDF Getting Started Guide, available for download at www.miramo.com.

While transformation scenarios for Miramo PDF are almost identical to those for any other type of PDF transform, there are a few differences you should be aware of. This topic covers only those differences; anything not specifically mentioned here is the same for all PDF transforms.

Unnecessary tasks (recommended)

Because Miramo PDF uses its own PDF renderer (Miramo Composer), and does not generate a topic.fo file in the process, you can delete the following tasks from your Miramo PDF targets:

<ot_build_add_pdfrenderer/>
<ot_build_keep_topicfo/>

If present, they don't cause any harm, but by removing them, you keep the Output Generator from having to needlessly execute them.

Additional build parameters (required)

Miramo PDF enables you to mix and match plugins and templates. That is, you can call a Miramo plugin along with any Miramo template to combine a certain set of processing rules with another set of formatting rules. This means you can use any plugin-template combination that makes sense for you.

When you add the appropriate Miramo PDF plugin's transtype to the target (as explained in Create a transformation scenario, you call the plugin. To call the appropriate Miramo template, add the following build parameters to the target, just below the transtype parameter:

<ot_build_set_parameter name="mmpdf:mfd.dir" value="${outgen.ot.dir}/plugins/com.bigcorp.mmpdf/mmtemplates"/>
<ot_build_set_parameter name="mmpdf:mfd.file" value="BigCorp1.mfd"/>

The first parameter specifies the path to the template you want to use. The second parameter specifes the name of the template to use.

If you don't specify these things, Miramo PDF uses its own default template from within the com.miramo.mmpdf plugin.

User parameter (recommended)

Miramo PDF includes a very useful build parameter, mmpdf:showProperties. If this parameter is set to Y, the resulting PDF includes comments that tell you what formats are being used for each paragraph, table, image, page, etc. This information is extremely helpful for troubleshooting during template development.

It's a good idea to create an option that enables you to choose on the fly whether to include these comments or not. To do so, set up a user parameter for mmpdf:showProperties. This process is covered in Add user parameters to the Output Generator dialog and Access user parameters in your Ant conductor file.

Here is an example. Add something similar to this to your Miramo PDF preprocessor:

<user>
    <parameter label="Show properties?" name="bigcorp.showProperties" mandatory="false" type="choice">
        <value name="N" _default="true">No</value>
        <value name="Y">Yes</value>
    </parameter>
</user>

And something similar to this to your Miramo PDF target:

<ot_build_set_parameter name="mmpdf:showProperties" value="${outgen.job.userparam.bigcorp.showProperties}"/>

Ant delete task for images (required)

By default, Miramo PDF includes all images in the output zip that you download. You probably don't want these. You might have noticed that Miramo includes a build parameter mmpdf:copyImagesToOutput, and you might think that setting it to N in your target would eliminate images in the output folder, but unfortunately, it also eliminates images in your PDF.

To eliminate these images, you need to add an ANT delete task to your Miramo PDF targets. Add the following immediately after the line <clean_ot_output/>:

<delete>
	<fileset dir="${outgen.job.output.dir}" includes="**/*.png"/>
	<fileset dir="${outgen.job.output.dir}" includes="**/*.gif"/>
	<fileset dir="${outgen.job.output.dir}" includes="**/*.bmp"/>
	<fileset dir="${outgen.job.output.dir}" includes="**/*.jpg"/>
	<fileset dir="${outgen.job.output.dir}" includes="**/*.jpeg"/>
	<fileset dir="${outgen.job.output.dir}" includes="**/*.svg"/>
	<fileset dir="${outgen.job.output.dir}" includes="**/*.image"/>
</delete>

This task deletes all files with the specified extensions from the output package before it is zipped and made available to you for download.

If you have images with extensions in addition to the ones listed in the example, be sure to add them to the delete task.

Image preprocessor (required for Miramo 2.0 only)

Miramo PDF 2.0 contains a bug that prevents it from recognizing IXIASOFT's .image extension. Therefore, it's necessary to install our image preprocessor. If you find that images do not appear in your PDFs, contact IXIASOFT Support for help installing the image preprocessor.