mirror of https://github.com/JakubMelka/PDF4QT.git
Signature plugin: visible digital signatures
This commit is contained in:
parent
c7e7b76e5b
commit
b46ff4f63c
|
@ -4567,6 +4567,46 @@ PDFObjectReference PDFDocumentBuilder::createFormFieldSignature(QString fieldNam
|
|||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::createFormFieldWidget(PDFObjectReference formField,
|
||||
PDFObjectReference page,
|
||||
PDFObjectReference appearanceStream,
|
||||
QRectF rect)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("Type");
|
||||
objectBuilder << WrapName("Annot");
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.beginDictionaryItem("Subtype");
|
||||
objectBuilder << WrapName("Widget");
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.beginDictionaryItem("P");
|
||||
objectBuilder << page;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.beginDictionaryItem("Rect");
|
||||
objectBuilder << rect;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.beginDictionaryItem("AP");
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("N");
|
||||
objectBuilder << appearanceStream;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject widgetObject = objectBuilder.takeObject();
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("Annots");
|
||||
objectBuilder << std::array{ formField };
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject pageObject = objectBuilder.takeObject();
|
||||
mergeTo(formField, widgetObject);
|
||||
appendTo(page, pageObject);
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::createInvisibleFormFieldWidget(PDFObjectReference formField,
|
||||
PDFObjectReference page)
|
||||
{
|
||||
|
@ -5131,6 +5171,14 @@ void PDFDocumentBuilder::setFormFieldValue(PDFObjectReference formField,
|
|||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setLanguage(QLocale locale)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
setLanguage(locale.name());
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setLanguage(QString language)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
@ -5145,14 +5193,6 @@ void PDFDocumentBuilder::setLanguage(QString language)
|
|||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setLanguage(QLocale locale)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
setLanguage(locale.name());
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setOutline(PDFObjectReference outline)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
|
|
@ -92,7 +92,7 @@ struct WrapEmptyArray { };
|
|||
|
||||
/// Factory for creating various PDF objects, such as simple objects,
|
||||
/// dictionaries, arrays etc.
|
||||
class PDFObjectFactory
|
||||
class PDF4QTLIBSHARED_EXPORT PDFObjectFactory
|
||||
{
|
||||
public:
|
||||
inline explicit PDFObjectFactory() = default;
|
||||
|
@ -1235,6 +1235,17 @@ public:
|
|||
PDFObjectReference signatureValue);
|
||||
|
||||
|
||||
/// Creates visible form field widget without contents.
|
||||
/// \param formField Form field reference
|
||||
/// \param page Page reference
|
||||
/// \param appearanceStream Appearance stream
|
||||
/// \param rect Widget rectangle
|
||||
void createFormFieldWidget(PDFObjectReference formField,
|
||||
PDFObjectReference page,
|
||||
PDFObjectReference appearanceStream,
|
||||
QRectF rect);
|
||||
|
||||
|
||||
///
|
||||
/// \param formField Form field reference
|
||||
/// \param page Page reference
|
||||
|
@ -1457,6 +1468,11 @@ public:
|
|||
PDFObject value);
|
||||
|
||||
|
||||
/// Set document language.
|
||||
/// \param locale Locale, from which is language determined
|
||||
void setLanguage(QLocale locale);
|
||||
|
||||
|
||||
/// 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 =
|
||||
|
@ -1464,11 +1480,6 @@ public:
|
|||
void setLanguage(QString language);
|
||||
|
||||
|
||||
/// Set document language.
|
||||
/// \param locale Locale, from which is language determined
|
||||
void setLanguage(QLocale locale);
|
||||
|
||||
|
||||
/// Set document outline.
|
||||
/// \param outline Document outline root
|
||||
void setOutline(PDFObjectReference outline);
|
||||
|
|
|
@ -889,6 +889,21 @@ std::set<PDFInteger> PDFPageContentScene::getPageIndices() const
|
|||
return result;
|
||||
}
|
||||
|
||||
QRectF PDFPageContentScene::getBoundingBox(PDFInteger pageIndex) const
|
||||
{
|
||||
QRectF rect;
|
||||
|
||||
for (const auto& element : m_elements)
|
||||
{
|
||||
if (element->getPageIndex() == pageIndex)
|
||||
{
|
||||
rect = rect.united(element->getBoundingBox());
|
||||
}
|
||||
}
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
void PDFPageContentScene::setSelectedElementIds(const std::set<PDFInteger>& selectedElementIds)
|
||||
{
|
||||
m_manipulator.selectNew(selectedElementIds);
|
||||
|
|
|
@ -507,6 +507,9 @@ public:
|
|||
/// Returns set of involved pages
|
||||
std::set<PDFInteger> getPageIndices() const;
|
||||
|
||||
/// Returns bounding box of elements on page
|
||||
QRectF getBoundingBox(PDFInteger pageIndex) const;
|
||||
|
||||
/// Set selected items
|
||||
void setSelectedElementIds(const std::set<PDFInteger>& selectedElementIds);
|
||||
|
||||
|
|
|
@ -346,15 +346,62 @@ void SignaturePlugin::onSignDigitally()
|
|||
pdf::PDFObjectReference formField = builder.createFormFieldSignature(signatureName, { }, signatureDictionary);
|
||||
builder.createAcroForm({ formField });
|
||||
|
||||
const pdf::PDFCatalog* catalog = m_document->getCatalog();
|
||||
if (dialog.getSignMethod() == SignDialog::SignDigitallyInvisible)
|
||||
{
|
||||
const pdf::PDFCatalog* catalog = m_document->getCatalog();
|
||||
if (catalog->getPageCount() > 0)
|
||||
{
|
||||
const pdf::PDFObjectReference pageReference = catalog->getPage(0)->getPageReference();
|
||||
builder.createInvisibleFormFieldWidget(formField, pageReference);
|
||||
}
|
||||
}
|
||||
else if (dialog.getSignMethod() == SignDialog::SignDigitally)
|
||||
{
|
||||
Q_ASSERT(!m_scene.isEmpty());
|
||||
const pdf::PDFInteger pageIndex = *m_scene.getPageIndices().begin();
|
||||
const pdf::PDFPage* page = catalog->getPage(pageIndex);
|
||||
|
||||
pdf::PDFContentStreamBuilder contentBuilder(page->getMediaBox().size(), pdf::PDFContentStreamBuilder::CoordinateSystem::PDF);
|
||||
QPainter* painter = contentBuilder.begin();
|
||||
QList<pdf::PDFRenderError> errors;
|
||||
pdf::PDFTextLayoutGetter nullGetter(nullptr, pageIndex);
|
||||
m_scene.drawPage(painter, pageIndex, nullptr, nullGetter, QMatrix(), errors);
|
||||
pdf::PDFContentStreamBuilder::ContentStream contentStream = contentBuilder.end(painter);
|
||||
|
||||
QRectF boundingRect = m_scene.getBoundingBox(pageIndex);
|
||||
std::vector<pdf::PDFObject> copiedObjects = builder.copyFrom({ contentStream.resources, contentStream.contents }, contentStream.document.getStorage(), true);
|
||||
Q_ASSERT(copiedObjects.size() == 2);
|
||||
|
||||
pdf::PDFObjectReference resourcesReference = copiedObjects[0].getReference();
|
||||
pdf::PDFObjectReference formReference = copiedObjects[1].getReference();
|
||||
|
||||
// Create form object
|
||||
pdf::PDFObjectFactory formFactory;
|
||||
|
||||
formFactory.beginDictionary();
|
||||
|
||||
formFactory.beginDictionaryItem("Type");
|
||||
formFactory << pdf::WrapName("XObject");
|
||||
formFactory.endDictionaryItem();
|
||||
|
||||
formFactory.beginDictionaryItem("Subtype");
|
||||
formFactory << pdf::WrapName("Form");
|
||||
formFactory.endDictionaryItem();
|
||||
|
||||
formFactory.beginDictionaryItem("BBox");
|
||||
formFactory << boundingRect;
|
||||
formFactory.endDictionaryItem();
|
||||
|
||||
formFactory.beginDictionaryItem("Resources");
|
||||
formFactory << resourcesReference;
|
||||
formFactory.endDictionaryItem();
|
||||
|
||||
formFactory.endDictionary();
|
||||
|
||||
builder.mergeTo(formReference, formFactory.takeObject());
|
||||
|
||||
builder.createFormFieldWidget(formField, page->getPageReference(), formReference, boundingRect);
|
||||
}
|
||||
|
||||
QString reasonText = dialog.getReasonText();
|
||||
if (!reasonText.isEmpty())
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(getPageTreeRoot(), updatedTreeRoot);
|
||||
<property name="code">appendTo(getPageTreeRoot(), updatedTreeRoot);

|
||||
return pageReference;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -182,7 +182,7 @@ return pageReference;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">setCatalogAcroForm(acroForm);
|
||||
<property name="code">setCatalogAcroForm(acroForm);

|
||||
return acroForm;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -2386,8 +2386,8 @@ return acroForm;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -2610,8 +2610,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -2785,8 +2785,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationReference);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationReference);

|
||||
return annotationReference;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -3067,8 +3067,8 @@ return annotationReference;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -3270,8 +3270,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -3545,8 +3545,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -3749,8 +3749,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -3904,8 +3904,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -4044,8 +4044,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -4269,8 +4269,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -4486,8 +4486,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -4768,8 +4768,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -5120,8 +5120,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -5321,8 +5321,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationReference);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationReference);

