Bug 140283 - Print Preview ToolBar doesn't show correct icons
Summary: Print Preview ToolBar doesn't show correct icons
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kdeprint
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KDEPrint Devel Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-19 09:21 UTC by James Richard Tyrer
Modified: 2011-05-27 18:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screen Shot of KDEPrint's Print Preview window: left side (107.19 KB, image/png)
2007-01-20 08:36 UTC, James Richard Tyrer
Details
Screen Shot of KDEPrint's Print Preview window: right side (89.00 KB, image/png)
2007-01-20 08:40 UTC, James Richard Tyrer
Details
KGhostView (128.80 KB, image/png)
2007-01-21 01:14 UTC, James Richard Tyrer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Richard Tyrer 2007-01-19 09:21:23 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Compiled From Sources
Compiler:          GCC-4.1.1 
OS:                Linux

In the Print Preview window, these items in the ToolBar:

  Show Page List
  Fit to Screen
  Fit to Page Width
  Previous Page
  Next Page
  
display the "empty" icon, they do not display the correct icon.
Comment 1 Kurt Pfeifle 2007-01-20 06:57:22 UTC
Which is your Print Preview application? Do you use an external viewer, such as kpdf?

Can you provide a screenshot please?

Both, kghostview and kpdf work fine for me here. (SUSE 10.0 RPMs of KDE 3.5.5)
Comment 2 James Richard Tyrer 2007-01-20 08:32:43 UTC
The problem is with the print preview function in KDEPrint.

For example, while displaying an HTML document in Konqueror:

"Location -> Print"

Then the Print dialog window comes up.

Check the: "Preview" box in the upper right area and click the: "Print" button at the bottom.

Then the preview window come up which is too wide for my screen.

I am not using an external viewer.  KDEPrint has a preview window which I presume uses GhostScript to render what it displays.

I tried the same in KPDF and KGhostView and I have the same problem.

I will post a screen shot.
Comment 3 James Richard Tyrer 2007-01-20 08:36:07 UTC
Created attachment 19341 [details]
Screen Shot of KDEPrint's Print Preview window: left side

Note that the screen falls off of the right side of the screen.

My screen is 1024 x 768 and X is set to 100 DPI.
Comment 4 James Richard Tyrer 2007-01-20 08:40:59 UTC
Created attachment 19342 [details]
Screen Shot of KDEPrint's Print Preview window: right side

So, I moved the window over to the left to show the right side of it.
Comment 5 Kurt Pfeifle 2007-01-20 18:16:51 UTC
       "KDEPrint has a preview window which I presume uses 
        GhostScript to render what it displays."

Not entirely correct. KDEPrint does not *have* a preview window. It *uses* s.th. to preview the printjob. And that something can be 2 different things:

 * the application that is set up on the user's system as the default for 
   handline mime type "application/postscript" (that is, for most users,
   kghostview); but in case a user has changed that in his preferences, it
   is the changed app...  (*)
 * an external application that may be "hardcoded" by the user for KDEPrint
   previews (I often also use "gv", esp. when debugging problems).

The first is used automatically, if no user-defined preference for KDEPrint is found. The second one is the user-defined preference (it gets stored as "PreviewCommand" in $(kde-config --localprefix)/share/config/kdeprintrc)
Comment 6 Kurt Pfeifle 2007-01-20 18:55:30 UTC
My kghostview looks entirely different.... (version 0.20, in SUSE RPMs for KDE 3.5.5). [Not so much like Gnome  :-)  ].

Please look up in kcontrol what this is. Use the search bar to look for "mime types" and "file associations", and find out what is used for application/postscript on your system. Don't forget to check the command + parameters used to startup the viewer...

Can you post a screenshot of your application/postscript file association dialog (note, there is also an option for "embedded viewing")?
Comment 7 Kurt Pfeifle 2007-01-20 19:42:16 UTC
Richard,

