mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Set page boxes
This commit is contained in:
@ -3315,6 +3315,20 @@ void PDFDocumentBuilder::setCatalogAcroForm(PDFObjectReference acroForm)
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setCatalogNames(PDFObjectReference names)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("Names");
|
||||
objectBuilder << ((names.isValid()) ? PDFObject::createReference(names) : PDFObject());
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject updatedCatalog = objectBuilder.takeObject();
|
||||
mergeTo(getCatalogReference(), updatedCatalog);
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setCatalogOptionalContentProperties(PDFObjectReference ocProperties)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
@ -3494,6 +3508,51 @@ void PDFDocumentBuilder::setLanguage(QString language)
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setPageArtBox(PDFObjectReference page,
|
||||
QRectF box)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("ArtBox");
|
||||
objectBuilder << box;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject updatedPageObject = objectBuilder.takeObject();
|
||||
mergeTo(page, updatedPageObject);
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setPageBleedBox(PDFObjectReference page,
|
||||
QRectF box)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("BleedBox");
|
||||
objectBuilder << box;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject updatedPageObject = objectBuilder.takeObject();
|
||||
mergeTo(page, updatedPageObject);
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setPageCropBox(PDFObjectReference page,
|
||||
QRectF box)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("CropBox");
|
||||
objectBuilder << box;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject updatedPageObject = objectBuilder.takeObject();
|
||||
mergeTo(page, updatedPageObject);
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setPageDocumentPart(PDFObjectReference page,
|
||||
PDFObjectReference documentPart)
|
||||
{
|
||||
@ -3509,6 +3568,36 @@ void PDFDocumentBuilder::setPageDocumentPart(PDFObjectReference page,
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setPageMediaBox(PDFObjectReference page,
|
||||
QRectF box)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("MediaBox");
|
||||
objectBuilder << box;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject updatedPageObject = objectBuilder.takeObject();
|
||||
mergeTo(page, updatedPageObject);
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setPageTrimBox(PDFObjectReference page,
|
||||
QRectF box)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("TrimBox");
|
||||
objectBuilder << box;
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject updatedPageObject = objectBuilder.takeObject();
|
||||
mergeTo(page, updatedPageObject);
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::updateTrailerDictionary(PDFInteger objectCount)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
@ -3533,20 +3622,6 @@ void PDFDocumentBuilder::updateTrailerDictionary(PDFInteger objectCount)
|
||||
}
|
||||
|
||||
|
||||
void PDFDocumentBuilder::setCatalogNames(PDFObjectReference names)
|
||||
{
|
||||
PDFObjectFactory objectBuilder;
|
||||
|
||||
objectBuilder.beginDictionary();
|
||||
objectBuilder.beginDictionaryItem("Names");
|
||||
objectBuilder << ((names.isValid()) ? PDFObject::createReference(names) : PDFObject());
|
||||
objectBuilder.endDictionaryItem();
|
||||
objectBuilder.endDictionary();
|
||||
PDFObject updatedCatalog = objectBuilder.takeObject();
|
||||
mergeTo(getCatalogReference(), updatedCatalog);
|
||||
}
|
||||
|
||||
|
||||
/* END GENERATED CODE */
|
||||
|
||||
} // namespace pdf
|
||||
|
Reference in New Issue
Block a user