Bug 99352 - Cannot change orientation of pdf file
Summary: Cannot change orientation of pdf file
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kpdf
Classification: Applications
Component: general (show other bugs)
Version: 0.4
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
: 99311 102514 106948 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-14 14:13 UTC by Urs Dönni
Modified: 2012-11-05 13:24 UTC (History)
17 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example of a pdf file that is displayed with wrong orientation (130.32 KB, application/pdf)
2005-02-14 14:16 UTC, Urs Dönni
Details
first version (9.53 KB, patch)
2006-03-19 14:25 UTC, Martin Koller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Urs Dönni 2005-02-14 14:13:58 UTC
Version:           0.4 (using KDE 3.3.92 (beta2), compiled sources)
Compiler:          gcc version 3.3.4
OS:                Linux (i686) release 2.4.29

I have some pdf files that are displayed in the wrong orientation in kpdf 0.4, and i didn't find a way to change the orientation (as i can do that for example in kghostview via View->Orientation)
Comment 1 Urs Dönni 2005-02-14 14:16:55 UTC
Created attachment 9614 [details]
Example of a pdf file that is displayed with wrong orientation
Comment 2 Albert Astals Cid 2005-02-14 18:22:10 UTC
*** Bug 99311 has been marked as a duplicate of this bug. ***
Comment 3 Albert Astals Cid 2005-02-14 18:34:00 UTC
Obviously this is a wish and not a bug, we display the document as it says it should be, if the document gives use incorrect information there is nothing we can do about it except provide the rotation option.
Comment 4 Enrico Ros 2005-02-27 15:11:36 UTC
Already on TODO list. We can hack it on screen.. but for printing it will be hard.
Comment 5 Bernd Wurst 2005-03-04 07:50:17 UTC
I can confirm that this would be an important feature for KPDF.
A few days ago, I switched the konfiguration to use KPDF nstead of KGhostview. The interface and page display is so much better now. ;)

but I get PDFs from my fax software and that cannot determine if the page should be portrait or landscape, it's just an image. So It would be very helpful to be able to rotate the page.

IMHO, rotation should be just a screen thing, if you print the page, you can rotate it manually. ;-)

Giving 20 votes for this missing feature!
Comment 6 Albert Astals Cid 2005-03-26 12:35:27 UTC
*** Bug 102514 has been marked as a duplicate of this bug. ***
Comment 7 Georges A.K. 2005-03-28 08:12:21 UTC
I agree too. It's an important feature (IMO), but as far as printing, it's not biggie. It's visually that it's important. So I'm giving 20 votes as well :)
Comment 8 Andrew Fuller 2005-04-19 17:33:27 UTC
I also gave this a full 20 votes.  Recently I've had several courses offer the slides in PDF with no orientation flag (or however kpdf determines orientation).  So those landscape ones are a real pain to read.  I have to go back to kghostview.  But I like kpdf sooo much better!  Printing is a non-issue.  This is for the screen, only.
Comment 9 Albert Astals Cid 2005-06-07 12:23:07 UTC
*** Bug 106948 has been marked as a duplicate of this bug. ***
Comment 10 Damir Perisa 2005-06-10 01:00:00 UTC
i want to add myself to this whishlist ... lately i had trouble rotating single pages to see them better on the screen. an example document is here:

http://www.genome.org/cgi/reprint/13/4/533.pdf
pages 5 and 6 are much better seen landscape but the rest is portrait

printing is no trouble as it is now. it can stay the way it is handled now. 

to be more specific: like there is a button for "fit width", there should be also a button in the right-click menu for "rotate to left" and "rotate to right" for the current page. 

20 votes - thanx in advance
Comment 11 Michael Williamson 2006-01-13 01:32:51 UTC
Printing isn't an issue, because these documents are supposed to be landscaped. They will print as intended, but they don't display as intended.
Comment 12 Eyal Rozenberg 2006-01-15 17:27:47 UTC
A hack for on-screen display before a solution for rotation in print is implemented would be quite worth-while IMHO.
Comment 13 Shriramana Sharma 2006-01-28 02:58:14 UTC
Adding self to CC. Another sample is:
ftp://ftp.trolltech.com/qt/pdf/qt33-class-chart.pdf
Comment 14 Carsten Niehaus 2006-03-19 11:36:23 UTC
As there seems to be a patch for this bug, should the patch be attached to this bugreport? Even if the patch will not be integrated in KDE 3.5.3 at least the patch will be found by users and distributors.
Comment 15 Martin Koller 2006-03-19 14:25:37 UTC
Created attachment 15196 [details]
first version

