• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: PrintInfo and page margins
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PrintInfo and page margins


  • Subject: Re: PrintInfo and page margins
  • From: Pat Homelvig <email@hidden>
  • Date: Wed, 21 Apr 2004 16:38:26 -0600

*This message was transferred with a trial version of CommuniGate(tm) Pro*
Thanks, Jonathan.

Preview IS taking into account the imageablePageBounds, however I was not. Hence I was trying to image the pdf all of the way to the edges.

The problem showed up because I am doing my own Pagination, i.e. I am implementing

- (BOOL)knowsPageRange:(NSRangePointer)aRange
&
- (NSRect)rectForPage:(int)aPageNumber

Funny how you can look for a long time for a method (in this case, imageablePageBounds), and completely miss it.

; > (

Thanks again!

Pat


On Wednesday, April 21, 2004, at 03:32 PM, Jonathan E. Jackel wrote:

You may find it useful to look at this post of mine:

http://lists.apple.com/archives/cocoa-dev/2003/Dec/27/ pagemarginsandnsprinti
nf.txt

and the example here:

http://mywebpages.comcast.net/jjackel/CocoaExamples.html

It sounds like maybe you are getting tripped up on the difference between
imageable area of the page, i.e., -imageablePageBounds, and the margins of
the page, e.g., -leftMargin.

It seems to me entirely possible that print preview does not duplicate what
would come out of your printer. Most printers can't print all the way to
the edge of a page, but that is not a problem for PDFs. When you attempt to
print outside the imageable area, the image is clipped when you send it to
the printer, but might preview just fine.

You might try changing both horizontal and vertical pagination to
NSFitPagination.

Jonathan


-----Original Message-----
From: email@hidden
[mailto:email@hidden]On Behalf Of Pat Homelvig
Sent: Wednesday, April 21, 2004 11:57 AM
To: email@hidden
Subject: PrintInfo and page margins
Hello,

I am displaying an image in my view (the image & view is 8 1/2" x 11",
612 by 792 points), and when I print out the view, I have found that a
little bit of the image is cut off.

However if I select "Preview" from the print panel, and then print the
file from the Preview app, the page prints correctly without any
clipping.

In looking at PrintInfo, it reports the following margins:
Left Margin = 72 pts (1 in)
Right Margin = 72 pts (1 in)
Top Margin = 90 pts (1.25 in)
Bottom Margin = 90 pts (1,25 in)

If I reduce the original page by the margins shown, the image is scaled
much smaller than printed out in Preview.

When I bring up the NSPrintPanel in the app, and select the Summary
under the Settings: popup, it reports a printer margin of the following:

Left Margin = .12 in
Right Margin = .12 in
Top Margin = .12 in
Bottom Margin = .56 in

(These are the values when my specific printer is selected. The left,
right & top values were doubled when "Any Printer" was selected).

So I manually scaled my image using the above margins (from the summary
panel), and the image prints out exactly as it did in Preview.

However I have been unable to programmatically get the (true) printer
margins shown above.

Any suggestions? What am I missing?

This is on 10.2.8, however the same app running on 10.3.3 exhibits the
same problems.

Thanks in advance.



Pat Homelvig
White Wolf Software, Inc.
303-906-6104
mailto:email@hidden
http://www.whitewolf.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >RE: PrintInfo and page margins (From: "Jonathan E. Jackel" <email@hidden>)

  • Prev by Date: Re: Image and String in single cell?
  • Next by Date: Re: IOKit - USB from Cocoa
  • Previous by thread: RE: PrintInfo and page margins
  • Next by thread: RE: Transparency? SOLVED
  • Index(es):
    • Date
    • Thread