discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing not working at all...


From: Gregory Casamento
Subject: Re: Printing not working at all...
Date: Sun, 17 Jul 2016 18:22:05 -0400

Hey Fred,

On Sun, Jul 17, 2016 at 6:00 PM, Fred Kiefer <fredkiefer@gmx.de> wrote:
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 road

​GC
 

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?


​Yes, I will do that.  I'll continue work on a branch so that my work is saved, but doesn't cause any issues on the trunk.​
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.

​I'm not so sure that the scaling is wrong in the case of a single page.  It is most definitely wrong in the case of multiple logical pages.  My approach was to tackle one problem at a time as I understand the issues with printing better.

I'm left with a fair amount of questions as to what is the correct way to fix these issues.   I think the best way to go is to move my work to a branch and see what improvements can be made.  Once they are acceptable to all, I'll merge back to trunk. I will go ahead and do that ASAP.  Right now I am working on something else (for a client) so I will get to moving it to branch in a few hours time.
 
One last thing, in GNUstep we switched to CGFloat some years ago. Could you please use this type in your final solution?

​Yes, thanks for that catch.​  Sorry, old C habits die very hard.  I will change it ASAP.

Thank you
Fred


GC
-- 
Gregory Casamento
GNUstep Lead Developer / OLC, Principal Consultant
http://www.gnustep.org - http://heronsperch.blogspot.com
http://ind.ie/phoenix/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]