Toggle navigation
Find or Create a Group
EN
EN
DE
ES
FR
IT
UK
Help
Log In
Sign Up
Help
Log In
Sign Up
EN
EN
DE
ES
FR
IT
UK
Home
Messages
Hashtags
×
×
×
Close
Likes
Apple-Dev | Cocoa
Messages
×
Close
Search
Single
Toggle Dropdown
Messages
Topics
Expanded
Polls
previous page
#49
next page
Printing NSTextView puts text in middle of page
tridiak
#49
Printing a NSTextView centres the text (if it is less than one page in size) vertically in the page, as opposed to the top.
What do you need to do to fix this?
let
tv = NSTextView()
tv.textStorage?.append(ats)
var
npo = NSPrintOperation.
init
(view: tv);
tv.frame.size.width = (sampleViewScroll.documentView?.frame.size.width)!;
tv.frame.size.height =
20000
; // or some large number
npo.run();
The attributed text (ats) is valid (displayed in a visible NSTextView).
Do I need to calculate the size of the text and set the margins?
Or is there a justification setting I am missing?
TIA
Mark
More
All Messages By This Member
previous page
#49
next page
Join
{cocoa@apple-dev.groups.io to automatically receive all group messages.
×
Close
Report Message
Reason
Report to Moderators
I think this message isn't appropriate for our group. The Group moderators are responsible for maintaining their community and can address these issues.
Report to Groups.io Support
I think this violates the Terms of Service. This includes: harm to minors, violence or threats, harassment or privacy invasion, impersonation or misrepresentation, fraud or phishing.
Note:
Your email address is included with the abuse report.
×
Close
Verify Delete
Are you sure you wish to delete this message from the message archives of cocoa@apple-dev.groups.io?
This cannot be undone.
×
Close
Verify Repost
Are you sure you wish to repost this message?
More Options
More
Home
Hashtags
About
Features
Pricing
Updates
Terms
Help
Twitter
Toggle navigation
About
Features
Pricing
Updates
Terms
Help
©
2023
Groups.io