|
||||
return annotationReference;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -5552,8 +5552,8 @@ return annotationReference;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -5812,8 +5812,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -5951,8 +5951,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">mergeTo(parentAnnotation, upgradedParentAnnotation);
|
||||
updateAnnotationAppearanceStreams(popupAnnotation);
|
||||
<property name="code">mergeTo(parentAnnotation, upgradedParentAnnotation);

|
||||
updateAnnotationAppearanceStreams(popupAnnotation);

|
||||
return popupAnnotation;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -6106,8 +6106,8 @@ return popupAnnotation;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -6246,8 +6246,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -6470,8 +6470,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -6625,8 +6625,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -6765,8 +6765,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -6969,8 +6969,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -7158,8 +7158,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -7362,8 +7362,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -7517,8 +7517,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -7657,8 +7657,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -7899,9 +7899,9 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">mergeTo(annotationObject, updateAnnotationPopup);
|
||||
appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">mergeTo(annotationObject, updateAnnotationPopup);

|
||||
appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -8055,8 +8055,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -8195,8 +8195,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -8399,8 +8399,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">appendTo(page, pageAnnots);
|
||||
updateAnnotationAppearanceStreams(annotationObject);
|
||||
<property name="code">appendTo(page, pageAnnots);

|
||||
updateAnnotationAppearanceStreams(annotationObject);

