Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Printing displaced on Inkjet Printer
Printing displaced on Inkjet Printer
 
   NeoOffice Forum Index -> NeoOffice Beta Releases
View previous topic :: View next topic  
Author Message
amayze
The Merovingian


Joined: Oct 24, 2005
Posts: 561
Location: Edinburgh, Scotland

PostPosted: Sat Jul 14, 2012 2:41 am    Post subject: Printing displaced on Inkjet Printer

Using NeoOffice 3.3Beta I have noticed that the print out is displaced to the left by 4mm and up by between 1/2 and 1mm, but only on some printers.

When I print to a Brother HL2240D laser positioning is the same as it was in 3.2.1, however when I print to an Epson R220 colour inkjet the print out is displaced.

The displacement is visible in Preview, so I attach screen shots to illustrate.

Steps to reproduce:
- Open the test file.
- Select File->Print
- Select a printer
- Select PDF->Open in Preview.

The ruler shown in the screen shots is freeruler

Andy
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sun Jul 15, 2012 9:43 am    Post subject:

I am not sure what is causing the shift on some printers so I have added some code in the following test patch that will log some data in the Console application.

Can you install the test patch, launch the /Applications/Utilities/Console application, and print to the Preview application for both printers? Then, post any new messages that appear in the Console application and tell us which messages appeared with the "good" print output and the "bad" print output:

Intel:
http://sally.neooffice.org/test/NeoOffice-3.3_Beta-Patch-1-Test-1-Intel.dmg

Patrick
Back to top
amayze
The Merovingian


Joined: Oct 24, 2005
Posts: 561
Location: Edinburgh, Scotland

PostPosted: Sun Jul 15, 2012 3:18 pm    Post subject:

These console logs are from my home Mac, but I have the same combination of Epson InkJet and Brother Laser (albeit slightly different models) and the problem manifests itself in the same manner.

"Bad" printer (Epson Photo R200)
Code:
15/07/2012 23:06:09.929 soffice.bin: Could not find image named 'LayoutDirection1.png'.
15/07/2012 23:07:00.249 [0x0-0x46046].org.neooffice.NeoOffice: Draw Rect: 0.000000 0.000000 596.000000 842.000000
15/07/2012 23:07:00.249 [0x0-0x46046].org.neooffice.NeoOffice: Bounds: 0.000000 0.000000 595.200012 841.799988
15/07/2012 23:07:00.249 [0x0-0x46046].org.neooffice.NeoOffice: Flipped: 0
15/07/2012 23:07:00.249 [0x0-0x46046].org.neooffice.NeoOffice: Page bounds: 9.000000 9.000000 577.000000 823.799988


"Good" Printer (Brother HL-1270N)
Code:
15/07/2012 23:07:31.650 soffice.bin: Could not find image named 'LayoutDirection1.png'.
15/07/2012 23:07:41.917 [0x0-0x46046].org.neooffice.NeoOffice: Draw Rect: 0.000000 0.000000 595.000000 842.000000
15/07/2012 23:07:41.917 [0x0-0x46046].org.neooffice.NeoOffice: Bounds: 0.000000 0.000000 595.000000 842.000000
15/07/2012 23:07:41.917 [0x0-0x46046].org.neooffice.NeoOffice: Flipped: 0
15/07/2012 23:07:41.917 [0x0-0x46046].org.neooffice.NeoOffice: Page bounds: 18.000000 12.000000 559.000000 818.000000


I'm back at work on Tuesday if you need output from there.

Cheers,

Andy
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Jul 16, 2012 3:45 pm    Post subject:

I think that I have fixed this bug. I found that I could reproduce it by changing the selected printer in the native print dialog. This, in turn, caused the page margins to change but those changes were not getting pushed back to NeoOffice's underlying OpenOffice.org code.

Can you install the following test patch and tell us if the bug is fixed for you?:

Intel:
http://sally.neooffice.org/test/NeoOffice-3.3_Beta-Patch-1-Test-2-Intel.dmg

Patrick
Back to top
amayze
The Merovingian


Joined: Oct 24, 2005
Posts: 561
Location: Edinburgh, Scotland

PostPosted: Tue Jul 17, 2012 2:59 am    Post subject:

I've installed Patch 1 Test 2, but I still have the same problem.

I have discovered however that if I go:
- File->Printer Settings
- Select the Epson printer under Format For:
- OK, OK
then the margins are correct on the Epson. However after doing this the left margin is now 4mm too big when I switch back the the Brother printer in the Print dialogue.

Selecting the Brother printer in the Printer Settings dialogue returns things to as they were before.

Regardless of which printer I last printed too or selected in the Printer Settings dialogue, the Epson is always selected when I next select File->Printer Settings. I do not know if this is significant.

Just to be clear, this margin problem is present in actual paper copies, its not just an oddity with Preview.

Thanks again,

