PDF Converter for SharePoint - User Guide
PDF Converter for SharePoint - User Guide - Version 8.0 - 15/10/15
© Copyright 2015, Muhimbi Ltd
Page 38 of 140
8.2 Determine at runtime which views to export
The previous solution, using view names that start with “_MuhimbiView”,
works great. However, sometimes you need to export a different view
depending on the state of the data.
For example, our Expense Claim form consists of the following Views:
1. Data Entry View 1: Used by the employee to report expenses.
2. Data Entry View 2: Used by the manager to add comments and additional
3. PDF Export View 1: The view that is used to export the form to PDF
format before the manager has reviewed the form.
4. PDF Export View 2: The view that is used to export the form to PDF
format after the manager has reviewed the form.
We can implement this by adding a (hidden) text box named “_MuhimbiViews”
and using the default ‘my’ namespace
) to any of the views
and populating it with the name of one or more comma separated view
names. The Muhimbi PDF Converter will automatically pick up these names
and export them to PDF format. If multiple views are specified then they are
automatically concatenated together.
In addition to adding the “_MuhimbiViews” text field to the form, all the
developer of the form needs to do is add a little bit of logic to the Submit event
to specify in the “_MuhimbiViews” field which view name
(s) to export.
8.3 View prioritisation rules
To determine which view or views to export, the Muhimbi PDF Converter uses
the following prioritisation rules:
1. When using the web services interface, any ConversionViews specified in
the ConverterSpecificSettings property will be converted. If this property is
not set then the following rules will be used to determine which views to
convert to PDF.
If a field named “_MuhimbiViews” is found anywhere in the InfoPath form
then the content of this field is used to determine which views to export.
3. If the previous field does not exist, is empty or the specified view name
does not exist then the converter looks at all view names that start with
4. If none of the previous options apply then the view marked as the Default
View is exported.
Regardless of how a view or views are selected for export, if the selected view
has a Print View specified than that view is given priority.
Do not use Muhimbi’s View selection features in combination with InfoPath's
'Print multiple views' facility. The latter is given priority when converting to
When the final PDF file is assembled then all selected views are included first,
followed by any converted attachments