since you are someone who is familiar with code, please look it up in the sources if KDEPrint at some point does call the default PostScript viewer with a hardcoded "--geometry" setting (for details of the format, see "man X"). I noticed in the past that KDEPrint kghostview previews always started with a wide window (not as wide as yours, and you couldn't make it smaller...). I didn't like kghostview for a lot of more reasons, and I hardly use it. (I often use kpdf as a preview program, see also http://www.kdedevelopers.org/node/2635 ).

Looking at your shot, the width of the window may be enforced by the length of text strings on your toolbar, and the fact that they are placed *besides* the icons instead of underneath. If I were you, I'd see if I could find the setting that allows to place the text underneath the icons, not besides them.

Next, you may be able to configure which icons are at all shown in the toolbar, and get rid of some you do not need that often...

Lastly, you may be able to override the window size how the viewer starts up by adding the commandline option ("--geometry 333x333+0+0") to the kcontrol settings of the mime type handling.

Regarding the icons you mention in $summary -- these may be missing because you're using an icon theme with an incomplete set of icons. Or because your print preview application isn't a KDE application?

In any case, I do not see how this could be a KDEPrint bug, except that KDEPrint would call kghostview with some hard-coded settings...

Cheers,
Kurt
Comment 8 Kurt Pfeifle 2007-01-20 19:54:07 UTC
OK, I've investigated a little bit more... (not something you couldn't have done yourself :-)  ).

If you use kghostview as the default internal previewer, it inherits the toolbar settings from your Konqueror window that starts the printjob. If you have setup toolbars to display text alongside icons, the same will be used for the print preview window.

To change this (for real, or just to test it), start kcontrol, search for "toolbar" --> "style", and set "text position" to a different value (on the "toolbar" tab), save and start a new instance of konqueror. The print preview should now show the same changed settings, and possibly be "resizeable" in its width now...

Cheers,
Kurt
Comment 9 James Richard Tyrer 2007-01-21 01:05:31 UTC
Re: Comment #5

Yes, it appears that it uses the KPart for KGhostView as the default or the user's choice for "Embedding" for the MIME type: "application/postscript" if one is chosen.

I am unable to get it to use an external application by using the configuration widgets.  Do I understand correctly that to do so that I need to edit the file: "kdeprintrc"?
Comment 10 James Richard Tyrer 2007-01-21 01:14:54 UTC
Created attachment 19360 [details]
KGhostView 

Re: Comment #6

Yes, the KDEPrint preview is using the KGhostSctipt KPart.

The toolbar is configurable and I have changed it.

This is a screen shot of KGhostScript called as a separate application.

Note that all of the icons are correctly displayed.

I also notice another minor issue.  The "Go To Page" icon which I added to the
KGhostView ToolBar isn't there when it is used as the KPart for the print
preview.
Comment 11 James Richard Tyrer 2007-01-21 01:43:24 UTC
Re: Comment #8

> it inherits the toolbar settings from your Konqueror window that starts the
> printjob

This is an intersting theory, but it can't happen since Konqueror allows you to individually configure "Text Position" for each ToolBar (as do other KDE applications).  Currently, I have "Icons Only" as my global default and use that for all except for the BookMark ToolBar which is "Text Only".  But, the KGhostView KPart used for the print preview is showing "Text Alongside Icons".

Note that the width of the window is determined by the length of the ToolBar.  Using a smaller (and unreadable) font size reduces the width of the window so that it fits my screen.  The same window width problem occurs if I use the KPDF KPart for the print preview, but the icons are shown correctly.
Comment 12 Kurt Pfeifle 2007-01-21 02:13:10 UTC
re. comment #5:

No need to edit kdeprintrc (but you can if you want). I gave you a link to my blog in comment #7, where I have screenshots how to proceed in order to configure an external application for print previewing....


re. comment #6:

Just set up kghostscript as your external print previewer application and your print preview windows will look exactly like that.


re. comment #8:

I retract my theory now, I don't know how arrived at that. Probably my own confusion with too many windows open, all previewing the same file printed with different kprinter instances and previewed in different previewers....

In fact it looks like the kghostview print preview window (if used in the default, automatic way) is very stubborn and doesn't even want to remember its size, nor adapt to a page size that is different...

My guess is that there is some hard-wiring in the source-code. Have you had a chance to look at that?

Comment 13 James Richard Tyrer 2007-01-21 06:03:00 UTC
OK, I found where to choose an external application for print preview.  I also prefer GV despite the old Athena Widget interface.

So, my immediate problem is solved -- however the bugs remain in KDEPrint and I will put looking at this on my to do list.  I concur that there appear to be multiple problems with the code.
Comment 14 John Layt 2011-05-27 18:27:04 UTC
KDEPrint is obsolete, unmaintained and will never be revived.  Closing all open bugs.