Apache OpenOffice (AOO) Bugzilla – Issue 116283
"fit to printable page" prints with wrong origin
Last modified: 2013-01-29 21:47:49 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.
Created attachment 75461 [details] DIN A2 document with two rectangles
Created attachment 75462 [details] DIN A6 document with two rectangles