diff options
author | Jay Berkenbilt <ejb@ql.org> | 2020-12-30 18:51:04 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2020-12-30 19:03:55 +0100 |
commit | c9271335fa8eef118b7294076bd079698919f430 (patch) | |
tree | 78a8f4f164ce9e91aa87f89331590e8bcd0da935 /include | |
parent | 78c49824eb7ad969be59291d4d7e44314078e828 (diff) | |
download | qpdf-c9271335fa8eef118b7294076bd079698919f430.tar.zst |
Add QPDFPageObjectHelper::flattenRotation and --flatten-rotation
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFPageObjectHelper.hh | 10 |
1 files changed, 10 insertions, 0 deletions
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( |