Andy.
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Tue Jul 17, 2012 7:35 am    Post subject:

amayze wrote:
Just to be clear, this margin problem is present in actual paper copies, its not just an oddity with Preview.


I am pretty certain that the problem is that the OpenOffice.org code in Writer is printing to the default printer's margins, not the margins of the printer that you change to in the Print dialog.

Clearly the OpenOffice.org code is ignoring the changes I made in the last test patch so I will rework my code so that when the OpenOffice.org code draws at what it thinks is the top left margin, I will shift the coordinates to adjust for the change in page margins.

Also, I found a crashing bug. Can you confirm that you are seeing it too? I can cause a crash by opening your sample document and selecting the File :: Printer Settings menu. In the dialogs that appear, I press Cancel in both. The second cancel (in the Print Options dialog) causes a crash.

Patrick
Back to top
amayze
The Merovingian


Joined: Oct 24, 2005
Posts: 561
Location: Edinburgh, Scotland

PostPosted: Tue Jul 17, 2012 9:03 am    Post subject:

pluby wrote:
Also, I found a crashing bug. Can you confirm that you are seeing it too? I can cause a crash by opening your sample document and selecting the File :: Printer Settings menu. In the dialogs that appear, I press Cancel in both. The second cancel (in the Print Options dialog) causes a crash.
I cannot reproduce this crash with NeoOffice 3.3B running on either OS X 10.7.4 or 10.6.8.

Another thing I have noticed about printing in the de-Javafied NeoOffice is that landscape printing is rotated by 180 degrees. With NeoOffice 3.2.1 the left edge is printed first, from the first non-Java tests the right edge of the page is printed first. I don't know if this is relevant to the current issue. I didn't mention it at the time as it didn't cause a problem.

Andy
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Tue Jul 17, 2012 9:13 am    Post subject:

amayze wrote:
I cannot reproduce this crash with NeoOffice 3.3B running on either OS X 10.7.4 or 10.6.8.


I found that this crashing only occurs with my Mac OS X 10.6 build of NeoOffice and it appears to be a compiler bug. I am building on 10.6 in parallel to the 10.5 builds as the next NeoOffice 3.3 Beta will be built on 10.6 and Mac OS X 10.6 uses a newer compiler.

amayze wrote:
Another thing I have noticed about printing in the de-Javafied NeoOffice is that landscape printing is rotated by 180 degrees. With NeoOffice 3.2.1 the left edge is printed first, from the first non-Java tests the right edge of the page is printed first. I don't know if this is relevant to the current issue. I didn't mention it at the time as it didn't cause a problem.


The de-Javafied code now properly sets the page to landscape and then prints just as other Apple applications do. Your printer then decides which edge to print from when the print output has a landscape page. Does printing a landscape page from the TextEdit application use the same leading edge?

In contrast, Java has no way to tell the native printer that a page is landscape so our Java code rotated the content rotated 90 degrees on a portrait page. That worked, but it was ugly since you would see such pages rotated in the Preview application. So, once we dropped Java, we did it the standard way.

Patrick
Back to top
amayze
The Merovingian


Joined: Oct 24, 2005
Posts: 561
Location: Edinburgh, Scotland

PostPosted: Tue Jul 17, 2012 9:20 am    Post subject:

pluby wrote:
The de-Javafied code now properly sets the page to landscape and then prints just as other Apple applications do. Your printer then decides which edge to print from when the print output has a landscape page. Does printing a landscape page from the TextEdit application use the same leading edge?

Yes, in fact the same leading edge as shown on the icon in Printer Settings, which kind of makes sense! Smile

Andy
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Tue Jul 17, 2012 11:06 pm    Post subject:

I have reworked the printing code and I think that I have finally fixed this bug.

Can you install the following test patch and tell us if the bug is fixed for you?:

Intel:
http://sally.neooffice.org/test/NeoOffice-3.3_Beta-Patch-1-Test-3-Intel.dmg

Patrick
Back to top
amayze
The Merovingian


Joined: Oct 24, 2005
Posts: 561
Location: Edinburgh, Scotland

PostPosted: Wed Jul 18, 2012 2:00 am    Post subject:

I've installed Patch 1 Test 3 and it would appear to have fixed the problem with changing margins.

Thanks.

Andy.
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Jul 18, 2012 8:18 am    Post subject:

FYI. If print margins don't look right but you are unsure if they are correct or not, I found a way to check the correctness of margins. Select the Format :: Page menu and in the dialog that appears, click on the Page tab, and force all of the margins to zero. Then, print to the Preview application and any margin incorrectness should show by text falling off the top or left side of the page or text shifted inward from either side.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Mon Jul 23, 2012 3:54 pm    Post subject:

FYI. I have included the fix this bug in NeoOffice 3.3 Beta 2 which you can download from the NeoOffice download page.

Patrick
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Beta Releases All times are GMT - 7 Hours
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.