Issue 116283 - "fit to printable page" prints with wrong origin
Summary: "fit to printable page" prints with wrong origin
Status: UNCONFIRMED
Alias: None
Product: Draw
Classification: Application
Component: printing (show other issues)
Version: DEV300m96
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-02 23:27 UTC by Regina Henschel
Modified: 2013-01-29 21:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
DIN A2 document with two rectangles (12.52 KB, application/vnd.oasis.opendocument.graphics)
2011-01-02 23:28 UTC, Regina Henschel
no flags Details
DIN A6 document with two rectangles (12.53 KB, application/vnd.oasis.opendocument.graphics)
2011-01-02 23:29 UTC, Regina Henschel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2011-01-02 23:27:40 UTC
The attached documents contain a outer rectangle in page size and a smaller
inner rectangle.
Print the attached documents with the setting "fit to printable page".
On my HP Color LaserJet 2605 the outer rectangle is not full visible because
parts of it are in the unprintable margin of my printer.

The scaling itself is correct. You can control this with the inner rectangle.
But the whole printing has a wrong offset.

I have tested this:
In sd/source/ui/view/DocumentRenderer.cxx after line 2273
I have added

if (bScalePage)
{
     long aPatchedPageOffsetX = aPageOffset.X()/(double)aMap.GetScaleX();
     long aPatchedPageOffsetY = aPageOffset.Y()/(double)aMap.GetScaleY();
     aMap.SetOrigin(Point(aPatchedPageOffsetX,aPatchedPageOffsetY));
}

With this settings 'fit to printable page' works for Draw documents. I have
expected, that a simple shift would be enough, but the non printable margin is
scaled somewhere when printed. In addition there are a lot of places with "#if
0" disabled origin settings. So I doubt, that this is the correct place at all.

I'm not familiar with printing and have no idea whether my changes would break
something. Nevertheless, I hope my findings are useful for you.
Comment 1 Regina Henschel 2011-01-02 23:28:43 UTC
Created attachment 75461 [details]
DIN A2 document with two rectangles
Comment 2 Regina Henschel 2011-01-02 23:29:25 UTC
Created attachment 75462 [details]
DIN A6 document with two rectangles