GoTo action creation

This commit is contained in:
Jakub Melka 2020-11-12 18:50:40 +01:00
parent 1382ead109
commit 2cdad1482d
6 changed files with 665 additions and 258 deletions

View File

@ -157,7 +157,8 @@ public:
_AnnotationLineEnding, _AnnotationLineEnding,
_AnnotationBorderStyle, _AnnotationBorderStyle,
_FileAttachmentIcon, _FileAttachmentIcon,
_Stamp _Stamp,
_PDFDestination
}; };
Q_ENUM(DataType) Q_ENUM(DataType)

View File

@ -469,6 +469,210 @@ PDFDestination PDFDestination::parse(const PDFObjectStorage* storage, PDFObject
return result; return result;
} }
void PDFDestination::setDestinationType(DestinationType destinationType)
{
m_destinationType = destinationType;
}
void PDFDestination::setLeft(PDFReal left)
{
m_left = left;
}
void PDFDestination::setTop(PDFReal top)
{
m_top = top;
}
void PDFDestination::setRight(PDFReal right)
{
m_right = right;
}
void PDFDestination::setBottom(PDFReal bottom)
{
m_bottom = bottom;
}
void PDFDestination::setZoom(PDFReal zoom)
{
m_zoom = zoom;
}
void PDFDestination::setName(const QByteArray& name)
{
m_name = name;
}
void PDFDestination::setPageReference(PDFObjectReference pageReference)
{
m_pageReference = pageReference;
}
void PDFDestination::setPageIndex(PDFInteger pageIndex)
{
m_pageIndex = pageIndex;
}
PDFDestination PDFDestination::createXYZ(PDFObjectReference page, PDFReal left, PDFReal top, PDFReal zoom)
{
PDFDestination result;
result.setDestinationType(DestinationType::XYZ);
result.setPageReference(page);
result.setLeft(left);
result.setTop(top);
result.setZoom(zoom);
return result;
}
PDFDestination PDFDestination::createFit(PDFObjectReference page)
{
PDFDestination result;
result.setDestinationType(DestinationType::Fit);
result.setPageReference(page);
return result;
}
PDFDestination PDFDestination::createFitH(PDFObjectReference page, PDFReal top)
{
PDFDestination result;
result.setDestinationType(DestinationType::FitH);
result.setPageReference(page);
result.setTop(top);
return result;
}
PDFDestination PDFDestination::createFitV(PDFObjectReference page, PDFReal left)
{
PDFDestination result;
result.setDestinationType(DestinationType::FitV);
result.setPageReference(page);
result.setLeft(left);
return result;
}
PDFDestination PDFDestination::createFitR(PDFObjectReference page, PDFReal left, PDFReal top, PDFReal right, PDFReal bottom)
{
PDFDestination result;
result.setDestinationType(DestinationType::FitR);
result.setPageReference(page);
result.setLeft(left);
result.setTop(top);
result.setRight(right);
result.setBottom(bottom);
return result;
}
PDFDestination PDFDestination::createFitB(PDFObjectReference page)
{
PDFDestination result;
result.setDestinationType(DestinationType::FitB);
result.setPageReference(page);
return result;
}
PDFDestination PDFDestination::createFitBH(PDFObjectReference page, PDFReal top)
{
PDFDestination result;
result.setDestinationType(DestinationType::FitBH);
result.setPageReference(page);
result.setTop(top);
return result;
}
PDFDestination PDFDestination::createFitBV(PDFObjectReference page, PDFReal left)
{
PDFDestination result;
result.setDestinationType(DestinationType::FitBV);
result.setPageReference(page);
result.setLeft(left);
return result;
}
PDFDestination PDFDestination::createNamed(const QByteArray& name)
{
PDFDestination result;
result.setDestinationType(DestinationType::Named);
result.setName(name);
return result;
}
bool PDFDestination::hasLeft() const
{
switch (m_destinationType)
{
case DestinationType::XYZ:
case DestinationType::FitV:
case DestinationType::FitBV:
case DestinationType::FitR:
return true;
default:
break;
}
return false;
}
bool PDFDestination::hasTop() const
{
switch (m_destinationType)
{
case DestinationType::XYZ:
case DestinationType::FitH:
case DestinationType::FitBH:
case DestinationType::FitR:
return true;
default:
break;
}
return false;
}
bool PDFDestination::hasRight() const
{
switch (m_destinationType)
{
case DestinationType::FitR:
return true;
default:
break;
}
return false;
}
bool PDFDestination::hasBottom() const
{
switch (m_destinationType)
{
case DestinationType::FitR:
return true;
default:
break;
}
return false;
}
bool PDFDestination::hasZoom() const
{
switch (m_destinationType)
{
case DestinationType::XYZ:
return true;
default:
break;
}
return false;
}
PDFFormAction::FieldList PDFFormAction::parseFieldList(const PDFObjectStorage* storage, PDFObject object, FieldScope& fieldScope) PDFFormAction::FieldList PDFFormAction::parseFieldList(const PDFObjectStorage* storage, PDFObject object, FieldScope& fieldScope)
{ {
FieldList result; FieldList result;

View File

@ -79,7 +79,7 @@ enum class DestinationType
/// destination has almost exactly same syntax as page destination, it should be checked, /// destination has almost exactly same syntax as page destination, it should be checked,
/// if indirect reference returned by function \p getPageReference references really page, /// if indirect reference returned by function \p getPageReference references really page,
/// or some structure element. /// or some structure element.
class PDFDestination class PDFFORQTLIBSHARED_EXPORT PDFDestination
{ {
public: public:
explicit inline PDFDestination() = default; explicit inline PDFDestination() = default;
@ -100,6 +100,35 @@ public:
/// \param object Destination object /// \param object Destination object
static PDFDestination parse(const PDFObjectStorage* storage, PDFObject object); static PDFDestination parse(const PDFObjectStorage* storage, PDFObject object);
void setDestinationType(DestinationType destinationType);
void setLeft(PDFReal left);
void setTop(PDFReal top);
void setRight(PDFReal right);
void setBottom(PDFReal bottom);
void setZoom(PDFReal zoom);
void setName(const QByteArray& name);
void setPageReference(PDFObjectReference pageReference);
void setPageIndex(PDFInteger pageIndex);
static PDFDestination createXYZ(PDFObjectReference page, PDFReal left, PDFReal top, PDFReal zoom);
static PDFDestination createFit(PDFObjectReference page);
static PDFDestination createFitH(PDFObjectReference page, PDFReal top);
static PDFDestination createFitV(PDFObjectReference page, PDFReal left);
static PDFDestination createFitR(PDFObjectReference page, PDFReal left, PDFReal top, PDFReal right, PDFReal bottom);
static PDFDestination createFitB(PDFObjectReference page);
static PDFDestination createFitBH(PDFObjectReference page, PDFReal top);
static PDFDestination createFitBV(PDFObjectReference page, PDFReal left);
static PDFDestination createNamed(const QByteArray& name);
bool hasLeft() const;
bool hasTop() const;
bool hasRight() const;
bool hasBottom() const;
bool hasZoom() const;
bool isValid() const { return m_destinationType != DestinationType::Invalid; }
bool isNamedDestination() const { return m_destinationType == DestinationType::Named; }
private: private:
DestinationType m_destinationType = DestinationType::Invalid; DestinationType m_destinationType = DestinationType::Invalid;
PDFReal m_left = 0.0; PDFReal m_left = 0.0;

View File

@ -71,6 +71,82 @@ void PDFObjectFactory::endDictionaryItem()
std::get<PDFDictionary>(dictionaryItem.object).addEntry(PDFInplaceOrMemoryString(qMove(topItem.itemName)), qMove(std::get<PDFObject>(topItem.object))); std::get<PDFDictionary>(dictionaryItem.object).addEntry(PDFInplaceOrMemoryString(qMove(topItem.itemName)), qMove(std::get<PDFObject>(topItem.object)));
} }
PDFObjectFactory& PDFObjectFactory::operator<<(const PDFDestination& destination)
{
if (!destination.isValid())
{
*this << PDFObject();
return *this;
}
if (destination.isNamedDestination())
{
*this << WrapName(destination.getName());
}
else
{
beginArray();
// Destination
if (destination.getPageReference().isValid())
{
*this << destination.getPageReference();
}
else
{
*this << destination.getPageIndex();
}
// Type
QByteArray type;
switch (destination.getDestinationType())
{
case DestinationType::XYZ:
type = "XYZ";
break;
case DestinationType::Fit:
type = "Fit";
break;
case DestinationType::FitH:
type = "FitH";
break;
case DestinationType::FitV:
type = "FitV";
break;
case DestinationType::FitR:
type = "FitR";
break;
case DestinationType::FitB:
type = "FitB";
break;
case DestinationType::FitBH:
type = "FitBH";
break;
case DestinationType::FitBV:
type = "FitBV";
break;
default:
Q_ASSERT(false);
break;
}
*this << WrapName(type);
endArray();
}
return *this;
}
PDFObjectFactory& PDFObjectFactory::operator<<(FileAttachmentIcon icon) PDFObjectFactory& PDFObjectFactory::operator<<(FileAttachmentIcon icon)
{ {
switch (icon) switch (icon)
@ -1288,6 +1364,26 @@ PDFObjectReference PDFDocumentBuilder::appendPage(QRectF mediaBox)
} }
PDFObjectReference PDFDocumentBuilder::createActionGoTo(PDFDestination destination)
{
PDFObjectFactory objectBuilder;
objectBuilder.beginDictionary();
objectBuilder.beginDictionaryItem("Type");
objectBuilder << WrapName("Action");
objectBuilder.endDictionaryItem();
objectBuilder.beginDictionaryItem("S");
objectBuilder << WrapName("GoTo");
objectBuilder.endDictionaryItem();
objectBuilder.beginDictionaryItem("D");
objectBuilder << destination;
objectBuilder.endDictionaryItem();
objectBuilder.endDictionary();
PDFObjectReference actionReference = addObject(objectBuilder.takeObject());
return actionReference;
}
PDFObjectReference PDFDocumentBuilder::createActionURI(QString URL) PDFObjectReference PDFDocumentBuilder::createActionURI(QString URL)
{ {
PDFObjectFactory objectBuilder; PDFObjectFactory objectBuilder;

View File

@ -115,6 +115,7 @@ public:
PDFObjectFactory& operator<<(const PDFObject& object); PDFObjectFactory& operator<<(const PDFObject& object);
PDFObjectFactory& operator<<(Stamp stamp); PDFObjectFactory& operator<<(Stamp stamp);
PDFObjectFactory& operator<<(FileAttachmentIcon icon); PDFObjectFactory& operator<<(FileAttachmentIcon icon);
PDFObjectFactory& operator<<(const PDFDestination& destination);
/// Treat containers - write them as array /// Treat containers - write them as array
template<typename Container, typename ValueType = decltype(*std::begin(std::declval<Container>()))> template<typename Container, typename ValueType = decltype(*std::begin(std::declval<Container>()))>
@ -367,6 +368,11 @@ public:
PDFObjectReference appendPage(QRectF mediaBox); PDFObjectReference appendPage(QRectF mediaBox);
/// Creates GoTo action. This action changes view to a specific destination in the same document.
/// \param destination Destination
PDFObjectReference createActionGoTo(PDFDestination destination);
/// Creates URI action. /// Creates URI action.
/// \param URL Target URL /// \param URL Target URL
PDFObjectReference createActionURI(QString URL); PDFObjectReference createActionURI(QString URL);

View File

@ -183,6 +183,77 @@ return pageReference;</property>
<property name="functionDescription">Creates URI action.</property> <property name="functionDescription">Creates URI action.</property>
<property name="returnType">_PDFObjectReference</property> <property name="returnType">_PDFObjectReference</property>
</QObject> </QObject>
<QObject class="codegen::GeneratedFunction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">destination</property>
<property name="parameterType">_PDFDestination</property>
<property name="parameterDescription">Destination</property>
</QObject>
</property>
<property name="actionType">Parameters</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items"/>
<property name="dictionaryItemName">Type</property>
<property name="objectType">DictionaryItemSimple</property>
<property name="value">WrapName("Action")</property>
</QObject>
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items"/>
<property name="dictionaryItemName">S</property>
<property name="objectType">DictionaryItemSimple</property>
<property name="value">WrapName("GoTo")</property>
</QObject>
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items"/>
<property name="dictionaryItemName">D</property>
<property name="objectType">DictionaryItemSimple</property>
<property name="value">destination</property>
</QObject>
</property>
<property name="dictionaryItemName"></property>
<property name="objectType">Dictionary</property>
<property name="value"></property>
</QObject>
</property>
<property name="actionType">CreateObject</property>
<property name="variableName">actionReference</property>
<property name="variableType">_PDFObjectReference</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items"/>
<property name="actionType">Code</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code">return actionReference;</property>
</QObject>
</property>
<property name="functionType">Actions</property>
<property name="functionName">createActionGoTo</property>
<property name="functionDescription">Creates GoTo action. This action changes view to a specific destination in the same document.</property>
<property name="returnType">_PDFObjectReference</property>
</QObject>
<QObject class="codegen::GeneratedFunction"> <QObject class="codegen::GeneratedFunction">
<property name="objectName"></property> <property name="objectName"></property>
<property name="items"> <property name="items">
@ -7763,6 +7834,198 @@ return rootNodeReference;</property>
<property name="functionDescription">Set document language.</property> <property name="functionDescription">Set document language.</property>
<property name="returnType">_void</property> <property name="returnType">_void</property>
</QObject> </QObject>
<QObject class="codegen::GeneratedFunction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">page</property>
<property name="parameterType">_PDFObjectReference</property>
<property name="parameterDescription">Page</property>
</QObject>
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">box</property>
<property name="parameterType">_QRectF</property>
<property name="parameterDescription">Box</property>
</QObject>
</property>
<property name="actionType">Parameters</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items"/>
<property name="dictionaryItemName">ArtBox</property>
<property name="objectType">DictionaryItemSimple</property>
<property name="value">box</property>
</QObject>
</property>
<property name="dictionaryItemName"></property>
<property name="objectType">Dictionary</property>
<property name="value"></property>
</QObject>
</property>
<property name="actionType">CreateObject</property>
<property name="variableName">updatedPageObject</property>
<property name="variableType">_PDFObject</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items"/>
<property name="actionType">Code</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code">mergeTo(page, updatedPageObject);</property>
</QObject>
</property>
<property name="functionType">Structure</property>
<property name="functionName">setPageArtBox</property>
<property name="functionDescription">Sets art box to the page. Art box defines page's meaningful content.</property>
<property name="returnType">_void</property>
</QObject>
<QObject class="codegen::GeneratedFunction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">page</property>
<property name="parameterType">_PDFObjectReference</property>
<property name="parameterDescription">Page</property>
</QObject>
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">box</property>
<property name="parameterType">_QRectF</property>
<property name="parameterDescription">Box</property>
</QObject>
</property>
<property name="actionType">Parameters</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items"/>
<property name="dictionaryItemName">BleedBox</property>
<property name="objectType">DictionaryItemSimple</property>
<property name="value">box</property>
</QObject>
</property>
<property name="dictionaryItemName"></property>
<property name="objectType">Dictionary</property>
<property name="value"></property>
</QObject>
</property>
<property name="actionType">CreateObject</property>
<property name="variableName">updatedPageObject</property>
<property name="variableType">_PDFObject</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items"/>
<property name="actionType">Code</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code">mergeTo(page, updatedPageObject);</property>
</QObject>
</property>
<property name="functionType">Structure</property>
<property name="functionName">setPageBleedBox</property>
<property name="functionDescription">Sets bleed box to the page. Bleed box is, basically, a clipping box for output in a production environment. Default value is the page's crop box.</property>
<property name="returnType">_void</property>
</QObject>
<QObject class="codegen::GeneratedFunction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">page</property>
<property name="parameterType">_PDFObjectReference</property>
<property name="parameterDescription">Page</property>
</QObject>
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">box</property>
<property name="parameterType">_QRectF</property>
<property name="parameterDescription">Box</property>
</QObject>
</property>
<property name="actionType">Parameters</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items"/>
<property name="dictionaryItemName">CropBox</property>
<property name="objectType">DictionaryItemSimple</property>
<property name="value">box</property>
</QObject>
</property>
<property name="dictionaryItemName"></property>
<property name="objectType">Dictionary</property>
<property name="value"></property>
</QObject>
</property>
<property name="actionType">CreateObject</property>
<property name="variableName">updatedPageObject</property>
<property name="variableType">_PDFObject</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items"/>
<property name="actionType">Code</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code">mergeTo(page, updatedPageObject);</property>
</QObject>
</property>
<property name="functionType">Structure</property>
<property name="functionName">setPageCropBox</property>
<property name="functionDescription">Sets crop box to the page. Crop box defines clipping region of the page. Page contents are clipped to this region, graphics outside of clipping box will not be printed. Default value is same, as media box.</property>
<property name="returnType">_void</property>
</QObject>
<QObject class="codegen::GeneratedFunction"> <QObject class="codegen::GeneratedFunction">
<property name="objectName"></property> <property name="objectName"></property>
<property name="items"> <property name="items">
@ -7891,6 +8154,70 @@ return rootNodeReference;</property>
<property name="functionDescription">Sets media box to the page. The media box defines size of physical medium, onto which the page is to be printed. </property> <property name="functionDescription">Sets media box to the page. The media box defines size of physical medium, onto which the page is to be printed. </property>
<property name="returnType">_void</property> <property name="returnType">_void</property>
</QObject> </QObject>
<QObject class="codegen::GeneratedFunction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">page</property>
<property name="parameterType">_PDFObjectReference</property>
<property name="parameterDescription">Page</property>
</QObject>
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">box</property>
<property name="parameterType">_QRectF</property>
<property name="parameterDescription">Box</property>
</QObject>
</property>
<property name="actionType">Parameters</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items"/>
<property name="dictionaryItemName">TrimBox</property>
<property name="objectType">DictionaryItemSimple</property>
<property name="value">box</property>
</QObject>
</property>
<property name="dictionaryItemName"></property>
<property name="objectType">Dictionary</property>
<property name="value"></property>
</QObject>
</property>
<property name="actionType">CreateObject</property>
<property name="variableName">updatedPageObject</property>
<property name="variableType">_PDFObject</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items"/>
<property name="actionType">Code</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code">mergeTo(page, updatedPageObject);</property>
</QObject>
</property>
<property name="functionType">Structure</property>
<property name="functionName">setPageTrimBox</property>
<property name="functionDescription">Sets trim box to the page. Trim box is physical region, of the printed page after trimming.</property>
<property name="returnType">_void</property>
</QObject>
<QObject class="codegen::GeneratedFunction"> <QObject class="codegen::GeneratedFunction">
<property name="objectName"></property> <property name="objectName"></property>
<property name="items"> <property name="items">
@ -7980,261 +8307,5 @@ updateDocumentInfo(qMove(updatedInfoDictionary));</property>
<property name="functionDescription">This function is used to update trailer dictionary. Must be called each time the final document is being built.</property> <property name="functionDescription">This function is used to update trailer dictionary. Must be called each time the final document is being built.</property>
<property name="returnType">_void</property> <property name="returnType">_void</property>
</QObject> </QObject>
<QObject class="codegen::GeneratedFunction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">page</property>
<property name="parameterType">_PDFObjectReference</property>
<property name="parameterDescription">Page</property>
</QObject>
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">box</property>
<property name="parameterType">_QRectF</property>
<property name="parameterDescription">Box</property>
</QObject>
</property>
<property name="actionType">Parameters</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items"/>
<property name="dictionaryItemName">CropBox</property>
<property name="objectType">DictionaryItemSimple</property>
<property name="value">box</property>
</QObject>
</property>
<property name="dictionaryItemName"></property>
<property name="objectType">Dictionary</property>
<property name="value"></property>
</QObject>
</property>
<property name="actionType">CreateObject</property>
<property name="variableName">updatedPageObject</property>
<property name="variableType">_PDFObject</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items"/>
<property name="actionType">Code</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code">mergeTo(page, updatedPageObject);</property>
</QObject>
</property>
<property name="functionType">Structure</property>
<property name="functionName">setPageCropBox</property>
<property name="functionDescription">Sets crop box to the page. Crop box defines clipping region of the page. Page contents are clipped to this region, graphics outside of clipping box will not be printed. Default value is same, as media box.</property>
<property name="returnType">_void</property>
</QObject>
<QObject class="codegen::GeneratedFunction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">page</property>
<property name="parameterType">_PDFObjectReference</property>
<property name="parameterDescription">Page</property>
</QObject>
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">box</property>
<property name="parameterType">_QRectF</property>
<property name="parameterDescription">Box</property>
</QObject>
</property>
<property name="actionType">Parameters</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items"/>
<property name="dictionaryItemName">BleedBox</property>
<property name="objectType">DictionaryItemSimple</property>
<property name="value">box</property>
</QObject>
</property>
<property name="dictionaryItemName"></property>
<property name="objectType">Dictionary</property>
<property name="value"></property>
</QObject>
</property>
<property name="actionType">CreateObject</property>
<property name="variableName">updatedPageObject</property>
<property name="variableType">_PDFObject</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items"/>
<property name="actionType">Code</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code">mergeTo(page, updatedPageObject);</property>
</QObject>
</property>
<property name="functionType">Structure</property>
<property name="functionName">setPageBleedBox</property>
<property name="functionDescription">Sets bleed box to the page. Bleed box is, basically, a clipping box for output in a production environment. Default value is the page's crop box.</property>
<property name="returnType">_void</property>
</QObject>
<QObject class="codegen::GeneratedFunction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">page</property>
<property name="parameterType">_PDFObjectReference</property>
<property name="parameterDescription">Page</property>
</QObject>
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">box</property>
<property name="parameterType">_QRectF</property>
<property name="parameterDescription">Box</property>
</QObject>
</property>
<property name="actionType">Parameters</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items"/>
<property name="dictionaryItemName">TrimBox</property>
<property name="objectType">DictionaryItemSimple</property>
<property name="value">box</property>
</QObject>
</property>
<property name="dictionaryItemName"></property>
<property name="objectType">Dictionary</property>
<property name="value"></property>
</QObject>
</property>
<property name="actionType">CreateObject</property>
<property name="variableName">updatedPageObject</property>
<property name="variableType">_PDFObject</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items"/>
<property name="actionType">Code</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code">mergeTo(page, updatedPageObject);</property>
</QObject>
</property>
<property name="functionType">Structure</property>
<property name="functionName">setPageTrimBox</property>
<property name="functionDescription">Sets trim box to the page. Trim box is physical region, of the printed page after trimming.</property>
<property name="returnType">_void</property>
</QObject>
<QObject class="codegen::GeneratedFunction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">page</property>
<property name="parameterType">_PDFObjectReference</property>
<property name="parameterDescription">Page</property>
</QObject>
<QObject class="codegen::GeneratedParameter">
<property name="objectName"></property>
<property name="items"/>
<property name="parameterName">box</property>
<property name="parameterType">_QRectF</property>
<property name="parameterDescription">Box</property>
</QObject>
</property>
<property name="actionType">Parameters</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items">
<QObject class="codegen::GeneratedPDFObject">
<property name="objectName"></property>
<property name="items"/>
<property name="dictionaryItemName">ArtBox</property>
<property name="objectType">DictionaryItemSimple</property>
<property name="value">box</property>
</QObject>
</property>
<property name="dictionaryItemName"></property>
<property name="objectType">Dictionary</property>
<property name="value"></property>
</QObject>
</property>
<property name="actionType">CreateObject</property>
<property name="variableName">updatedPageObject</property>
<property name="variableType">_PDFObject</property>
<property name="code"></property>
</QObject>
<QObject class="codegen::GeneratedAction">
<property name="objectName"></property>
<property name="items"/>
<property name="actionType">Code</property>
<property name="variableName"></property>
<property name="variableType">_void</property>
<property name="code">mergeTo(page, updatedPageObject);</property>
</QObject>
</property>
<property name="functionType">Structure</property>
<property name="functionName">setPageArtBox</property>
<property name="functionDescription">Sets art box to the page. Art box defines page's meaningful content.</property>
<property name="returnType">_void</property>
</QObject>
</property> </property>
</root> </root>