| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Dear Paul,_______________________________________________
Arrh, now that is interesting. Just found the following in PMTemplate.h:
#define kPMCustomPageWidthStr kPMTemplatePrelude "CustomPaperWidth"
#define kPMCustomPageWidth CFSTR( kPMCustomPageWidthStr ) /* Will fetch the max and min range constraint for custom page width. */
#define kPMCustomPageHeightStr kPMTemplatePrelude "CustomPaperHeight"
#define kPMCustomPageHeight CFSTR( kPMCustomPageHeightStr ) /* Will fetch the max and min range constraint for custom page height. */
It looks as if the text ...Key is missing from the end of the constants :-)
Kind Regards,
Graham
On Friday, February 21, 2003, at 03:05 pm, Paul Danbold wrote:
Graham,--
Here are the definitions for the custom paper keys ...
#define kPMCustomPageWidthStr kPMTemplatePrelude "CustomPaperWidth"
#define kPMCustomPageWidthKey CFSTR( kPMCustomPageWidthStr ) /* Will fetch the max and min range constraint for custom page width. */
#define kPMCustomPageHeightStr kPMTemplatePrelude "CustomPaperHeight"
#define kPMCustomPageHeightKey CFSTR( kPMCustomPageHeightStr ) /* Will fetch the max and min range constraint for custom page height. */
#define kPMCustomPageMarginsStr kPMTemplatePrelude "PMCustomPageMargins"
#define kPMCustomPageMarginsKey CFSTR( kPMCustomPageMarginsStr ) /* Will fetch the margin data for a custom page. */
They belong in PMTemplate.h. These additions will be picked up in a future Developer Tools release.
-Paul
On Friday, February 21, 2003, at 01:56 AM, Graham Miln wrote:
Dear Paul,_______________________________________________
Thanks for the debugging help. As you know I too am having some difficultly implementing custom paper sizes in our Tioga PMs.
Where/how are the following constants defined?
kPMCustomPageWidth
kPMCustomPageHeight
The constant kPMCustomPageMarginsKey is defined in the header PMTicket.h as:
#define kPMCustomPageMarginsStr kPMPrinterInfoPrelude "PMCustomPageMargins"
#define kPMCustomPageMarginsKey CFSTR( kPMCustomPageMarginsStr ) /* Will fetch the margin constraints for custom page. bg900*/
I have the December 2002 Developer Tools installed.
Kind Regards,
Graham
On Friday, February 21, 2003, at 01:00 am, Paul Danbold wrote:
Ryoko,--
On Tuesday, February 18, 2003, at 09:47 PM, Ryoko Tarao wrote:
Is Custom Paper Size for Tioga PMs supported from MacOS10.2.3 ?
Yes.
I added the templates on PM to suppport custom page size.
But when the custom paper size is selected, the default
paper rectangle and page rectangle are always returned.
And when the selected custom paper size is smaller than default paper size,
the printable area is the lower-left of the default papaer size.
I think the printable area should be the upper-center.
The added templates are as belows:
PMTemplateMakeEntry(pmTemplate,kPMCustomPageWidth,kPMValueDouble, kPMConstraintRange);
PMTemplateSetDoubleRangeContstraint(pmTemplate,kPMCustomPageWidth,m inWidth,maxWidth);
PMTemplateMakeEntry(pmTmeplate,kPMCustomPageHeight,kPMValueDouble,k PMConstraintRange);
PMTemplateSetDoubleRangeContstraint(pmTemplate,kPMCustomPageWidth,m inHeight, maxHeight);
PMTemplateMakeEntry(pmTmeplate, kPMCustomPageMarginsKey, kPMValueRect,
kPMConstraintPrivate);
PMTemplateSetPMRectDefaultValue(pmTemplate, kPMCustomPageMarginsKey, &marginRect);
Should I provide other tickets or templates on PM ?
No other template keys are required.
Thanks for your any help in advance.
Here are some suggestions to help you diagnose the problem.
1) Create a queue with your PM that supports custom paper sizes.
2) Inspect the auto-generated PPD file in /etc/cups/ppd/. In the PPD file you should see the following keys in the flattened JobTemplate:
com.apple.print.TemplateSpecific.CustomPaperWidth
com.apple.print.TemplateSpecific.CustomPaperHeight
com.apple.print.TemplateSpecific.CustomPageMargins
Please check that the width, height and margin numbers match the numbers used by your PM in addCustomPaperToTemplate()
3) Also check for custom paper code in the PPD file. You should see about 10 lines of CustomPageSize code, beginning with *CustomPageSize True: ...
again, you should check that the width, height and margin numbers are correct
4) Then create a document, format it for a custom paper size, and print it. In the CUPS error_log, check the media option value. If the formatting custom paper size falls within the constraints specified in your JobTemplate, then you should see something like
media=Custom.504.00x648.00
in this example, the custom paper size has a width of 7 in and a height of 9 in.
If, on the other hand, the formatting custom paper size is smaller/large than the min/max specified in your JobTemplate, or the margins are too small,
the media option will be set to a different paper name.
5) Debug your PM to make sure the JobTicket contains a PaperInfo ticket with a paper and page rect corresponding to the formatted custom paper size.
Unless there's a bug in our code, I suspect the formatting custom paper size is falling outside your custom paper size constraints.
I hope this helps.
-Paul
Best Regards,_______________________________________________
Ryoko
_______________________________________________
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.
Graham Miln, Software Engineer
mailto:email@hidden
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.
Graham Miln, Software Engineer
mailto:email@hidden
_______________________________________________
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: | |
| >Re: Custom Paper Size (From: Postmaster <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.