Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 18 Dec 2014, 09:42
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Use Wine, wdviewer to print perfect Word .doc documents
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Tue 28 Oct 2008, 23:23    Post_subject:  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. Smile Abiword doesn't come close to printing math formulas. OpenOffice Writer comes close but close isn't good enough. Confused I have installed wine and wdviewer.exe (wordview2003).

http://www.microsoft.com/downloads/details.aspx?FamilyId=95E24C87-8732-48D5-8689-AB826E7B8FDF&displaylang=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.
winepath.pet
Description  Needed to make the .pets below work with wine1.1.14
pet

 Download 
Filename  winepath.pet 
Filesize  1.11 KB 
Downloaded  464 Time(s) 
mswordview_choose.pet
Description  Places MSWordview on the Documents menu and OpenWith menu and when you left click on a .doc file gives choice between Abiword and MSWordView
pet

 Download 
Filename  mswordview_choose.pet 
Filesize  1.75 KB 
Downloaded  461 Time(s) 
mswordview_default_open.pet
Description  Places MSWordview on the Documents menu and OpenWith menu and makes it your default .doc opener
pet

 Download 
Filename  mswordview_default_open.pet 
Filesize  1.17 KB 
Downloaded  454 Time(s) 
mswordview_openwith.pet
Description  Places MSWordview on the Documents menu and OpenWith menu
pet

 Download 
Filename  mswordview_openwith.pet 
Filesize  1.05 KB 
Downloaded  463 Time(s) 

Edited_times_total
Back to top
View user's profile Send_private_message 
_MegadetH_

Joined: 28 Sep 2008
Posts: 219
Location: Italy

PostPosted: Wed 29 Oct 2008, 11:18    Post_subject:  

Do you know if I can use windows printer drivers with wine and vdviewer? It would be great because I can't print in puppy linux, my printer isnt supported.
Back to top
View user's profile Send_private_message 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Wed 29 Oct 2008, 17:44    Post_subject:  

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/general/genericsharedpostscriptprinteronwindows

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.
Back to top
View user's profile Send_private_message 
_MegadetH_

Joined: 28 Sep 2008
Posts: 219
Location: Italy

PostPosted: Mon 03 Nov 2008, 13:30    Post_subject:  

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/general/genericsharedpostscriptprinteronwindows

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.


Thanks very much, I saw there is a compatible driver for my lexmark x1250, but I don't know how to install in puppy.
Back to top
View user's profile Send_private_message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15122
Location: Paradox Realm

PostPosted: Mon 03 Nov 2008, 21:56    Post_subject:  

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 Razz

Quote:
there is a compatible driver for my lexmark x1250, but I don't know how to install in puppy


Start a thread in 'user' - provide a link and ask for help
- you might get some Smile

_________________
Puppy WIKI
Back to top
View user's profile Send_private_message Visit_website 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Tue 04 Nov 2008, 00:40    Post_subject:  

_MegadetH_,

Lobster's right, this should go under users but I'm not good at holding back answers.

As I remember Rolling Eyes , (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.
Back to top
View user's profile Send_private_message 
_MegadetH_

Joined: 28 Sep 2008
Posts: 219
Location: Italy

PostPosted: Tue 04 Nov 2008, 04:55    Post_subject:  

jrb wrote:
_MegadetH_,

Lobster's right, this should go under users but I'm not good at holding back answers.

As I remember Rolling Eyes , (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.

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.
Back to top
View user's profile Send_private_message 
rerwin


Joined: 24 Aug 2005
Posts: 1550
Location: Maine, USA

PostPosted: Fri 07 Nov 2008, 15:41    Post_subject: Upgrade to MSWordView menu dotpet, for OpenWith
Sub_title: Allows right-click on file to open with mswordview
 

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):
Code:
#!/bin/sh
MSPROG="/root/.wine/drive_c/Program Files/Microsoft Office/Office11/WORDVIEW.EXE"
[ ! "$@" ] && exec wine "$MSPROG"
exec wine "$MSPROG" "`winepath -w "$@"`"

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

Edited_time_total
Back to top
View user's profile Send_private_message 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Fri 07 Nov 2008, 20:12    Post_subject:  

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:
Code:
#!/bin/sh
wine "C:\Program Files\Microsoft Office\Office11\WORDVIEW.EXE" "`winepath -w "$@"`"

and I modified /root/Choices/MIME-types/application_msword to read:
Code:
#! /bin/sh
exec defaultwordview "$1"

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?
Back to top
View user's profile Send_private_message 
rerwin


Joined: 24 Aug 2005
Posts: 1550
Location: Maine, USA

PostPosted: Sat 08 Nov 2008, 18:09    Post_subject:  

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
Back to top
View user's profile Send_private_message 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Sat 08 Nov 2008, 22:45    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Sun 09 Nov 2008, 18:00    Post_subject:  

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. Smile

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.
Back to top
View user's profile Send_private_message 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Sun 01 Mar 2009, 01:24    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1001s ][ Queries: 12 (0.0048s) ][ GZIP on ]