Bug 55416 - Paper size dialog is disabled in koffice apps
Summary: Paper size dialog is disabled in koffice apps
Status: CLOSED FIXED
Alias: None
Product: kdeprint
Classification: Applications
Component: general (show other bugs)
Version: 3.5
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KDEPrint Devel Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-02 13:25 UTC by troll
Modified: 2008-12-31 12:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description troll 2003-03-02 13:25:57 UTC
Version:            (using KDE KDE 3.1)
Installed from:    Compiled From Sources
Compiler:          gcc 2.95.3 
OS:          Linux

When an application uses the function KPrinter::setPageSize(PageSize s)

it disables the page size button in the printer properties dialog.

I have traced it to kprinter.cpp

Here is my patch that fixed it.
592c592
<       d->m_impl->broadcastOption( "kde-pagesize-fixed", "1" );
---
> //    d->m_impl->broadcastOption( "kde-pagesize-fixed", "1" );


I dont know why this fixed it but it did.

It now works perfectly for me.

thanx.
Comment 1 Michael Goffioul 2003-03-03 10:03:10 UTC
Subject: Re:  New: Paper size dialog is disabled in koffice apps

> When an application uses the function KPrinter::setPageSize(PageSize s)
> 
> it disables the page size button in the printer properties dialog.

It's not a bug, it's a feature. This behavior is intentional, because
if the application defines the page size, there's a reason for it and
the user shouldn't have the opportunity to change it, to avoid
unwanted effects. Usually, an application that defines the page size
also provides page size configuration at the application level (like
the KOffice components), and this is supposed to be the place where
the user should change the page size. Think of a kword document that
uses Letter format in landscape. Then the user pops up the print dialog
and change the page size and orientation, messing up the printing because
the application doesn't expect it.
This behavior has been decided in agreement with the KOffice developers.

Michael.

Comment 2 troll 2003-03-03 12:18:55 UTC
Subject: Re:  Paper size dialog is disabled in koffice apps     
    

On 3 Mar 2003, Michael Goffioul wrote:

> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
> http://bugs.kde.org/show_bug.cgi?id=55416
>
>
>
>
> ------- Additional Comments From goffioul@imec.be  2003-03-03 10:03 -------
> Subject: Re:  New: Paper size dialog is disabled in koffice apps
>
> > When an application uses the function KPrinter::setPageSize(PageSize s)
> >
> > it disables the page size button in the printer properties dialog.
>
> It's not a bug, it's a feature. This behavior is intentional, because
> if the application defines the page size, there's a reason for it and
> the user shouldn't have the opportunity to change it, to avoid
> unwanted effects. Usually, an application that defines the page size
> also provides page size configuration at the application level (like
> the KOffice components), and this is supposed to be the place where
> the user should change the page size. Think of a kword document that
> uses Letter format in landscape. Then the user pops up the print dialog
> and change the page size and orientation, messing up the printing because
> the application doesn't expect it.
> This behavior has been decided in agreement with the KOffice developers.
>
> Michael.
>
This does not take into account none existing page sizes.

In these cases the dialog defaults to the printer default.

This is extremely annoying from a user point of view. and in it self can lead to
unwanted effects if the user cannot correct it.

Also the user may actually want to use another paper size.

It is desireable to set the paper size to the correct size - but then the user
must have the opportunity to fix it to the existing physical paper.

All the programmer can do is provide a possible senario - but you cannot know
what is actually in the printer or what printer is capable of what.

For example I have been having problems printing to an envelope because of this
BUG.
Comment 3 Cristian Tibirna 2005-08-22 21:45:03 UTC
UNCONFIRMED (batch reassigning messed this)
Comment 4 Kurt Pfeifle 2007-01-09 01:44:18 UTC
I agree with this bug report. Setting it to "Confirmed"/NEW.

Michael said: "This behavior is intentional, because if the application 
               defines the page size, there's a reason for it and the user
               shouldn't have the opportunity to change it, to avoid unwanted
               effects. ... This behavior has been decided in agreement with
               the KOffice developers. "

