Hi Mark, On 20/03/16 02:07, [email protected] wrote: > Dave Koelmeyer wrote: >> Hi All, >> >> I'm creating full A4-sized page background images in GIMP to insert into >> A4-format Writer documents. I've noticed that when these images are >> added to Writer and anchored to page, things are not perfectly flush as >> I would expect. >> >> After a bit of tinkering I believe this is because Writer doesn't treat >> an A4-format page as having exactly 2480x3508 pixel dimensions (at >> 300 DPI). >> >> For example, my GIMP working files use the A4 300 DPI preset, which is >> 2480x3508 pixels. If I create a new blank Writer document using A4 page >> size, then export this blank document as a PNG and set the export DPI >> setting to 300, Writer instead displays this as 2481x3507 pixels. I see >> similar ever-so-slightly different results when attempting to import an >> A4 PDF exported from Writer into GIMP at 300 DPI, again off by a matter >> of pixels. >> >> Everything I've read points to 2480x3508 definitely being the dimensions >> for A4 (e.g. http://www.a4papersize.org/a4-paper-size-in-pixels.php). >> Can someone please help me understand why there is a difference in >> Writer? > > Probably differences in rounding. An A4 page isn't exactly 2480 x 3508 > pixels at 300 dpi. A4 is 210mm x 297mm. > 210mm / 25.4mm/in * 300dpi ~= 2480.3 pixels > 297mm / 25.4mm/in * 300dpi ~= 3507.9 pixels > Rounding that to 2481 x 3507 does seem a bit odd, but it looks like > there may be some intermediate rounding in the calculation: > 210mm / 25.4mm/in ~= 8.27in; 8.27in * 300dpi = 2481 pixels > 297mm / 25.4mm/in ~= 11.69in; 11.69in * 300dpi = 3507 pixels > > How are you determining the pixel sizes that LibreOffice is using for > your image anyway? Image sizes are specified in terms of the printed > size (mm, inches, etc.) rather than in pixels. Unless your display is > 300dpi, the image on screen will be scaled anyway. > > If you're finding that the size in the image properties can't be set > to 210mm x 297mm because of the slight difference in pixel aspect > ratio, you could try unticking the "keep ratio" box so that the size > can be set to 210mm x 297mm. > > If you've got LibreOffice set to work in inches, you might setting it > to cm or mm when using ISO paper sizes avoids the intermediate > rounding. Tools > Options > LibreOffice Writer > General > Measurement > unit.
A belated thanks for your very useful information (I have only just found time to look at this in more detail). I think your observation of intermediate rounding does indeed explain this. I can confirm that I see this behaviour when Writer's measurement units are set to inches. When the same image 2480x3508 resolution image is inserted as a full page background with centimetre or millimetre measurement units set as you've suggested, it then does appear to be flush. Thanks again! :) Cheers Dave -- Dave Koelmeyer http://blog.davekoelmeyer.co.nz GPG Key ID: 0x238BFF87 -- To unsubscribe e-mail to: [email protected] Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
