Post without Account — your post will be reviewed, and if appropriate, posted under Anonymous. You can also use this link to report any problems registering or logging in.

CTS 2 - Heights and widths exceeding 200 inches

  • 2 Replies
  • 1305 Views
*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 417
    • View Profile
CTS 2 - Heights and widths exceeding 200 inches
« February 19, 2017, 05:14:00 PM »
Per article page width limit of 200 inches, PDFs have some constraints on their document sizes. While 200 inches on a side is plenty big for most applications (indeed, it could cover the Mt. Palomar Hale telescope's mirror), apparently some people have seriously tried to make larger documents.

Quote
In PDF Reference, Fifth Edition, version 1.6 one can read (paragraphe 171, page 1033) :

    In PDF versions earlier than PDF 1.6, the size of the default user space unit is fixed at 1⁄72 inch.
    In Acrobat viewers earlier than version 4.0, the minimum allowed page size is 72 by 72 units in default user space (1 by 1 inch); the maximum is 3240 by 3240 units (45 by 45 inches).
    In Acrobat versions 5.0 and later, the minimum allowed page size is 3 by 3 units (approximately 0.04 by 0.04 inch); the maximum is 14,400 by 14,400 units (200 by 200 inches).
    Beginning with PDF 1.6, the size of the default user space unit may be set with the UserUnit entry of the page dictionary.
    Acrobat 7.0 supports a maximum UserUnit value of 75,000, which gives a maximum page dimension of 15,000,000 inches (14,400 * 75,000 * 1⁄72). The minimum UserUnit value is 1.0 (the default).

So the size limitation turns out to be a matter of "UserUnit" value. The problem would be solved if this value was an option in [HTML to PDF converter wkHTMLtoPDF], something like : --user-unit (default : 1)

and

Quote
So it sounds like there are two different size limitations happening: by PDF version number and by Acrobat.

PDF < 1.6 -- User Space Unit fixed at 1/72"
>= 1.6 -- User Space Unit may be set (UserUnit)

Acrobat < 4.0 -- maximum 3240 units square (45")
< 7.0 -- maximum 14400 units square (200")
>= 7.0 -- maximum 14400 units square AND maximum UserUnit 75000 (15E6")

Given that Acrobat is probably by far the most used PDF reader* (or at least Adobe products are), what should our maximum page sizes be for a given PDF version? Can we count on just about everyone being at Acrobat 7.0 or equivalent? Remember that there are still some businesses and government agencies who mandate IE 6 (!) for browsers, so it may be safer to stick to older limits.

* How do Adobe Reader and PDF plug-ins for browsers map to Acrobat's versions?

Note that the referenced PDF document is not the latest version. I haven't dug through this part of the PDF 1.7 definition yet, but it sounds like the only change in PDF is (as of 1.6) that "UserUnit" may be set (default: 1 Pt, maximum 75000 Pt). Perhaps a warning should be issued if measurements exceed 14400 UserUnits (tough luck to pre-Acrobat 4 users with a 3240 limit, or perhaps we could add another warning for them).

Needless to say, such a change requires that we pay attention to the PDF version being output. That has to be implemented first.
« Last Edit: February 26, 2017, 10:56:30 PM by Phil »

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 417
    • View Profile
Re: CTS 2 - Heights and widths exceeding 200 inches
« Reply #1: September 09, 2018, 06:48:24 PM »
I'll have to check if there are any further developments in the PDF 1.7 spec. Don't forget to use the PDF version check to specify a 1.6 minimum output, if we add a new method to explicitly specify User Units, and/or check for a media size in excess of 14400 points and automatically generate a User Units call. In the latter case, there should be a warning message that resolution has decreased (the PDF may be blockier or grainier -- I haven't tried it yet) and old Acrobats (< 7.0) will fail. This probably should be data carried along until final output (just like default MediaBox data -- Not passing Validation / #83), in case the user later explicitly requests a new value.

This still leaves the issue of what to do (if anything) about the use of earlier Acrobat readers and tools that either allow only a maximum 3240 point media size (Acrobat < 4.0) or don't allow a User Units setting (Acrobat < 7.0). Perhaps there could be a suppressible warning message that there will be problems with certain versions of Acrobat? It would be nice to generalize the warning check routine in case there are any other Acrobat-level warnings to implement in the future. In this day and age, is anyone still on backlevel Acrobat programs? Is it worth the bother? Perhaps it would be better to have a separate "lint" utility to read a PDF and warn if problems can be expected on certain Acrobat (and other tools) levels.

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 417
    • View Profile
Re: CTS 2 - Heights and widths exceeding 200 inches
« Reply #2: September 11, 2018, 09:07:09 AM »
Need to fully investigate this UU scaling: must it be done before any coordinates are output? What happens if it changes in the middle of a page? If I have a line 72Pt long, and set UserUnits to 72, do I now just use a line 1UU long, or continue to use 72? What are the effects on output granularity -- would my pixels now be 1 inch square, and my coordinate grid likewise coarse? What happens to images?