Issue 116283

Summary: "fit to printable page" prints with wrong origin
Product: Draw Reporter: Regina Henschel <rb.henschel>
Component: printingAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: DEV300m96   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
DIN A2 document with two rectangles
none
DIN A6 document with two rectangles none

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