mirror of
				https://github.com/JakubMelka/PDF4QT.git
				synced 2025-06-05 21:59:17 +02:00 
			
		
		
		
	Redact bugfixing
This commit is contained in:
		| @@ -462,6 +462,30 @@ PDFObjectFactory& PDFObjectFactory::operator<<(TextAnnotationIcon icon) | ||||
|     return *this; | ||||
| } | ||||
|  | ||||
| PDFObjectFactory& PDFObjectFactory::operator<<(PageRotation pageRotation) | ||||
| { | ||||
|     switch (pageRotation) | ||||
|     { | ||||
|         case pdf::PageRotation::None: | ||||
|             *this << PDFInteger(0); | ||||
|             break; | ||||
|         case pdf::PageRotation::Rotate90: | ||||
|             *this << PDFInteger(90); | ||||
|             break; | ||||
|         case pdf::PageRotation::Rotate180: | ||||
|             *this << PDFInteger(180); | ||||
|             break; | ||||
|         case pdf::PageRotation::Rotate270: | ||||
|             *this << PDFInteger(270); | ||||
|             break; | ||||
|  | ||||
|         default: | ||||
|             Q_ASSERT(false); | ||||
|     } | ||||
|  | ||||
|     return *this; | ||||
| } | ||||
|  | ||||
| PDFObjectFactory& PDFObjectFactory::operator<<(WrapEmptyArray) | ||||
| { | ||||
|     beginArray(); | ||||
| @@ -4788,6 +4812,20 @@ void PDFDocumentBuilder::setPageMediaBox(PDFObjectReference page, | ||||
| } | ||||
|  | ||||
|  | ||||
| void PDFDocumentBuilder::setPageRotation(PDFObjectReference page, | ||||
|                                          PageRotation rotation) | ||||
| { | ||||
|     PDFObjectFactory objectBuilder; | ||||
|  | ||||
|     objectBuilder.beginDictionary(); | ||||
|     objectBuilder.beginDictionaryItem("Rotate"); | ||||
|     objectBuilder << rotation; | ||||
|     objectBuilder.endDictionaryItem(); | ||||
|     objectBuilder.endDictionary(); | ||||
|     PDFObject updatedPageObject = objectBuilder.takeObject(); | ||||
|     mergeTo(page, updatedPageObject); | ||||
| } | ||||
|  | ||||
| void PDFDocumentBuilder::setPageTrimBox(PDFObjectReference page, | ||||
|                                         QRectF box) | ||||
| { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user