We're building a pre-flight tool to check page orientation and auto-rotate to consistantly build right reading books whether or not the page is landscape or portait but we're coming up with pdfs with MediaBox[0 -612 792 0] and getting page height = 0 and then the tool fails. We don't seem to be able to fix this programmatically. /Rotate = 0. Most of these PDFs are 1.6 but It was noticed that in PDF version 1.6 there is no mediabox and instead just has /BBox. Is there some significance to this? There doesn't seem to be a /Rotate either. I believe these pdfs are created programattically via some API rather than through InDesign or Distiller. We're trying to find a consistent way of determinig page size to do our calculations and/or be able to repair a pdf prior manipulation.
Any ideas how we should go about this? We are using a 3rd party API to do the work but this seems an issue with the actual PDF vs. the API, at least at this point.
thanks,
Bob