mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-01-27 07:46:08 +01:00
Document info setters
This commit is contained in:
parent
77972bbad3
commit
f81d409d12
@ -146,6 +146,8 @@ public:
|
||||
_QColor,
|
||||
_QVariant,
|
||||
_QPolygonF,
|
||||
_QDateTime,
|
||||
_QLocale,
|
||||
_TextAnnotationIcon,
|
||||
_LinkHighlightMode,
|
||||
_TextAlignment,
|
||||
|
@ -20,9 +20,16 @@
|
||||
#include "pdfdocumentbuilder.h"
|
||||
#include "pdfdocumentwriter.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
void PDFExamplesGenerator::generateAnnotationsExample()
|
||||
{
|
||||
pdf::PDFDocumentBuilder builder;
|
||||
builder.setDocumentTitle("Test document");
|
||||
builder.setDocumentAuthor("Jakub Melka");
|
||||
builder.setDocumentCreator(QCoreApplication::applicationName());
|
||||
builder.setDocumentSubject("Testing annotations");
|
||||
builder.setLanguage(QLocale::system());
|
||||
|
||||
pdf::PDFObjectReference page1 = builder.appendPage(QRectF(0, 0, 400, 400));
|
||||
builder.createAnnotationText(page1, QRectF(50, 50, 24, 24), pdf::TextAnnotationIcon::Comment, "Title1", "Subject1", "Comment", false);
|
||||
|
@ -64,6 +64,12 @@ void PDFObjectFactory::endDictionaryItem()
|
||||
std::get<PDFDictionary>(dictionaryItem.object).addEntry(qMove(topItem.itemName), qMove(std::get<PDFObject>(topItem.object)));
|
||||
}
|
||||
|
||||
PDFObjectFactory& PDFObjectFactory::operator<<(const QDateTime& dateTime)
|
||||
{
|
||||
addObject(PDFObject::createString(std::make_shared<PDFString>(PDFEncoding::converDateTimeToString(dateTime))));
|
||||
return *this;
|
||||
}
|
||||
|
||||
PDFObjectFactory& PDFObjectFactory::operator<<(const QPointF& point)
|
||||
{
|
||||
*this << point.x();
|
||||
@ -497,6 +503,56 @@ PDFInteger PDFDocumentBuilder::getPageTreeRootChildCount() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
PDFObjectReference PDFDocumentBuilder::getDocumentInfo() const
|
||||
{
|
||||
if (const PDFDictionary* trailerDictionary = getDictionaryFromObject(m_storage.getTrailerDictionary()))
|
||||
{
|
||||
PDFObject object = trailerDictionary->get("Info");
|
||||
if (object.isReference())
|
||||
{
|
||||
return object.getReference();
|
||||
}
|
||||
}
|
||||
|
||||
return PDFObjectReference();
|
||||
}
|
||||
|
||||
PDFObjectReference PDFDocumentBuilder::getCatalogReference() const
|
||||
{
|
||||
if (const PDFDictionary* trailerDictionary = getDictionaryFromObject(m_storage.getTrailerDictionary()))
|
||||
{
|
||||
PDFObject object = trailerDictionary->get("Root");
|
||||
if (object.isReference())
|
||||
{
|
||||
return object.getReference();
|
||||
}
|
||||
}
|
||||
|
||||
return PDFObjectReference();
|
||||
}
|
||||
|
||||
void PDFDocumentBuilder::updateDocumentInfo(PDFObject info)
|
||||
{
|
||||
PDFObjectReference infoReference = getDocumentInfo();
|
||||
if (!infoReference.isValid())
|
||||
{
|
||||
PDFObjectFactory objectFactory;
|
||||
objectFactory.beginDictionary();
|
||||
objectFactory.endDictionary();
|
||||
infoReference = addObject(objectFactory.takeObject());
|
||||
|
||||
// Update the trailer dictionary
|
||||
objectFactory.beginDictionary();
|
||||
objectFactory.beginDictionaryItem("Info");
|
||||
objectFactory << infoReference;
|
||||
objectFactory.endDictionaryItem();
|
||||
objectFactory.endDictionary();
|
||||
m_storage.updateTrailerDictionary(objectFactory.takeObject());
|
||||
}
|
||||
|
||||
mergeTo(infoReference, info);
|
||||
}
|
||||
|
||||
/* START GENERATED CODE */
|
||||
|
||||
PDFObjectReference PDFDocumentBuilder::appendPage(QRectF mediaBox)
|
||||
@ -1819,14 +1875,6 @@ PDFObject PDFDocumentBuilder::createTrailerDictionary(PDFObjectReference catalog
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("Size");
|
||||
objectBuilder << 1;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.beginDictionaryItem("Root");
|
||||
objectBuilder << catalog;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.beginDictionaryItem("Info");
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("Producer");
|
||||
objectBuilder << getProducerString();
|
||||
@ -1838,6 +1886,16 @@ PDFObject PDFDocumentBuilder::createTrailerDictionary(PDFObjectReference catalog
|
||||
objectBuilder << WrapCurrentDateTime();
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObjectReference infoDictionary = addObject(objectBuilder.takeObject());
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("Size");
|
||||
objectBuilder << 1;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.beginDictionaryItem("Root");
|
||||
objectBuilder << catalog;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.beginDictionaryItem("Info");
|
||||
objectBuilder << infoDictionary;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject trailerDictionary = objectBuilder.takeObject();
|
||||
@ -1845,6 +1903,126 @@ PDFObject PDFDocumentBuilder::createTrailerDictionary(PDFObjectReference catalog
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setDocumentAuthor(QString author)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("Author");
|
||||
objectBuilder << author;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject info = objectBuilder.takeObject();
|
||||
updateDocumentInfo(qMove(info));
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setDocumentCreationDate(QDateTime creationDate)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("CreationDate");
|
||||
objectBuilder << creationDate;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject info = objectBuilder.takeObject();
|
||||
updateDocumentInfo(qMove(info));
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setDocumentCreator(QString creator)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("Creator");
|
||||
objectBuilder << creator;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject info = objectBuilder.takeObject();
|
||||
updateDocumentInfo(qMove(info));
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setDocumentKeywords(QString keywords)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("Keywords");
|
||||
objectBuilder << keywords;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject info = objectBuilder.takeObject();
|
||||
updateDocumentInfo(qMove(info));
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setDocumentProducer(QString producer)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("Producer");
|
||||
objectBuilder << producer;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject info = objectBuilder.takeObject();
|
||||
updateDocumentInfo(qMove(info));
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setDocumentSubject(QString subject)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("Subject");
|
||||
objectBuilder << subject;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject info = objectBuilder.takeObject();
|
||||
updateDocumentInfo(qMove(info));
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setDocumentTitle(QString title)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("Title");
|
||||
objectBuilder << title;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject info = objectBuilder.takeObject();
|
||||
updateDocumentInfo(qMove(info));
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setLanguage(QString language)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("Lang");
|
||||
objectBuilder << language;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject updatedCatalog = objectBuilder.takeObject();
|
||||
mergeTo(getCatalogReference(), updatedCatalog);
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setLanguage(QLocale locale)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
setLanguage(locale.name());
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::updateTrailerDictionary(PDFInteger objectCount)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
@ -1853,7 +2031,8 @@ void PDFDocumentBuilder::updateTrailerDictionary(PDFInteger objectCount)
|
||||
objectBuilder.beginDictionaryItem("Size");
|
||||
objectBuilder << objectCount;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.beginDictionaryItem("Info");
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject trailerDictionary = objectBuilder.takeObject();
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("Producer");
|
||||
objectBuilder << getProducerString();
|
||||
@ -1862,10 +2041,9 @@ void PDFDocumentBuilder::updateTrailerDictionary(PDFInteger objectCount)
|
||||
objectBuilder << WrapCurrentDateTime();
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject trailerDictionary = objectBuilder.takeObject();
|
||||
PDFObject updatedInfoDictionary = objectBuilder.takeObject();
|
||||
m_storage.updateTrailerDictionary(qMove(trailerDictionary));
|
||||
updateDocumentInfo(qMove(updatedInfoDictionary));
|
||||
}
|
||||
|
||||
|
||||
|
@ -106,6 +106,7 @@ public:
|
||||
PDFObjectFactory& operator<<(WrapString string);
|
||||
PDFObjectFactory& operator<<(AnnotationLineEnding lineEnding);
|
||||
PDFObjectFactory& operator<<(const QPointF& point);
|
||||
PDFObjectFactory& operator<<(const QDateTime& dateTime);
|
||||
|
||||
/// Treat containers - write them as array
|
||||
template<typename Container, typename ValueType = decltype(*std::begin(std::declval<Container>()))>
|
||||
@ -616,6 +617,53 @@ public:
|
||||
PDFObject createTrailerDictionary(PDFObjectReference catalog);
|
||||
|
||||
|
||||
/// Set document author.
|
||||
/// \param author Author
|
||||
void setDocumentAuthor(QString author);
|
||||
|
||||
|
||||
/// Set document creation date.
|
||||
/// \param creationDate Creation date/time
|
||||
void setDocumentCreationDate(QDateTime creationDate);
|
||||
|
||||
|
||||
/// Set document creator.
|
||||
/// \param creator Creator
|
||||
void setDocumentCreator(QString creator);
|
||||
|
||||
|
||||
/// Set document keywords.
|
||||
/// \param keywords Keywords
|
||||
void setDocumentKeywords(QString keywords);
|
||||
|
||||
|
||||
/// Set document producer.
|
||||
/// \param producer Producer
|
||||
void setDocumentProducer(QString producer);
|
||||
|
||||
|
||||
/// Set document subject.
|
||||
/// \param subject Subject
|
||||
void setDocumentSubject(QString subject);
|
||||
|
||||
|
||||
/// Set document title.
|
||||
/// \param title Title
|
||||
void setDocumentTitle(QString title);
|
||||
|
||||
|
||||
/// Set document language.
|
||||
/// \param language Document language. It should be a language identifier, as defined in ISO 639
|
||||
/// and ISO 3166. For example, "en-US", where first two letter means language code (en =
|
||||
/// english), and the latter two is country code (US - United States).
|
||||
void setLanguage(QString language);
|
||||
|
||||
|
||||
/// Set document language.
|
||||
/// \param locale Locale, from which is language determined
|
||||
void setLanguage(QLocale locale);
|
||||
|
||||
|
||||
/// This function is used to update trailer dictionary. Must be called each time the final document is
|
||||
/// being built.
|
||||
/// \param objectCount Number of objects (including empty ones)
|
||||
@ -632,6 +680,9 @@ private:
|
||||
QString getProducerString() const;
|
||||
PDFObjectReference getPageTreeRoot() const;
|
||||
PDFInteger getPageTreeRootChildCount() const;
|
||||
PDFObjectReference getDocumentInfo() const;
|
||||
PDFObjectReference getCatalogReference() const;
|
||||
void updateDocumentInfo(PDFObject info);
|
||||
|
||||
PDFObjectStorage m_storage;
|
||||
PDFVersion m_version;
|
||||
|
@ -4396,6 +4396,44 @@ return annotationObject;</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">Producer</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">getProducerString()</property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedPDFObject">
|
||||
<property name="objectName"></property>
|
||||
<property name="items"/>
|
||||
<property name="dictionaryItemName">CreationDate</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">WrapCurrentDateTime()</property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedPDFObject">
|
||||
<property name="objectName"></property>
|
||||
<property name="items"/>
|
||||
<property name="dictionaryItemName">ModDate</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">WrapCurrentDateTime()</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">infoDictionary</property>
|
||||
<property name="variableType">_PDFObjectReference</property>
|
||||
<property name="code"></property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedAction">
|
||||
<property name="objectName"></property>
|
||||
<property name="items">
|
||||
@ -4418,40 +4456,10 @@ return annotationObject;</property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedPDFObject">
|
||||
<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">Producer</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">getProducerString()</property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedPDFObject">
|
||||
<property name="objectName"></property>
|
||||
<property name="items"/>
|
||||
<property name="dictionaryItemName">CreationDate</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">WrapCurrentDateTime()</property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedPDFObject">
|
||||
<property name="objectName"></property>
|
||||
<property name="items"/>
|
||||
<property name="dictionaryItemName">ModDate</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">WrapCurrentDateTime()</property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="dictionaryItemName"></property>
|
||||
<property name="objectType">Dictionary</property>
|
||||
<property name="value"></property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="items"/>
|
||||
<property name="dictionaryItemName">Info</property>
|
||||
<property name="objectType">DictionaryItemComplex</property>
|
||||
<property name="value"></property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">infoDictionary</property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="dictionaryItemName"></property>
|
||||
@ -4478,6 +4486,495 @@ return annotationObject;</property>
|
||||
<property name="functionDescription">This function is used to create a new trailer dictionary, when blank document is created. Do not call this function manually.</property>
|
||||
<property name="returnType">_PDFObject</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">author</property>
|
||||
<property name="parameterType">_QString</property>
|
||||
<property name="parameterDescription">Author</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">Author</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">author</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">info</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">updateDocumentInfo(qMove(info));</property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="functionType">Structure</property>
|
||||
<property name="functionName">setDocumentAuthor</property>
|
||||
<property name="functionDescription">Set document author.</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">creationDate</property>
|
||||
<property name="parameterType">_QDateTime</property>
|
||||
<property name="parameterDescription">Creation date/time</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">CreationDate</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">creationDate</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">info</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">updateDocumentInfo(qMove(info));</property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="functionType">Structure</property>
|
||||
<property name="functionName">setDocumentCreationDate</property>
|
||||
<property name="functionDescription">Set document creation date.</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">creator</property>
|
||||
<property name="parameterType">_QString</property>
|
||||
<property name="parameterDescription">Creator</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">Creator</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">creator</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">info</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">updateDocumentInfo(qMove(info));</property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="functionType">Structure</property>
|
||||
<property name="functionName">setDocumentCreator</property>
|
||||
<property name="functionDescription">Set document creator.</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">keywords</property>
|
||||
<property name="parameterType">_QString</property>
|
||||
<property name="parameterDescription">Keywords</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">Keywords</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">keywords</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">info</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">updateDocumentInfo(qMove(info));</property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="functionType">Structure</property>
|
||||
<property name="functionName">setDocumentKeywords</property>
|
||||
<property name="functionDescription">Set document keywords.</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">producer</property>
|
||||
<property name="parameterType">_QString</property>
|
||||
<property name="parameterDescription">Producer</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">Producer</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">producer</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">info</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">updateDocumentInfo(qMove(info));</property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="functionType">Structure</property>
|
||||
<property name="functionName">setDocumentProducer</property>
|
||||
<property name="functionDescription">Set document producer.</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">subject</property>
|
||||
<property name="parameterType">_QString</property>
|
||||
<property name="parameterDescription">Subject</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">Subject</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">subject</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">info</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">updateDocumentInfo(qMove(info));</property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="functionType">Structure</property>
|
||||
<property name="functionName">setDocumentSubject</property>
|
||||
<property name="functionDescription">Set document subject.</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">title</property>
|
||||
<property name="parameterType">_QString</property>
|
||||
<property name="parameterDescription">Title</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">Title</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">title</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">info</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">updateDocumentInfo(qMove(info));</property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="functionType">Structure</property>
|
||||
<property name="functionName">setDocumentTitle</property>
|
||||
<property name="functionDescription">Set document title.</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">language</property>
|
||||
<property name="parameterType">_QString</property>
|
||||
<property name="parameterDescription">Document language. It should be a language identifier, as defined in ISO 639 and ISO 3166. For example, "en-US", where first two letter means language code (en = english), and the latter two is country code (US - United States).</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">Lang</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">language</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">updatedCatalog</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(getCatalogReference(), updatedCatalog);</property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="functionType">Structure</property>
|
||||
<property name="functionName">setLanguage</property>
|
||||
<property name="functionDescription">Set document language.</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">locale</property>
|
||||
<property name="parameterType">_QLocale</property>
|
||||
<property name="parameterDescription">Locale, from which is language determined</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"/>
|
||||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">setLanguage(locale.name());</property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="functionType">Structure</property>
|
||||
<property name="functionName">setLanguage</property>
|
||||
<property name="functionDescription">Set document language.</property>
|
||||
<property name="returnType">_void</property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedFunction">
|
||||
<property name="objectName"></property>
|
||||
<property name="items">
|
||||
@ -4510,36 +5007,6 @@ return annotationObject;</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">objectCount</property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedPDFObject">
|
||||
<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">Producer</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">getProducerString()</property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedPDFObject">
|
||||
<property name="objectName"></property>
|
||||
<property name="items"/>
|
||||
<property name="dictionaryItemName">ModDate</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">WrapCurrentDateTime()</property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="dictionaryItemName"></property>
|
||||
<property name="objectType">Dictionary</property>
|
||||
<property name="value"></property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="dictionaryItemName">Info</property>
|
||||
<property name="objectType">DictionaryItemComplex</property>
|
||||
<property name="value"></property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="dictionaryItemName"></property>
|
||||
<property name="objectType">Dictionary</property>
|
||||
@ -4551,13 +5018,45 @@ return annotationObject;</property>
|
||||
<property name="variableType">_PDFObject</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">Producer</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">getProducerString()</property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedPDFObject">
|
||||
<property name="objectName"></property>
|
||||
<property name="items"/>
|
||||
<property name="dictionaryItemName">ModDate</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">WrapCurrentDateTime()</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">updatedInfoDictionary</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">m_storage.updateTrailerDictionary(qMove(trailerDictionary));</property>
|
||||
<property name="code">m_storage.updateTrailerDictionary(qMove(trailerDictionary));
|
||||
updateDocumentInfo(qMove(updatedInfoDictionary));</property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="functionType">Structure</property>
|
||||
|
Loading…
Reference in New Issue
Block a user