Use Wine, wdviewer to print perfect Word .doc documents
Use Wine, wdviewer to print perfect Word .doc documents
In my job I am required to download, print and administer math tests created with Microsoft Word. I have quit using Windows as much as possible and use Puppy both at home and at work. Abiword doesn't come close to printing math formulas. OpenOffice Writer comes close but close isn't good enough. I have installed wine and wdviewer.exe (wordview2003).
http://www.microsoft.com/downloads/deta ... laylang=en
After installing wine:
http://www.murga-linux.com/puppy/viewtopic.php?t=26717
Open Rox to your download folder where you downloaded wdviewer.exe. Open another Rox to /usr/bin. Right click on wdviewer.exe and click Set Run Action. Drag wine from /usr/bin to the Run Action dialog box. You can then click on wdviewer.exe and it should install. Just use the default settings.
After installing wdviewer I went to /mnt/hda1/windows/fonts (c:/windows/fonts) and copied arial*.ttf, times*.ttf and symbol.ttf (all the arial and times .ttf's) to /root/.wine/drive_c/windows/Fonts
My math tests now print perfectly, no more missing formulas.
I am attaching a .pet which will place mswordview on the documents menu.
I haven't had to use any .docx (Word 2007) files yet but I see there's an online conversion service available.
http://www.docx2doc.com/
Edit: I am replacing the first .pet with 2. One will add MSWord to your Documents Menus and the OpenWith menu. And the other will do that and make it your default opener for .doc files.
Edit2: Sorry for the overchoice situation, hate to cause stress but I'm having fun with this. I've added a third choice which adds MSWordview to the two menus mentioned above and when you left click on a .doc file gives you a choice between Abiword and MSWordView.
http://www.microsoft.com/downloads/deta ... laylang=en
After installing wine:
http://www.murga-linux.com/puppy/viewtopic.php?t=26717
Open Rox to your download folder where you downloaded wdviewer.exe. Open another Rox to /usr/bin. Right click on wdviewer.exe and click Set Run Action. Drag wine from /usr/bin to the Run Action dialog box. You can then click on wdviewer.exe and it should install. Just use the default settings.
After installing wdviewer I went to /mnt/hda1/windows/fonts (c:/windows/fonts) and copied arial*.ttf, times*.ttf and symbol.ttf (all the arial and times .ttf's) to /root/.wine/drive_c/windows/Fonts
My math tests now print perfectly, no more missing formulas.
I am attaching a .pet which will place mswordview on the documents menu.
I haven't had to use any .docx (Word 2007) files yet but I see there's an online conversion service available.
http://www.docx2doc.com/
Edit: I am replacing the first .pet with 2. One will add MSWord to your Documents Menus and the OpenWith menu. And the other will do that and make it your default opener for .doc files.
Edit2: Sorry for the overchoice situation, hate to cause stress but I'm having fun with this. I've added a third choice which adds MSWordview to the two menus mentioned above and when you left click on a .doc file gives you a choice between Abiword and MSWordView.
- Attachments
-
- winepath.pet
- Needed to make the .pets below work with wine1.1.14
- (1.11 KiB) Downloaded 711 times
-
- mswordview_choose.pet
- Places MSWordview on the Documents menu and OpenWith menu and when you left click on a .doc file gives choice between Abiword and MSWordView
- (1.75 KiB) Downloaded 769 times
-
- mswordview_default_open.pet
- Places MSWordview on the Documents menu and OpenWith menu and makes it your default .doc opener
- (1.17 KiB) Downloaded 709 times
-
- mswordview_openwith.pet
- Places MSWordview on the Documents menu and OpenWith menu
- (1.05 KiB) Downloaded 777 times
Last edited by jrb on Sun 01 Mar 2009, 05:26, edited 3 times in total.
-
- Posts: 221
- Joined: Sun 28 Sep 2008, 10:23
- Location: Italy
Hi _MegadetH_
The only procedure I know for using non-linux printers is if they are on your network, attached to a running windows machine. The technique is outlined here:
http://puppylinux.org/wiki/how-tos/gene ... ronwindows
But to be honest, I tried it and couldn't get it to work.
Are you sure there's no .ppd file for your printer at:
http://openprinting.org/printer_list.cgi
I have a lexmark z705 which isn't supported but managed to find .ppd file for another lexmark (z700 I think) which at least got black and white printing to work.
The only procedure I know for using non-linux printers is if they are on your network, attached to a running windows machine. The technique is outlined here:
http://puppylinux.org/wiki/how-tos/gene ... ronwindows
But to be honest, I tried it and couldn't get it to work.
Are you sure there's no .ppd file for your printer at:
http://openprinting.org/printer_list.cgi
I have a lexmark z705 which isn't supported but managed to find .ppd file for another lexmark (z700 I think) which at least got black and white printing to work.
-
- Posts: 221
- Joined: Sun 28 Sep 2008, 10:23
- Location: Italy
Thanks very much, I saw there is a compatible driver for my lexmark x1250, but I don't know how to install in puppy.jrb wrote:Hi _MegadetH_
The only procedure I know for using non-linux printers is if they are on your network, attached to a running windows machine. The technique is outlined here:
http://puppylinux.org/wiki/how-tos/gene ... ronwindows
But to be honest, I tried it and couldn't get it to work.
Are you sure there's no .ppd file for your printer at:
http://openprinting.org/printer_list.cgi
I have a lexmark z705 which isn't supported but managed to find .ppd file for another lexmark (z700 I think) which at least got black and white printing to work.
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
This is very useful thread for some of our Pups and to remind the commercial Codewaeavers version of Wine (recently given away free for a day) does support Office 2007 - and probably will a lot longer than Microsith
- you might get some
Start a thread in 'user' - provide a link and ask for helpthere is a compatible driver for my lexmark x1250, but I don't know how to install in puppy
- you might get some
_MegadetH_,
Lobster's right, this should go under users but I'm not good at holding back answers.
As I remember , (correct me anyone if I'm wrong) if you have the .ppd file you can simply copy it to the /usr/share/cups/model/ folder, reboot and then run the cups printer wizard from the setup menu. As you go through the setup procedure for a new printer yours should be there.
Lobster's right, this should go under users but I'm not good at holding back answers.
As I remember , (correct me anyone if I'm wrong) if you have the .ppd file you can simply copy it to the /usr/share/cups/model/ folder, reboot and then run the cups printer wizard from the setup menu. As you go through the setup procedure for a new printer yours should be there.
-
- Posts: 221
- Joined: Sun 28 Sep 2008, 10:23
- Location: Italy
thanks for your help. I tried but don't work. anyway, I'm sorry maybe I'm going too off topic asking help here I opened a new thread for my problem.jrb wrote:_MegadetH_,
Lobster's right, this should go under users but I'm not good at holding back answers.
As I remember , (correct me anyone if I'm wrong) if you have the .ppd file you can simply copy it to the /usr/share/cups/model/ folder, reboot and then run the cups printer wizard from the setup menu. As you go through the setup procedure for a new printer yours should be there.
Upgrade to MSWordView menu dotpet, for OpenWith
jrb,
Thanks for posting your mswordview menu package. I recently installed the viewer before you posted the package, and executed it from the OpenWith option. Passing the filename parameter got a little tricky, due to slashes & backslashes and spaces in the file paths.
Now that I have installed the later version of the viewer and the 2007 converter pack, and then the menu package, I merged in my implementation of the OpenWith connection, which required recoding the mswordview script to work both with and without the filename parameter. I also made the script transfer to wine instead of keeping the script running while the viewer executes, since the script does nothing after calling wine. The new script could be easily modified for use with the other MS viewers - I have occasion to view Excel spreadsheets that gnumeric misformats, so that would be the next viewer to support.
My revised mswordview script (corrected 11/8):
To add mswordview to the OpenWith list, create a relative link to /usr/local/bin/mswordview in
/root/.config/rox.sourceforge.net/OpenWith
I do notice that the new menu item includes "03", which I assume coresponds to "Word Viewer 2003". Since the latest version available no longer uses the "2003" in it name, is it possible to omit the "03" from the item? I experimented without success.
I encourage you to incorporate my addition into your mswordviewer_menu dotpet. I have built my own consolidated dotpet, but do not want to appear as competing with yours, considering that you seem to know more than I about implementing menu items.
Richard
Thanks for posting your mswordview menu package. I recently installed the viewer before you posted the package, and executed it from the OpenWith option. Passing the filename parameter got a little tricky, due to slashes & backslashes and spaces in the file paths.
Now that I have installed the later version of the viewer and the 2007 converter pack, and then the menu package, I merged in my implementation of the OpenWith connection, which required recoding the mswordview script to work both with and without the filename parameter. I also made the script transfer to wine instead of keeping the script running while the viewer executes, since the script does nothing after calling wine. The new script could be easily modified for use with the other MS viewers - I have occasion to view Excel spreadsheets that gnumeric misformats, so that would be the next viewer to support.
My revised mswordview script (corrected 11/8):
Code: Select all
#!/bin/sh
MSPROG="/root/.wine/drive_c/Program Files/Microsoft Office/Office11/WORDVIEW.EXE"
[ ! "$@" ] && exec wine "$MSPROG"
exec wine "$MSPROG" "`winepath -w "$@"`"
/root/.config/rox.sourceforge.net/OpenWith
I do notice that the new menu item includes "03", which I assume coresponds to "Word Viewer 2003". Since the latest version available no longer uses the "2003" in it name, is it possible to omit the "03" from the item? I experimented without success.
I encourage you to incorporate my addition into your mswordviewer_menu dotpet. I have built my own consolidated dotpet, but do not want to appear as competing with yours, considering that you seem to know more than I about implementing menu items.
Richard
Last edited by rerwin on Sat 08 Nov 2008, 22:16, edited 1 time in total.
Hi Richard,
I'll start with the easiest thing first. To change the menu item from MSWordView03 to MSWordView or anything else just Open As Text /usr/share/applications/mswordview03.desktop and change the names there. You could even change the file name to mswordview.desktop if you want. Then open a console type "fixmenus", restart jwm from the Shutdown menu and the new name should be on the Document menu.
I'm glad to hear that my menu item works with the newer wordview (24.5MB). Sometimes the folder names change, office11 vs office12. The reason I stayed with 2003(11.7MB) was size. I'm running entirely in ram and wanted to keep my pup_4xx.sfs file small. The 2007 compatibility pack is 27.5MB as well. These are download sizes so I expect the installed sizes will be twice that.
I have a confession to make, I have wordview setup as the default .doc opener in my puppy. If I want to open them in abiword I go to OpenWith. I used a seperate file /usr/local/bin/defaultwordview with this code:
and I modified /root/Choices/MIME-types/application_msword to read:
This allows me to just click on a .doc file and it opens in WordView. As well when I download (in Opera) and choose Open, these files open in WordView automatically. I also linked /usr/local/bin/defaultwordview to /root/.config/rox.sourceforge.net/OpenWith but I never use that now that it's the default opener.
When I put this pet together I was thinking "keep it simple". Don't ask people to start editing puppy files. But you're absolutely right, I could have linked it to OpenWith easily enough. I'll take a look at that tonight and see about putting together a new .pet . I'll change the name to MSWordView as well.
P.S. I have also put together PowerPointViewer the same way but I hardly ever use it. Felt MSWordView more important. Would you like to do ExcelViewer or should I?
I'll start with the easiest thing first. To change the menu item from MSWordView03 to MSWordView or anything else just Open As Text /usr/share/applications/mswordview03.desktop and change the names there. You could even change the file name to mswordview.desktop if you want. Then open a console type "fixmenus", restart jwm from the Shutdown menu and the new name should be on the Document menu.
I'm glad to hear that my menu item works with the newer wordview (24.5MB). Sometimes the folder names change, office11 vs office12. The reason I stayed with 2003(11.7MB) was size. I'm running entirely in ram and wanted to keep my pup_4xx.sfs file small. The 2007 compatibility pack is 27.5MB as well. These are download sizes so I expect the installed sizes will be twice that.
I have a confession to make, I have wordview setup as the default .doc opener in my puppy. If I want to open them in abiword I go to OpenWith. I used a seperate file /usr/local/bin/defaultwordview with this code:
Code: Select all
#!/bin/sh
wine "C:\Program Files\Microsoft Office\Office11\WORDVIEW.EXE" "`winepath -w "$@"`"
Code: Select all
#! /bin/sh
exec defaultwordview "$1"
When I put this pet together I was thinking "keep it simple". Don't ask people to start editing puppy files. But you're absolutely right, I could have linked it to OpenWith easily enough. I'll take a look at that tonight and see about putting together a new .pet . I'll change the name to MSWordView as well.
P.S. I have also put together PowerPointViewer the same way but I hardly ever use it. Felt MSWordView more important. Would you like to do ExcelViewer or should I?
jrb,
Wow! Thanks for the comprehensive tutorial. Some time ago I, too, used the default technique, but had forgotten how I did it. This last time, I was not ready to do that, since I still use abiword. I just don't have an overall strategy for using the viewer. But I like the idea of making it easy for others, so they don't have to dig in as we have.
Thanks for mentioning the winepath command, which I was not aware of. That makes my sed technique unnecessary; I have now changed my script to use winepath. My reason for making separate wine calls for the presence/absence of the file name is to preserve the viewer's display of the "Open" window when no parameter is specified. Passing a null ("") parameter prevents that window from displaying.
(However, I find that my test should be only "[ ! "$@" ]",) It also supports the default capability, so that a separate script is not needed; application_ms-word would execute mswordview instead of defaultwordview.
I am game to implement an ExcelViewer dotpet, but have one stumbling block: the .xpm file, that appears to define the menu icon. Or have I got that wrong. How is that created? I tried the "include menu item" option on one of my uses of dir2pet (I think), but on another try the option had no effect. Maybe I need to review some wikis.
Before I start, I want to mull over what we should end up with to handle all situations. Particularly, providing the default capability.
After much mulling: I suspect the usual reason one installs wordview is to read other people's word-docs reliably. I tend toward preferring your use of the viewer as the default. To avoid having a user modify anything in /root/Choices/MIME-types/ to select viewing versus editing, I think we need application_msword to point to a "defaultmsdochandler" script, which the user could change/select between (exec) defaultwordprocessor and mswordview (the default). I think Barry expects users to edit the default... scripts, so this is not unreasonable.
The result would support three ways to start the viewer: menu, OpenWith, click-default, with a "standard" means of user control of the default. What do you think about this?
Richard
Wow! Thanks for the comprehensive tutorial. Some time ago I, too, used the default technique, but had forgotten how I did it. This last time, I was not ready to do that, since I still use abiword. I just don't have an overall strategy for using the viewer. But I like the idea of making it easy for others, so they don't have to dig in as we have.
Thanks for mentioning the winepath command, which I was not aware of. That makes my sed technique unnecessary; I have now changed my script to use winepath. My reason for making separate wine calls for the presence/absence of the file name is to preserve the viewer's display of the "Open" window when no parameter is specified. Passing a null ("") parameter prevents that window from displaying.
(However, I find that my test should be only "[ ! "$@" ]",) It also supports the default capability, so that a separate script is not needed; application_ms-word would execute mswordview instead of defaultwordview.
I am game to implement an ExcelViewer dotpet, but have one stumbling block: the .xpm file, that appears to define the menu icon. Or have I got that wrong. How is that created? I tried the "include menu item" option on one of my uses of dir2pet (I think), but on another try the option had no effect. Maybe I need to review some wikis.
Before I start, I want to mull over what we should end up with to handle all situations. Particularly, providing the default capability.
After much mulling: I suspect the usual reason one installs wordview is to read other people's word-docs reliably. I tend toward preferring your use of the viewer as the default. To avoid having a user modify anything in /root/Choices/MIME-types/ to select viewing versus editing, I think we need application_msword to point to a "defaultmsdochandler" script, which the user could change/select between (exec) defaultwordprocessor and mswordview (the default). I think Barry expects users to edit the default... scripts, so this is not unreasonable.
The result would support three ways to start the viewer: menu, OpenWith, click-default, with a "standard" means of user control of the default. What do you think about this?
Richard
Richard,
I like your idea about a choice. I played with xdialog
http://xdialog.free.fr/
last year and made a little gui for a network login. There's a radiolist or checklist template that might work.
Let me describe how I make menu entries. I tried that menu building feature of dir2pet and got hoplessly lost. When I put together a dotpet I always create a folder in a linux partition with the dotpet name. Inside that folder I create all the folders and subfolders for the program and copy the files to the proper folders.
For the menus I create /usr/share/applications. I then copy one of the existing .desktop files into this folder. For MSWordView I copied Abiword-wordprocessor.desktop. I then change the name of the file and edit it substituting in the new active filename i.e. "MSWordView" in place of "Abiword wordprocessor". Since Abiword is in the same category I'm always sure the new menu item will end up in the right place.
If I need a new icon and there isn't one in /usr/local/lib/X11/mini-icons that's appropriate then I do a google image search i.e. "msword icon" which became "ms word icon". If I see one I like I right click on it and save it. Then I open the saved image in mtpaint and go to Image->ScaleCanvas and set the width to 16 and click OK. Then I go to File->SaveAs and choose .xpm for file type. Place this icon in your dotpet folder, edit your .desktop file to use this icon and your ready for dir2pet.
BTW, I downloaded xlviewer2003 but I couldn't get it to install in Wine1.1.5. Kept aborting with an error.
I like your idea about a choice. I played with xdialog
http://xdialog.free.fr/
last year and made a little gui for a network login. There's a radiolist or checklist template that might work.
Let me describe how I make menu entries. I tried that menu building feature of dir2pet and got hoplessly lost. When I put together a dotpet I always create a folder in a linux partition with the dotpet name. Inside that folder I create all the folders and subfolders for the program and copy the files to the proper folders.
For the menus I create /usr/share/applications. I then copy one of the existing .desktop files into this folder. For MSWordView I copied Abiword-wordprocessor.desktop. I then change the name of the file and edit it substituting in the new active filename i.e. "MSWordView" in place of "Abiword wordprocessor". Since Abiword is in the same category I'm always sure the new menu item will end up in the right place.
If I need a new icon and there isn't one in /usr/local/lib/X11/mini-icons that's appropriate then I do a google image search i.e. "msword icon" which became "ms word icon". If I see one I like I right click on it and save it. Then I open the saved image in mtpaint and go to Image->ScaleCanvas and set the width to 16 and click OK. Then I go to File->SaveAs and choose .xpm for file type. Place this icon in your dotpet folder, edit your .desktop file to use this icon and your ready for dir2pet.
BTW, I downloaded xlviewer2003 but I couldn't get it to install in Wine1.1.5. Kept aborting with an error.
Richard,
I stumbled upon a really nice piece of code by jesse:
http://www.murga-linux.com/puppy/viewtopic.php?p=8151
which I was able to easily adapt for /root/Choices/MIME-types/application_msword.
When you left click on a .doc file it gives a choice between Abiword and MSWordView.
I've packaged it up and given it as a third option.
I stumbled upon a really nice piece of code by jesse:
http://www.murga-linux.com/puppy/viewtopic.php?p=8151
which I was able to easily adapt for /root/Choices/MIME-types/application_msword.
When you left click on a .doc file it gives a choice between Abiword and MSWordView.
I've packaged it up and given it as a third option.
It has just come to my attention that the latest wine1.1.14.pet does not contain the winepath function. This will prevent the above pets from using right click or opening .doc files by default.
I have taken the winepath function from wine1.1.7 and placed it in a .pet which will allow the above pets to work properly in wine1.1.14.
I have taken the winepath function from wine1.1.7 and placed it in a .pet which will allow the above pets to work properly in wine1.1.14.