summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
diff options
context:
space:
mode:
authorHan The Thanh <hanthethanh@gmail.com>2010-04-16 14:22:46 +0000
committerHan The Thanh <hanthethanh@gmail.com>2010-04-16 14:22:46 +0000
commitf8704eb9be56364ed1dce301630cef616406302d (patch)
treed826548d0d89829897fcacb0c301f0b950b4e049 /Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
parent1a4eb7d7de2042c12e223a2eb31bc016de246561 (diff)
some more fixes for pdftex
git-svn-id: svn://tug.org/texlive/trunk@17893 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/pdftexdir/pdftoepdf.cc')
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftoepdf.cc28
1 files changed, 4 insertions, 24 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
index fd1b5365cb5..b687da19fc5 100644
--- a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
+++ b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
@@ -697,7 +697,6 @@ read_pdf_info(char *image_name, char *page_name, integer page_num,
{
PdfDocument *pdf_doc;
Page *page;
- int rotate;
PDFRectangle *pagebox;
#ifdef HAVE_GETPDFMAJORVERSION
int pdf_major_version_found, pdf_minor_version_found;
@@ -783,29 +782,10 @@ read_pdf_info(char *image_name, char *page_name, integer page_num,
epdf_height = pagebox->y1 - pagebox->y2;
}
- // handle page rotation and adjust dimens as needed
- rotate = page->getRotate();
- if (rotate != 0) {
- if (rotate % 90 == 0) {
- // handle only the simple case: multiple of 90s.
- // these are the only values allowed according to the
- // reference (v1.3, p. 78).
- // 180 needs no special treatment here
- register float f;
- switch (rotate) {
- case 90:
- f = epdf_height;
- epdf_height = epdf_width;
- epdf_width = f;
- break;
- case 270:
- f = epdf_height;
- epdf_height = epdf_width;
- epdf_width = f;
- break;
- }
- }
- }
+ // get page rotation
+ epdf_rotate = page->getRotate() % 360;
+ if (epdf_rotate < 0)
+ epdf_rotate += 360;
pdf_doc->xref = pdf_doc->doc->getXRef();
return page_num;