This is the first version to implement rotation.
It still has rough edges, but works in principle.
The things still open:
- after rotation, the thumbnails (pixmap) still show the content in the
original non-rotated form
- the very first pixmap you see in the page (the one with the roughest
granularity of pixels) shows the original non-rotated form.
- Highlighting of found text matches is shown incorrectly (uses the non-rotated
view)
Comment 16 Ralph 2006-05-10 22:10:41 UTC
I will support this wish with 20 votes. 

It is vital to be able to rotate pages when you are viewing train and bus timetables. Please implement rotation for 90/180/270 degrees!

Printing at rotated angles is not a priority right now, but being able to view at a rotated aspect _is_.
Comment 17 Arkadiusz Miskiewicz 2006-06-04 19:20:18 UTC
Another badly displayed pdf:
http://www.cs.washington.edu/education/courses/csep590/06wi/lectures/slides/Benaloh_010306.pdf
Comment 18 Tom E. Gundersen 2006-10-13 20:11:06 UTC
What is the status of this bug? It would be extremely usefull to at least be able to rotate the page 90 degreesn in presentation mode. Personally I often rotate my screen (physically) for reading documents to maximize the useage of the screen area. This obviously only works if the document can be rotated as well.
Are anyone working on this? If not I could have a go at it, but my KDE development experience is rather limited (non-existent).
Comment 19 Martin Koller 2006-10-14 12:41:46 UTC
On Friday 13 October 2006 20:11, Tom E.Gundersen wrote:
> What is the status of this bug? It would be extremely usefull to at least
> be able to rotate the page 90 degreesn in presentation mode.


The patch I provided does rotation.
See for the limitations it has:
http://bugs.kde.org/show_bug.cgi?id=99352#c15
Comment 20 Albert Astals Cid 2006-10-14 14:16:27 UTC
This work on okular that is KDE4 successor of kpdf.
Comment 21 Ferdinand Gassauer 2006-10-21 10:13:21 UTC
http://bugs.kde.org/show_bug.cgi?id=99352#c18
meanwhile you can use xpdf or acrobat reader. 
Comment 22 Richard Baxter 2007-06-02 04:53:49 UTC
Regarding the patch provided (Additional Comment #15 From Martin Koller 2006-03-19 14:25):

Thank you for providing this patch - it works very well in general. 

However please note the rotation function in this patch will fail to operate correctly in some situations where pdf documents have inbuilt rotation values. This is one possible source fix (tested);

1. in sourcedir/core/page.cpp, add this text;

	void KPDFPage::rotate90degrees()
	{
	    float w = m_width;
	    m_width = m_height;
	    m_height = w;

	    // avoid Division-By-Zero problems in the program

	    if ( m_width <= 0 )
		m_width = 1;
	    if ( m_height <= 0 )
		m_height = 1;

	    deletePixmapsAndRects();
	}

2. in sourcedir/kpdf/core/page.h, class KPDFPage, public:, add this text;

	void rotate90degrees();
	
3. in sourcedir/kpdf/ui/pageview.cpp, void PageView::slotRotateLeft and slotRotateRight(), change this text;

	const_cast<KPDFPage*>((*iIt)->page())->setRotation( r );

		to;
	
	const_cast<KPDFPage*>((*iIt)->page())->rotate90degrees();

 



Comment 23 FiNeX 2007-06-24 00:51:11 UTC
Will this patch go in Kpdf on the 3.5.x branch?
Comment 24 Martin Koller 2007-06-24 10:59:23 UTC
Quote from a mail on kde-core on June, 1st 2007:

The Release Team has decided that it is time to close the books on KDE 3.5.

To quote coolo:
"No more features, no more string changes, no more docu changes....
Bug fixes are allowed and after some time we'll do another maintenance 
update 3.5.8 - e.g. in september."

So bugfixes only from now on in the 3.5 branch.  If the bugfix requires
a string change, you will need to coordinate that change with the translators.

Onwards to KDE 4.0!
Comment 25 Marco Lambertz 2008-03-12 12:19:40 UTC
So, now you can change orientation of pdf files in okular, wouldn't it be sensible to close this bug?
Comment 26 Pino Toscano 2008-03-12 12:23:06 UTC
Theorically no, as 'kpdf' and 'okular' are separate products on bugzilla.
If it would be closed, its resolution is WONTFIX (as we won't implement it) or INVALID (as the product will no more be "valid").

But for now don't worry about that.
Comment 27 Dennis Jansen 2008-08-14 17:41:31 UTC
Okay, close it. Nobody's going to do it. Look Forward. Okular does it.
Comment 28 Dennis Jansen 2008-08-14 17:42:15 UTC
Sorry, I meant *let's* close it.
Comment 29 Bernd Oliver Sünderhauf 2009-01-14 08:13:27 UTC
I'd also propose closing this. Okular has this function.
Comment 30 FiNeX 2009-02-15 23:24:54 UTC
I agree on closing this bug. This application seems to be no more developed.