|
From: | Gregory Casamento |
Subject: | Re: Printing not working at all... |
Date: | Sun, 17 Jul 2016 18:22:05 -0400 |
Am 17.07.2016 um 20:41 schrieb Gregory Casamento <greg.casamento@gmail.com>:On Sun, Jul 17, 2016 at 5:57 AM, Gregory Casamento <greg.casamento@gmail.com> wrote:Hey Fred,On Sun, Jul 17, 2016 at 5:45 AM, Fred Kiefer <fredkiefer@gmx.de> wrote:Hi Greg,
to me it looks like you change tries to optimise the case where a view gets printed on a single page. Have you tried to print out a long text document which spans multiple pages after your change?No I haven't. I am testing it further now. It appears my calculations cause views larger than the size of the page to be rendered incorrectly (off the page). I'm continuing to work on this to see if I can correct the problem.All the complicated calculations are in NSPrintOperation.m (specifically in the method _displayPageInRect:withInfo:knowsPageRange:) and maybe something similar to your changes is missing there?More than likely. There are a lot of similar changes there.
Perhaps you could first explain which issue with printing you are trying to resolve?The issue is that, as it was before, the view spills over the page and is not scaled and also appears halfway down the page.At the moment it looks to me like your goal is "Print one view on one page" and this is clearly wrong. But most likely I misunderstand the aim of your change.The goal is to correct printing in general. As it was when the view is larger, it moves up on the page (without my changes) which was incorrect behavior. I believe more calculations are needed. Pagination is something we are not doing (properly if at all).
Fred
On the roadGC
Am 17.07.2016 um 03:43 schrieb Gregory Casamento <greg.casamento@gmail.com>:
> Hey Fred/Riccardo,
>
> I have just committed my changes for printing which should alight the existing top level view being printed with the page dimensions. I am unsure of this change, but it seems to work.
>
> I tested with Ink and it aligns to the top and I tested with Graphos. Graphos still works properly. Please take a look and let me know what you think. If it belongs someplace else, then let me know. It works better than what we had before. Please I would very much like any input people have.
>
> Thanks, GC
I've been testing multipage printing and, of course, it doesn't work properly. I think, based on some of what I have done, I have a better idea of how to handle the problem. I am working on a solution locally which I will share later on tonight once I'm satisfied.If you fail to come up with a proper solution tonight, could you please revert your previous commit, as this makes the result worse for a lot of the common cases?
We are paginating as the method in NSView -beginPage:label:bBox:fonts: which generates the PS code for each page is called multiple times throughout the process.Yes, we are calling this once per physical page. There may be multiple logical pages being printed on one physical page, but for these that method wont be called.At this point I'm fairly certain that the translation doesn't go where I put it. I will need to do more research to determine where that has to happen.I believe, however, the scaling is correct for the moment.My impression is that the scaling is most likely wrong. You scale the width of the frame to the width of the page. This is definitely wrong when multiple logical pages get printed on one physical. But I think it is also wrong when we have to split up one view on multiple pages. In that case we should print vertical strips of the view on different pages. We may not be doing this, or not doing it correctly but scaling to fit is no option here.
One last thing, in GNUstep we switched to CGFloat some years ago. Could you please use this type in your final solution?
Thank youFred
[Prev in Thread] | Current Thread | [Next in Thread] |