I think the user sometime *does* indeed have reasons to change the page size,
(like the reporter says), and the KOffice developers are out of touch with 
user needs on this point:

 * the document format may be weird/non-standard/custom, but the available
   printer may not support this format

 * the user may want to print an A4 document on an A3 paper (to be able to
   scribble hand-written notes on it)

 * users can't even print on (formally "supported") envelope formats (which
   are supported by most HP LaserJets f.e.)

Also, the "special" PDF printer should support whatever custom page size the original document is designed for... but currently the kprinter dialog enforces the default A4 for me (Even though I have a few custom 17x17 cm documents to use here, I can only convert to PDF with a special CUPS backend that I wrote for myself).

-----------
[There may be an additional bug stacking up here: KOffice seems to be unable to send PostScript files with %%BoundingBox values correctly set (they are *always* set to A4 for me when using custom page sizes), and KOffice developers claim this to be a Qt bug -- even in Qt 4.2 (!!). Which is rather ridiculous in a way, I can't believe this...]
Comment 5 Kurt Pfeifle 2007-01-09 01:46:03 UTC
Setting Version: to 3.5 now since this is still a current issue
Comment 6 Camilla Boemann 2007-05-21 13:00:20 UTC
SVN commit 666944 by boemann:

No longer disable pagesize when app sets a pagesize

BUG:55416


 M  +0 -2      kpgeneralpage.cpp  
 M  +0 -2      kpqtpage.cpp  
 M  +0 -1      kprinter.cpp  


--- trunk/KDE/kdelibs/kdeprint/kpgeneralpage.cpp #666943:666944
@@ -623,8 +623,6 @@
 
 	if ( m_orientbox->isEnabled() )
 		m_orientbox->setDisabled( opts[ "kde-orientation-fixed" ] == "1" );
-	if ( m_pagesize->isEnabled() )
-		m_pagesize->setDisabled( opts[ "kde-pagesize-fixed" ] == "1" );
 }
 
 void KPGeneralPage::getOptions(QMap<QString,QString>& opts, bool incldef)
--- trunk/KDE/kdelibs/kdeprint/kpqtpage.cpp #666943:666944
@@ -304,8 +304,6 @@
 
 	if ( m_orientbox->isEnabled() )
 		m_orientbox->setDisabled( opts[ "kde-orientation-fixed" ] == "1" );
-	if ( m_pagesize->isEnabled() )
-		m_pagesize->setDisabled( opts[ "kde-pagesize-fixed" ] == "1" );
 }
 
 void KPQtPage::getOptions(QMap<QString,QString>& opts, bool incldef)
--- trunk/KDE/kdelibs/kdeprint/kprinter.cpp #666943:666944
@@ -733,7 +733,6 @@
 {
 	KMFactory::self()->settings()->pageSize = s;
 	setOption("kde-pagesize",QString::number((int)s),true);
-	d->m_impl->broadcastOption( "kde-pagesize-fixed", "1" );
 }
 
 void KPrinter::setOptions(const QMap<QString,QString>& opts)
Comment 7 Michael Goffioul 2007-05-21 13:50:34 UTC
As stated before, this was a design decision in coordination with KOffice developers. As such, I hope this has been discussed on koffice mailing list (if not, I think it should be).

The idea was that KOffice applications have their own page setup dialog to define page size and page margins. To avoid duplicated and possible mismatched settings, it had been decided to disabled the pagesize option in the printer setup dialog. If the user wanted to change the page size, he should then do it in the standard page setup dialog.

If associated options are kept enabled, then I think that a warning should be issued in case of conflicting settings.
Comment 8 Camilla Boemann 2007-05-21 15:50:33 UTC
Well, I'm a KOffice developer too and I cleared it with the KWord maintainer on IRC.

But thanks for warning

The KWord print dialog will probably need some work anyway
Comment 9 John Layt 2008-12-31 12:50:10 UTC
Closing old Resolved status bug.