Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Paper Size Constraints



To answer this one, I'll recap the paper matching policies in Jaguar ...

1. First we match on paper name. In the process of converting the JobTicket into CUPS options, we need to give the 'media' option a string value. We look for an entry in the target printer's PaperInfo array that has the same name as the document's PaperInfo. So if you format your document for A4 and there's an A4 entry in the printer's list, you will see media=A4 in the CUPS log. Note that you might format the document for one printer and print to a different one, and their A4 papers may have different sizes and margins. When we recreate the JobTicket for your PM, we use your PM's A4 PaperInfo ticket. That way we relieve the PM of compensating for margin differences between it and the formatting printer.

2. The next step applies to PostScript printers so I'll skip that for now since we're talking about Tioga PMs.

3. If the document was formatted for a custom paper size, we check if the target printer supports custom paper sizes. If your PM put custom paper keys in its JobTemplate (kPMCustomPageWidthKey, kPMCustomPageHeightKey, kPMCustomPageMarginsKey) we find out if the document fits within the constraints specified by your custom paper keys. If it does, we set the media option to the custom paper size and by the time your PM gets the JobTicket, its PaperInfo will have a name looking like "Custom.widthxheight" and the document's paper and page rects. So we can say, as of 10.2.3, we do support custom paper size printing to Tioga PMs.

4. If we failed to find a matching paper name and the target printer either does not support custom paper sizes, or if it did, the document did not meet the custom paper constraints, we fall back to a best-match test. We find the entry in the PM's PaperInfo list that is closest in size (paper rect and page rect) to the formatted document. That can mean a document formatted for one paper size is imaged to a different paper size, and likely as not, the imaged page may not be positioned on the paper the way the user wants.

Now back to your questions. You say your PM gets its default paper size when the document is formatted for a particular custom paper size. That is correct behavior if, as I described above, the document does not meet the constraints specified by your custom paper keys, or if those keys aren't present in your JobTemplate. You go on to say that your PM wants to tell the printing system that it supports all custom paper sizes. And you ask what are the max and min values for the custom paper width and height entries. The numbers are doubles and there are no internal checks for sensible values. But is it a good idea to hide from the printing system your custom paper size capabilities?

We don't think so for a couple of reasons. One is that it prevents us from implementing a future version of the Page Setup dialog that will allow users to create printer-specific custom paper sizes. Another is the PDF RIP (aka Converter) is the logical place to control page-to-paper mapping (origin, scaling, rotation) so it complicates matters to have the PM play games with band size and resolution in an attempt to handle unsupported paper sizes. I agree with you that a user may not get what s/he expects if a document is formatted for one paper size and printed to another, but what we have today is consistent (assuming PMs play by the rules) and leaves us the opportunity to better handle page-to-paper mapping issues in future releases.

-Paul



On Friday, February 28, 2003, at 11:13 AM, Daniel J. McGillivray wrote:

Hi Paul,

When a custom paper size not supported by our PM is selected in the Page
Setup dialog, our PDE is handed the selected size. However, our PM is handed
the default paper size. Since the application is rendering to the selected
paper size, we get undesirable results on the printed page. we would like to
tell the OS our PM supports all allowable custom paper sizes and validate
the size after we read it from the ticket. What are the maximum and minimum
values for the custom paper size width and height entries in the template?

Thanks,
Dan
_______________________________________________
printing mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/printing
Do not post admin requests to the list. They will be ignored.
_______________________________________________
printing mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/printing
Do not post admin requests to the list. They will be ignored.

References: 
 >Custom Paper Size Constraints (From: "Daniel J. McGillivray" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.