xpdfSpliceGetPageRotation

Get the default rotation for an input page.
int xpdfSpliceGetPageRotation(XpdfSpliceInputHandle in, int page)
This function returns the default rotation, in degrees, of the specified page. The rotation will be one of: 0, 90, 180, or 270.

PDF pages can be rotated to landscape mode in two ways:

C:
XpdfSpliceInputHandle in; double width, height; int rot; in = xpdfSpliceOpenInput("c:/test/file.pdf"); width = xpdfSpliceGetPageWidth(in, 1); height = xpdfSpliceGetPageWidth(in, 1); rot = xpdfSpliceGetPageRotation(in, 1); if (((rot == 90 || rot == 270) && width < height) || ((rot == 0 || rot == 180) && width > height)) { /* page is landscape mode */ } else { /* page is portrait mode */ }
xpdfSpliceGetPageWidth
xpdfSpliceGetPageHeight