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 now works!
Printing now works!
 
   NeoOffice Forum Index -> NeoOffice Development
View previous topic :: View next topic  
Author Message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Aug 14, 2003 12:54 am    Post subject:

I just checked in some more printing features. My latest commit includes the following:

- Suppression of all OOo printing dialogs - Now only the Java native print dialogs appear!
- Page range support - You can now select a page range to print. This was really tricky as I found that Mac OS X's Java 1.3.1's Toolkit.getPrintJob() is broken in a few places.
- Multiple copies and collation - I found that Java already takes care of this. OOo only prints one copy and then the Java handles collation and sending multiple copies to the printer!
- Color printing - By default, the OOo code assumes that a printer is a color printer. Fortunately, Java automatically converts colors to greyscale when sending the rendered page to a black and white printer.

I still have a couple of items left to implement, but most of the printing functionality is now complete. Here is the list of remaining items:

- Setting page size - The code uses the default paper size (i.e. 8.5 x 11 inches or A4 depending on your locale).
- Handling scaling - I have to find the private data member in the PageFormat class that Mac OS X's Java uses to store this value so that I can transform the graphics that NeoJ paints to.

I figure that these two changes will take me a day or two of work to implement. Also, they won't require a radical rebuilt like this change does.

If you want to test out the new printing functionality, you can can build it by doing the following steps. Note that this will cause 3 modules to be rebuilt so it will take an hour or two to rebuild. I promise that the rebuilt will be simpler with the next update:

Code:
cd <NEO_HOME>/neojava
rm -Rf vcl svtools sfx2
rm -f build.neo_vcl_patch build.neo_svtools_patch build.neo_sfx2_patch
cvs update -d -P
make


Important: updating the code does not cause the vcl and svtools to rebuild. That is why you need to delete the build.neo_*_patch files in the above commands.

When the build is done, you can install the neojava/install/NeoOfficeJ.pkg.

For those of you who want to test out the changes without building them, I have posted a *.tar.gz with the updated libraries at:

http://www.planamesa.com/neojava/downloads/temp/printtest2.tar.gz

To install the *.tar.gz file, do the following:

- "su" so that you are running as the root user (NeoJ is installed as the root user so this step must be done for the next steps to work)
- "cd" to <NeoJ installation directory>/NeoOfficeJ.app
- Execute the following command to unzip the file:
Code:
tar zxf <path to downloaded *.tar.gz file>

- Restart NeoJ

Hope you all like the changes! Now I need to start thinking about how to finish implementing copy and paste between NeoJ and other applications.

Patrick
Back to top
Max_Barel
Oracle


Joined: May 31, 2003
Posts: 219
Location: French Alps

PostPosted: Thu Aug 14, 2003 5:14 am    Post subject: Better PDF generation

After testing a bit this last printing patch, I noticed that PDF files generated by Neo/J (when choosing Preview from the standard Aqua print dialog) are half the size of those generated by OOo/X11, even with a truetype capable PPD. This is for the same file using a TT font.
Back to top
schlesi
Oracle


Joined: Jun 07, 2003
Posts: 234
Location: near Cologne, Germany

PostPosted: Fri Aug 15, 2003 12:08 pm    Post subject: CVS & printing

Hi Patrick,

there's still a problem with the CVS & printing. I've followed your last instructions but printing doesn't work.

Thomas
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Aug 15, 2003 12:22 pm    Post subject:

Thomas,

Which version of neojava/makefile do you have? You should have version 1.31.

Also, when you followed the instructions, did the installer get rebuilt? In theory, the installer should get rebuilt if you delete any of the neojava/build.neo_*_patch files. You can check if the installer got rebuilt by checking the timestamp on the neojava/build.package and rerunning "make".

Patrick
Back to top
schlesi
Oracle


Joined: Jun 07, 2003
Posts: 234
Location: near Cologne, Germany

PostPosted: Fri Aug 15, 2003 1:15 pm    Post subject:

Hi Patrick,

the makefile is version 1.19 and the installer was rebuilt (timestamp from this evening).

Thomas
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Aug 15, 2003 1:46 pm    Post subject:

I think that I know what the problem is: you have checked out the NeoOfficeJ-0_0 tag. As a result, you are not getting any newer changes to the tip of the CVS tree.

To move to the tip of the CVS tree, you are going to need to execute "cvs update -d -P -A". The "-A" moves you to the tip of the CVS tree. If you run into any of the "cvs update: cannot open CVS/Entries for reading: No such file or directory" errors when you run this command. Delete the offending directory and rerun this command until the cvs update succeeds.

Then, delete all of the "build.neo_*_patch" files. This will cause all of the custom NeoJ directories and the installer to be rebuilt which will take an hour or two. Fortunately, this will *not* cause OOo to rebuild.

Hope that helps,

Patrick
Back to top
schlesi
Oracle


Joined: Jun 07, 2003
Posts: 234
Location: near Cologne, Germany

PostPosted: Sun Aug 17, 2003 1:43 am    Post subject:

Hi Patrick,

printing via CVS-build is working now Smile

Thank you!

Thomas
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Development All times are GMT - 7 Hours
Goto page Previous  1, 2
Page 2 of 2

 
You cannot post new topics in this forum
You cannot 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.