|
||||
return annotationObject;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -8716,8 +8716,8 @@ return annotationObject;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">mergeTo(rootNodeReference, updatedRootNode);
|
||||
mergeTo(getCatalogReference(), updatedCatalog);
|
||||
<property name="code">mergeTo(rootNodeReference, updatedRootNode);

|
||||
mergeTo(getCatalogReference(), updatedCatalog);

|
||||
return rootNodeReference;</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -8946,6 +8946,153 @@ return rootNodeReference;</property>
|
|||
<property name="functionDescription">Creates form field of type signature.</property>
|
||||
<property name="returnType">_PDFObjectReference</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">formField</property>
|
||||
<property name="parameterType">_PDFObjectReference</property>
|
||||
<property name="parameterDescription">Form field reference</property>
|
||||
</QObject>
|
||||
<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 reference</property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedParameter">
|
||||
<property name="objectName"></property>
|
||||
<property name="items"/>
|
||||
<property name="parameterName">appearanceStream</property>
|
||||
<property name="parameterType">_PDFObjectReference</property>
|
||||
<property name="parameterDescription">Appearance stream</property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedParameter">
|
||||
<property name="objectName"></property>
|
||||
<property name="items"/>
|
||||
<property name="parameterName">rect</property>
|
||||
<property name="parameterType">_QRectF</property>
|
||||
<property name="parameterDescription">Widget rectangle</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("Annot")</property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedPDFObject">
|
||||
<property name="objectName"></property>
|
||||
<property name="items"/>
|
||||
<property name="dictionaryItemName">Subtype</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">WrapName("Widget")</property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedPDFObject">
|
||||
<property name="objectName"></property>
|
||||
<property name="items"/>
|
||||
<property name="dictionaryItemName">P</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">page</property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedPDFObject">
|
||||
<property name="objectName"></property>
|
||||
<property name="items"/>
|
||||
<property name="dictionaryItemName">Rect</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">rect</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">N</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">appearanceStream</property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="dictionaryItemName"></property>
|
||||
<property name="objectType">Dictionary</property>
|
||||
<property name="value"></property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="dictionaryItemName">AP</property>
|
||||
<property name="objectType">DictionaryItemComplex</property>
|
||||
<property name="value"></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">widgetObject</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">Annots</property>
|
||||
<property name="objectType">DictionaryItemSimple</property>
|
||||
<property name="value">std::array{ formField }</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">pageObject</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(formField, widgetObject);
|
||||
appendTo(page, pageObject);</property>
|
||||
</QObject>
|
||||
</property>
|
||||
<property name="functionType">Structure</property>
|
||||
<property name="functionName">createFormFieldWidget</property>
|
||||
<property name="functionDescription">Creates visible form field widget without contents.</property>
|
||||
<property name="returnType">_void</property>
|
||||
</QObject>
|
||||
<QObject class="codegen::GeneratedFunction">
|
||||
<property name="objectName"></property>
|
||||
<property name="items">
|
||||
|
@ -9047,7 +9194,7 @@ return rootNodeReference;</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">mergeTo(formField, widgetObject);
|
||||
<property name="code">mergeTo(formField, widgetObject);
|
||||
appendTo(page, pageObject);</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
@ -11140,6 +11287,39 @@ appendTo(page, pageObject);</property>
|
|||
<property name="functionDescription">Sets form field value. Value must be correct for this form field, no checking is performed. Also, if you use this function, annotation widgets, which are attached to this form field, should also be updated (for example, appearance state and sometimes appearance streams).</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">
|
||||
|
@ -11197,39 +11377,6 @@ appendTo(page, pageObject);</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">
|
||||
|
@ -12007,7 +12154,7 @@ appendTo(page, pageObject);</property>
|
|||
<property name="actionType">Code</property>
|
||||
<property name="variableName"></property>
|
||||
<property name="variableType">_void</property>
|
||||
<property name="code">m_storage.updateTrailerDictionary(qMove(trailerDictionary));
|
||||
<property name="code">m_storage.updateTrailerDictionary(qMove(trailerDictionary));

|
||||
updateDocumentInfo(qMove(updatedInfoDictionary));</property>
|
||||
</QObject>
|
||||
</property>
|
||||
|
|
Loading…
Reference in New Issue