From c9271335fa8eef118b7294076bd079698919f430 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Wed, 30 Dec 2020 12:51:04 -0500 Subject: Add QPDFPageObjectHelper::flattenRotation and --flatten-rotation --- include/qpdf/QPDFPageObjectHelper.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/qpdf/QPDFPageObjectHelper.hh b/include/qpdf/QPDFPageObjectHelper.hh index a197ece7..42d67088 100644 --- a/include/qpdf/QPDFPageObjectHelper.hh +++ b/include/qpdf/QPDFPageObjectHelper.hh @@ -242,6 +242,16 @@ class QPDFPageObjectHelper: public QPDFObjectHelper bool allow_shrink = true, bool allow_expand = false); + // If a page is rotated using /Rotate in the page's dictionary, + // instead rotate the page by the same amount by altering the + // contents and removing the /Rotate key. This method adjusts the + // various page bounding boxes (/MediaBox, etc.) so that the page + // will have the same semantics. This can be useful to work around + // problems with PDF applications that can't properly handle + // rotated pages. + QPDF_DLL + void flattenRotation(); + private: static void removeUnreferencedResourcesHelper( -- cgit v1.2.3-54-g00ecf