Showing posts with label converter. Show all posts
Showing posts with label converter. Show all posts

Sunday, March 18, 2012

Batch Converting DOC to PDF with 7-PDF Maker

I had some Microsoft Word .doc files.  I wanted to convert them to PDF.  I wanted to be able to do this from the command line, so as to reach into different folders and process large numbers of them at once.

I went into Softpedia and did a search.  It came up with numerous free programs for this purpose.  I chose 7-PDF Maker.  It had a pretty good rating, as Softpedia programs go (4.0 stars; 16,001 downloads), and it did offer a command-line option.  I also downloaded its manual.  (It had a real manual!)

Once 7-PDF Maker was installed, I searched for its command-line executable, 7p.exe.  I put a copy of it into D:\Workspace (i.e., the folder where I was working).  That way, my commands that referred to 7p.exe would know where to find it.  There were other ways, but this was simplest, and 7p.exe was not a filename that would get confused with the ones I wanted to convert.

I opened a command window in D:\Workspace and typed "7p /?" to see what the command line options were.  Basically, it seemed, I could save the DOC as a PDF with a command as simple as "7p D:\Workspace\File.doc."  The /? instructions seemed to be saying that I had to specify an absolute path for the source file (i.e., not just "File.doc" without the drive and folder information).  I was not sure whether that was necessary with a copy of 7p.exe in the working folder.  There was also an option to save the resulting PDF to a different folder (e.g., "7p File.doc D:\Workspace\Output").  In addition, I could use wildcards.  7p.exe D:\Folder\*.doc would convert all doc files in Folder to PDF.  The same command with *.* would convert all supported files to PDF.  There were many supported filetypes (manual p. 18), including Word, WordPerfect, OpenOffice, Excel, PowerPoint, and various image formats (e.g., BMP, TIF, JPG, PNG).

There were also options for overwriting and recursion (i.e., working down through subdirectories).  In both cases, the default was false (i.e., don't recurse, don't overwrite).  The default was all I needed, so I did not investigate the exact syntax.  But it appeared that one instance of the word "true" on the command line would be construed as an instruction to recurse.

I gave it a test run with x.doc.  The command I used was simply "7p x.doc."  That gave me an error, so I tried "7p D:\Workspace\x.doc."  That gave me a different error:  "Variante referenziert kein Automatisierungsobjekt."  One translation was, "Variant does not reference an automation object."  Did this mean that x.doc was not a convertible DOC file?  Or that I should have been running this in the 7-PDF installation folder on drive C?  I tried the latter with an absolute path (i.e., not just "7p x.doc").  Same "Variante referenziert" error.

I tried opening x.doc in Word.  Oh.  Now I understood.  It was called a DOC file, but it was actually just a text file with a DOC extension.  But the manual said that text files were supported.  Maybe the .doc extension was confusing 7p?  I changed it to x.txt and tried the original approach of running the command in D:\Workspace rather than in the installation folder on drive C.  Specifically, I tried just "7p x.txt."  It said, "URL seems to be an unsupported one."  Maybe it was the wrong kind of text file.  Whatever; I used a text to PDF converter for them instead.

I did not proceed further with 7-PDF because, at this point, I found an alternative I liked better.  Not to say that 7-PDF was a bad program; it just was not working really well for me at this point.

Sunday, March 11, 2012

Printing Webpages as PDFs from the Command Line

I was looking for a way to print a bunch of webpages to PDF files from the command line. This page describes the search that, as before, brought me to wkhtmltopdf.

One approach, it seemed, was to use Pdf995 and Omniformat. I had been frustrated, last time I tried pdf995, but nearly a year had passed, and this was a different project. Maybe this time it would work. They seemed to want me to install pdf995 and then install Omniformat. Not being entirely sure which ones I would need, I installed a half-dozen programs from their webpages. They said Omniformat would include HTML2PDF995, which would permit command-line conversions among formats including HTML and PDF. So that sounded promising. Installation of Omniformat brought up an HTML page included in the program (evidently not available online) that said the command line syntax was like this: omniformat.exe [input file] [output format]. So in my example, it would look like this:

omniformat.exe http://www.cnn.com/Chinastory.html "png"
In that case, the Omniformat command wouldn't give the file the desired name, so I would have to add a command to do that. I tried it, just doing the part as shown for now. I got the error, "omniformat.exe is not recognized as an internal or external command, operable program or batch file." In other words, it wasn't part of the computer's path. I had to run this command from within the folder where omniformat.exe was installed. A search of my computer said that the folder in question would be "C:\Program Files (x86)\omniformat." So I ran that omniformat.exe command there. But it opened up the GUI and made me wait for maybe 20 seconds until it would open a session of Internet Explorer, so that it could display its adware; but then that failed with "An error has occurred in the script on this page." Same thing if I tried using a file on my computer rather than a webpage's URL in the command. It seemed that pdf995 was still not going to work for me.

A search led to Total HTML Converter which, for $50, promised to do exactly what I needed: convert webpages to JPG and possibly to PDF from the command line. There didn't seem to be a listing on CNET for Total HTML Converter. It got three stars from 21 users (3,582 downloads) on Softpedia. Fifty bucks for a three-star program ... hmm.

A Softpedia search for similar programs turned up Spire PDF Converter (rated 3.0 by four users; 1,057 downloads), HTML to PDF Converter (rated 3.6 by eight users; 6,353 downloads), 7-PDF Website Converter (rated 3.7 by 10 users; 1,746 downloads); HTML_ to PDF (rated 3.2 by 19 users; 2,225 downloads); and Gerolf Markup Shredder (rated 2.8 by 23 users; 1,816 downloads). Gerolf was the only one whose description said it could run from the command line. I checked the homepages of the others to see about them. Spire said nothing about it. Likewise HTML to PDF Converter, and 7-PDF. I wasn't sure about HTML_ to PDF, so I downloaded that and Gerolf. HTML_ to PDF gave me an unzipped folder with no executables; it looked like I would have to learn something about PHP programming to use it. Meanwhile, Gerolf's installation asked me if I wanted to install GMS, to which I said sure, go ahead. Then it gave me a dialog partly in German, to which I replied Ja. Next an almost entirely dialog that seemed to be asking where I wanted to open the installation files. Its Durchsuchen (Search) button took me to a Temp folder, so I just clicked on that and said OK. Next, a dialog telling me to run gmsunzip.bat to install. Apparently I should have written down where I unpacked the files. Fortunately, Everything found gmsunzip.bat, so I did run it. I pressed the Whatever key to move past its first screen of information. It was starting to look like I should have chosen a more permanent location, so I went back and started over with the installation. Now I understood that its first dialog, referring to GMS, was of course referring to Gerolf Markup Shredder, and not to some other program; I just hadn't understood that it was asking me if I wanted to install the thing that I had just double-clicked on. So now I Durchsuched to a newly created folder called C:\GerolfHTMLtoPDF, and after the installation I went there and ran gmsunzip.bat. Unfortunately, at the end, I got a message indicating that this was an unsupported 16-bit installation that was incompatible with 64-bit versions of Windows. So I would have to run it in a Windows XP Virtual Machine. While thinking about that, I went back to HTML_ to PDF Converter. I took a closer look. The second script on the webpage seemed to be something that I might be able to just copy into Notepad, save as an HTM file, and double-click on. I tried that. No, it was going to require some PDF knowledge, though maybe not much. Now I noticed that Gerolf would not go away. It kept insisting on telling me, again and again, about the Unsupported 16-bit Application problem. I had to use Start > Run > taskmgr.exe. But, whoa, what's this? "Windows cannot find 'C:\Windows\System32\taskmgr.exe." Had one of these foolish programs, or something else, screwed up my system? I could see that taskmgr.exe was indeed in the System32 folder. Hmm. Not clear what was happening. Eventually I found that a CMD window was running; I had to kill that to shut off the recurrent dialogs. But that didn't fix the problem with taskmgr.exe. Maybe a reboot would ... later.

I went back to my previous post on a somewhat similar problem. The most promising solutions there seemed to be PrintHTML, print all linked files from an HTML page in Internet Explorer, or use wkHTMLtoPDF. I shied away from wkHTMLtoPDF because it was so complicated. I installed PrintHTML and the DHTML Editing Control (required on some systems, evidently including mine, judging from error messages when I tried running PrintHTML without it), and then looked at its instructions. It seemed to be just designed to permit some tinkering (e.g., margin adjustments) while printing local HTML files; no clear indication of how it would work with a webpage. I tried this command:
printhtml.exe file="https://www.nytimes.com"
(I had to run that command from within the folder where PrintHTML was installed.) It gave me a nearly blank page. It seemed that, basically, it was not designed to do what I needed. How about the approach of printing linked files from within Internet Explorer (IE)? The concept was that I could create an HTML page containing links to the webpages I wanted to print, and IE could be persuaded to print them all. I wasn't sure if they would print as one big PDF that I would have to split apart, but that seemed likely. In that case, the files wouldn't have the desired individual names. This tentatively seemed to be another case where the approach was designed for local files, not for webpages.

On this basis, I went back to wkHTMLtoPDF, as described in another post in this blog, posted at about the same time as this one, on the subject of Converting URL-Linked Webpages to PDF.

Monday, January 10, 2011

VMware Workstation 7 in Windows 7: Error Moving File or Folder

I had just started using Windows XP SP3 as a guest in VMware Workstation 7.1 on a Windows 7 host.  It seemed that I was getting a certain error every time I tried to move files from one folder to another.  Both the target and source drives were on network drives, in the VMware sense:  they were local drives on that computer, but they were not part of the actual virtual machine (VM) as drive C was, so Workstation considered them network drives.  When I attempted to paste these files into a folder on that other drive, I got this error message:

Error Moving File or Folder

Cannot move [filename]: It is being used by another person or program.

Close any programs that might be using the file and try again.
These files were not in use anywhere, as far as I could tell.  I was using a utility called Unlocker.  When this kind of error would occur, Unlocker would pop up, provide relevant information, and offer to help.  In this case, Unlocker's message was, "No locking handle found."  This was not absolutely the last word on the subject, but I had found Unlocker to be pretty reliable.

This was happening every time I tried to move files.  It was not a problem with one particular troublesome file.  It happened with moving files, not with deleting them.  I was able to delete files, and copy files; I just couldn't move files.  I had done a global change of file properties so that none were read-only.  This inability to move files occurred on all network drives.

I did a search on this error.  Very few results turned up.  I posted a question on it in a VMware forum.  One of the results from the search led to a lot of instances where people were getting the same or a similar error message in non-VM contexts.  Some of the advice offered in those kinds of situations involved one-off solutions, where there was a particularly troublesome file.  Someone suggested trying to do this as administrator, but I was already running as administrator.

That last person remarked that the errors s/he was experiencing may have resulted from changing the host name on the computer.  This was not a newly created VM.  I had used it in Workstation for Linux, to run WinXP on an Ubuntu host on a separate computer.  When I brought it over to this computer and fired it up, Workstation asked whether I had copied or moved it.  I said I moved it.  So possibly what was happening was that Workstation remained confused about some aspect of the machine due to the fact that it was not a virgin WinXP creation.

To explore this possibility, I closed down this VM and started up another.  I didn't want to spend the time to create a whole new WinXP installation in a VM.  What I did instead was to choose a preexisting VM that had different origins.  So now I felt that I should clarify the genealogy of this thing.  This troublesome VM was not actually created in Workstation.  It was created by VMware Converter.  I had used Converter to convert a native WinXP installation into a VM that I then used in Workstation for Linux.

I did have another WinXP VM that I had created in Workstation for Linux -- installing Windows XP from scratch inside a virtual machine, that is, rather than installing it on a regular computer and then converting it.  So that was the one I tried using now.  The problem did not occur there.  These differences in origins may have explained the difference in behavior.  It may also have had something to do with the differences in size.  The converted native machine was twice the size of the born-in-virtual machine.  Its size itself may have been an issue, or there may have been a problem with some program that I had installed within that larger machine.

Wednesday, September 22, 2010

Installing Windows XP SP3 in VMware Workstation 7.1 on Ubuntu 10.04

I had decided to stay with VMware Workstation 7.1 for a while longer, adopting a wait-and-see strategy toward VirtualBox and whatever other virtualization developments might be underway.  A couple of years had passed since I had first installed Windows XP on VMware Workstation in Ubuntu.  My old virtual machines (VMs) were creaking and malfunctioning.  It was time to create a new WinXP VM.

I had obtained mixed results from efforts to use VMware Converter to build VMs from existing WinXP installations or other sources.  I decided to build a fresh installation, installing XP within a newly created VM.  I had already installed VMware Workstation.  Now I started it as root user by typing "sudo vmware," and then I went into Ubuntu's Applications > Accessories > Terminal.  In Workstation, I went into Edit > Preferences and adjusted the settings that would apply to all VMs, some of which could only be set by root.  In the Preferences > Workspace tab, I went with the default settings for the most part.  For the default location of my VMs, I chose a partition on a separate hard drive for better performance.  In the Display tab, I selected the three Autofit options.  I selected all of the Updates options.  In the Memory tab, I left about 1.5GB of RAM for the system; the rest was for VMs.

When I was done with the settings, I killed that session and restarted VMware as a normal user.  I created a new VM with these characteristics:

  • I started with a 40GB independent, persistent SCSI VM, but ran into some problems when I tried to shrink it, and ultimately had to start over.  Since it was easier to grow a VM than to shrink it, I decided on 20GB to start.  Although I initially created this as a preallocated space, it seemed that clones (which I made from time to time as backup, as the installation and tweaking process went along) would default to being non-preallocated, and I decided that was actually better until things got settled, because non-preallocated drives were smaller and therefore easier to clone and to back up.
  • A 4GB independent, persistent IDE virtual drive, within this VM, for the paging file (VM > Settings > Hardware > Add).  This, I discovered, was best created after WinXP was installed.  Otherwise, WinXP was quite capable of brainlessly installing itself into this little partition and leaving the 20GB partition unused, thereby providing yet another reason to start over from the beginning.  Also, this drive was best created when the VM was powered down; only a SCSI (not preferred) drive could be created while the machine was powered up.  Note also that, as soon as you start down this path, Workstation may create a miniature version of a file for such a hard drive, even if you then abort the process -- in which case your later attempts to create that file may trigger strange results, until you investigate and delete any such runt file.
  • 1.5GB RAM.  I had opted for 32-bit Ubuntu and WinXP after numerous previous hassles with 64-bit systems.  The discovery of PAE-enabled kernels meant I could go above the ordinary 32-bit limit of 4GB of RAM, so I was comfortable with this 1.5GB allocation for a single VM.  I could have gone higher, but I had almost never reached the point of using even this much.
  • One single-core CPU.
  • Based on my own usage, I set "Don't automatically connect" for floppy, USB devices,  or printer.
  • Power:  enter full screen mode after powering on; close after powering off.
  • Shared folders:  always enabled, map as network drive, make read/write only those that needed to be written to in Windows.
  • No AutoProtect.
  • Guest isolation:  enable drag and drop; enable copy and paste; don't enable VMCI.
  • VMware Tools Updates:  use application default (currently update automatically).
Then I inserted the Windows XP CD and installed Windows XP, using a slipstreamed CD with Service Pack 3 (SP3) on it.  In my first attempt at this, I had to deal with the problem of making the VM boot from the CD.  I had just learned how to do this.  First, in Ubuntu's Terminal, I typed "sudo gedit [path][filename].vmx," for the .vmx file pertaining to this VM, and then I went to the end of that file and added bios.bootDelay = "10000" and saved the edited file.  This gave me a ten-second delay on VMware's splash screen.  So then I had time, on reboot, to read the options and choose F2 for BIOS setup.  In BIOS setup, I chose Boot, moved the CD-ROM drive up to be first in the boot sequence, and then hit F10 to save and close.  Then I installed WinXP.  The process was completely automatic, this time; apparently the latest version of VMware Workstation was able to detect my settings from the underlying Ubuntu installation.

Once WinXP was done with its basic installation process, I right-clicked on the VMware Tools icon in the system tray (i.e., the lower-right-hand corner of the WinXP desktop), chose "Open VMware Tools," and selected all three items in the Options tab, and then closed that.  To get the Windows desktop to stretch all the way across the monitor, I used VMware's View > Stretch Guest (using the menu at the top of the screen), and then returned it to View > Autofit Guest, and for some reason that did it.  I had to map my network drives after listing them in Workstation's VM > Settings > Options > Shared Folders.  Then I turned to the process of tweaking my WinXP installation.  There are some additional VM-related notes in my post on that.  When I tried to open a PDF file from within the VM, I got a Default Host Application error message.  Another post discusses that problem.

I wanted to use Acronis TrueImage to make periodic images throughout the installation process, so as to capture each working state of the system in a single snapshot.  On a standalone WinXP installation, that would have been just a matter of inserting the Acronis CD and making the backup to a separate partition.  In the VM context, though, Acronis was only willing to recognize only those partitions that were defined as part of the VM.  What I did instead, then, was to power down the VM, use Nautilus to copy the entire VM's folder to an NTFS drive, boot Acronis, and make an image of that VM folder.  (I also made a .zip of it in 7zip, just in case.)

To get the system to pause before loading Windows within VMware, so that I would have time to make a decision to adjust the BIOS or choose boot devices, I edited the individual virtual machine as described in a previous post.  Basically, I set Workstation's VM > Settings > Hardware tab > CD/DVD > "Connect at power on" and "Use a physical device" (though I was intrigued by the "Use ISO image" option).  In Terminal, I typed "sudo gedit [path][filename].vmx," for the .vmx file pertaining to this VM; and at the end of that file I added a line that said this:

    bios.bootDelay = "10000"

and that bought me ten seconds instead of one or two, when that vmware logo came up.

*** NOTE ***

At this point, I stopped developing this post.  Several other system issues had to be taken care of first, and those were superseded by non-system tasks.  When I returned to this post several months later, my purpose was just to close it down.  I had decided, by that time, to stop working on VMware within Ubuntu.  The following fragments are the other notes I had left over, in incomplete form, when I ceased working on this post.

Fragmentary notes continue as follows:

*  *  *  *  *


At some point in the process, I started getting an error message when I was trying to shut down the WinXP VM:
End Program - VMwareUser.exe
This program is not responding.
I did a search and found that virtually nobody was having this problem.  That was not a good sign.  A different search suggested that lots of people were having problems of one sort or another with VMwareUser.exe.  That was not a good sign either.  I didn't have an answer for this problem at this time.

After adding another program, Windows Explorer began flashing, refreshing itself every couple of seconds, in what appeared to be a different network drive problem.  I have written up the process of solving that in a separate post.

After tweaking the WinXP installation, I began adding programs.  I installed Copernic Desktop Search as one of those programs.  VMware Workstation treated my data drives as network drives, and Copernic regarded network drives as a sign that I was in a workplace, so I could not use their free version with VMware.  I downloaded their professional version ($40 to buy) and used it on a trial basis.  It was not able to save its index to a network drive.  Its index, I heard somewhere, would be about 10% of the total size of the files being indexed.  So if I had 100GB worth of files, I would have a 10GB index.  I definitely did not want that kind of monster sitting on my drive C.  But there seemed to be no alternative.  I decided to add a third virtual hard drive (30GB max, not preallocated) to the VM, made it drive Q, and told Copernic to save its index there.  When Copernic was done with its indexing, that drive

The only tweak that didn't seem to work was the one where I went into Internet Explorer and tried to save its Temporary Internet Files folder to some drive other than C.  It wouldn't save to a network drive.  But it also wouldn't even save to the little drive that I had created to serve as a paging file.  Possibly there wasn't enough disk space available for it there.

In the interests of improving performance, I worked through a VMware document on that subject.

Thursday, December 31, 2009

Notes on Converting Word Processing Documents from 1985-1995

I was using Ubuntu 9.04 (Jaunty Jackalope) and VMware Workstation 6.5.2, running Windows XP virtual machines (VMs) as guests. I was trying, in one of those VMs, to convert some data files from the 1980s and 1990s. This post conveys some notes from that process.


I had used a number of different database, spreadsheet, and word processing programs back then. The filenames had extensions like .sec and .95. These suggested that the file in question was probably not a spreadsheet (whose extensions would probably have been .wks or .wk1 or .wq1). I suspected these were word processing docs, but what kind?

I had a copy of WordPerfect Office X4, so I tried opening them in that. The formats I had used principally back then were WordStar (3.3, I think), WordPerfect 6.0 for DOS, XyWrite III+, and plain ASCII text. So for some documents it took several tries, telling WordPerfect X4 to try these different formats, before the document would open properly. Even then, not all of them did.

I also tried the approach of highlighting a bunch of these files, right-clicking, and indicating that I wanted to convert them to Adobe Acrobat 8, or to combine them in Acrobat. Unfortunately, these efforts tended to cause Windows Explorer and/or Acrobat to crash.

It occurred to me to try another approach. I left Windows in VMware and dropped down to Ubuntu. I selected 57 files that I wanted to convert. OpenOffice 3.0 Writer started up by default. It opened them all. They had been last modified in 1993 and thereabouts. I think they were created with Word 3.1. For each file, I clicked a button and got a PDF created in the same folder with the same name and a PDF extension.

OOo Writer wasn't able to open some WordStar 3.3 files from the mid-1980s. Several sources referred me to Advanced Computer Innovations for that sort of conversion. Their prices weren't bad, but I didn't want to pay $1 per file per 50K for these old materials. Instead, I looked into old Microsoft converters.  Those, unfortunately, did not appear to be available anymore.  A search led to a forum that led to WordStar.org converters.  Those, however, did not appear to go back to WordStar for DOS 3.3.  Graham Mayor's page looked like a better bet.  It gave me a Wrdstr32.zip file, but by the time I got around to it, I had already addressed my needs, so I didn't actually try this one.

Separately, somehow, I found (or maybe I had always retained) a copy of a program that seemed willing to install "Microsoft Word 97 Supplemental Converters."  Searching for this led to a Microsoft page where I was able to download the Word 97-2000 Import Converter (wrd97cnv.exe); unfortunately, that proved to be a backwards conversion from Word 97 to Word 95.  Trying again, I found that the Microsoft Office 2003 Resource Kit webpage led to a list of downloads that included an Office Converter Pack that I downloaded (oconvpck.exe).  I seem to have installed this, and I think this is what ultimately did the job for me.

Resources for converting XyWrite III+ files were pretty scarce by now, a decade after what appears to have been the last (short-lived) effort to reconstruct a manual of its text-formatting codes. Apparently nobody who has a copy of the paper manual has gotten around to PDFing and posting it; or perhaps Nota Bene (which apparently bought XyWrite in the 1990s), for some reason, is unwilling to allow any such reference to be made available. But here are some examples of codes used, from what I've been able to figure out and recall:

«PT23» start using proportional type font no. 23
«PG» page break
«TS5,10» set tabs 5 and 10 spaces to the right
«DC1=A 1 a» set DC1 outline structure (first level = A, B, C ...)
lm=0 set left text margin at zero characters (i.e., not indented)
«FC» format centered, i.e., center text
«MDBO» begin boldface
«MDNM» end special formatting (e.g., boldface)
«SPi» set page number to i (e.g., for preface)



I also had some old .wpd (WordPerfect) documents.  Not all of them had .wpd extensions to begin with.  To bulk rename the ones that didn't, I searched for a bulk renamer, to rename them all to be .wpd files.  I tried Bulk Rename, but its interface was complex and inflexible compared to that of ExplorerXP -- just select the files you want to rename, press F2, and set the parameters.

Once I had the files named with .wpd extensions, the next question was, how to get them into PDF format.  That was easy with the others, above, to the extent that Microsoft Word could read them; I could PDF them from there.  I shouldn't say it was "easy"; it was still a manual process, and I was now searching for a way to automate it.  Unfortunately, I was not finding any freeware ways to convert from .wpd to .pdf.  Later versions of WordPerfect include a Conversion Utility to bring those files into the modern era, but they are still wpd files.  Adobe Acrobat 8.0 was able to recognize and convert the files (select multiple files in Windows Explorer, right-click and choose the Convert to PDF option), but they proceed one by one, and I had hundreds of files, and it took several seconds for each one to process.  Also, it added an extra blank page to the ends of some if not all of these old WordPerfect documents.  I didn't find any wpd to odt (OpenOffice Writer) converters.  I thought about trying Google Docs, which someone said could bulk convert to pdf, but they didn't accept wpd as input.  I tried looking for a converter from wpd to doc, and that led me to Zamzar.com, which would convert directly from .wpd to .pdf, but would only let me upload one file at a time. I found that the Options in OpenOffice (I was using the Ubuntu version) could be set to save automatically as Word documents, so I did that, and then uploaded a few of them to Google Docs and downloaded them as PDFs.  The formatting was messed up on a couple of them.  I tried a comparison without Google Docs, just converting to pdf from the .doc files that OpenOffice had saved.  The formatting was better that way, so Google Docs didn't add anything; and the process of converting the Word docs to PDF was the same one-file-at-a-time thing as if I were printing from WordPerfect itself, so involving Word didn't add anything either.  In the end, the best and probably fastest approach seemed to be to select a bunch of wpd files in Windows Explorer, right-click and select Convert to Adobe PDF.

This seemed likely to be a continuing effort, but these notes ended here. 

Tuesday, December 29, 2009

Converting Real Media Video to Other Formats

I had a RealMedia (.rm) file.  I wanted to convert it to .avi or some other format that I could edit in Adobe Premiere Elements.  I heard that Super © was useful for this purpose.

The first recommended step was to download and install the Real Alternative Lite codec.  Next, using Internet Explorer (not Firefox), I downloaded and installed Super C.  In Super C, I dragged the .rm file over from Windows Explorer to the open area at the bottom of the window.  Then, under "Select the Output Process," I chose the radio button that did not say "Join Format-Identical Files"; that is, the one I chose said "Select the Output Container," and gave me a choice among many formats.  I chose FLV/SWF (Flash).  Then, at the bottom of the screen, I clicked on Encode (Active Files). This gave me "An ERROR has occurred.  Click to read more."  I briefly tried to troubleshoot that, and tried various recommended settings, but had no luck.

I considered alternatives.  Video Cleaner Pro by River Past provided a free trial with too many restrictions.  Someone recommended Helix DNA Producer, and that led to Easy RealMedia Tools.  I downloaded both, opened the former, and installed the latter.  Both seemed to be designed to create RealMedia files, without the ability to export to other formats.  I downloaded the free trial of AVOne Video Converter.  It required an installation of RealMedia Player, which I had already done.  Due to restrictions on the free trial version, it wouldn't convert my 10-minute, 835kb .rm file.

I tried another approach.  I set up CamStudio to record the playback of the .rm file.  CamStudio was having trouble with audio recording, though, so I installed NCH's Debut Video Capture Software.  [Some weeks go by at this point.]

Some time has passed at this point, so pardon me if my recollection is mistaken, but at any rate Debut has proved useful for screen capture.  I have not found Super (C) to be very useful.  For Real Media specifically, I belatedly discovered that Real Player itself now comes with a converter, so that solves the original problem.  I have also used Oxelon to convert video easily from the Windows Explorer context (right-click) menu.

Monday, May 11, 2009

Installing 64-bit VMware Workstation 6.5.2 on 64-bit Ubuntu 9.04

In 2008, I had gone through quite an ordeal to install VMware 6 on 64-bit Ubuntu. What a difference a year makes! By now, VMware was now up to 6.5.2, and Ubuntu was up to 9.04. Also, I had a much better idea of what I was doing. The installation was vastly easier as a result. After installing and configuring Ubuntu, I downloaded the latest version of 64-bit Workstation in .bundle form, copied it to /home/ray (where "ray" was my username), and installed by navigating to that location in Terminal and typing "sudo sh [filename].bundle." In this case, the filename was VMware-Workstation-6.5.2-156735.x86_64.bundle. (To uninstall, go to /home/[username] and type "sudo ./[filename].bundle -uninstall." Stop after the uninstallation portion of the program sequence.) I skipped the "Path to Eclipse directory" option. The installer ran. I got "Installation was successful." To configure Workstation, I typed "sudo /usr/bin/vmware." This opened Workstation as root administrator. I was then able to set Edit > Preferences. The next step was to set up virtual machines (VMs). I had two sources of VMs. First, I had a Windows XP installation that I wanted to convert to a VM. I had been using this installation every day for several weeks and had installed a bunch of software on it. Also, I had been having some weird freezes in Adobe Acrobat, and I wanted to see whether these were caused by the hardware on that particular computer. I figured that if I didn't get the crashes when I ran Acrobat on virtual hardware in a VM, then the physical hardware probably was the culprit. Second, I had some preexisting VMs that I had been using on my previous VMware installation. They had worked reliably, and they were also quite a bit smaller (and would therefore load and back up faster) than the 35GB I had allocated for this latest installation. So, first, to convert that WinXP installation, I booted into Windows, and downloaded, installed, and ran the latest version of VMware Converter. (At this point, that version was 4.0.0.) In this version, I clicked on "Convert Machine" to run it. The first time through, I then ran "Configure Machine" to make it bootable; but I don't believe I did run it when I tried again a second time. In both instances, I indicated that I was talking about VMware Workstation, not a VMware Infrastructure VM. In case it is indeed necessary to run the Configure Machine process, here are the steps in that processs. Configure Machine brought me a message that I needed Sysprep files. These came in different versions, depending on whether the computer had been updated for XP Service Pack (SP) 2 or SP3. (They were supposedly also available on the CD at \Support\Tools\deploy.cab. If you use the CD, remove it before proceeding with the following steps.) I had installed SP3, so I used the instructions for that service pack. For my purposes, the steps to install the Sysprep files were as follows:

(1) Save a copy of deploy.cab on the hard drive, so I wouldn't have to look for it if I didn't like my first VM and needed to recreate it. (2) Double-click on deploy.cab to open it up. (A .cab is a "cabinet," i.e., storage, file.) (3) Copy its files named sysprep.exe and setupcl.exe to a folder named C:\Sysprep. (4) In C:\Sysprep, double-click on sysprep.exe. Select "Don't reset grace period for activation" and set Shutdown mode to "Shut down." Then click Reseal. This should give you a "Sysprep is working" message. It didn't work right for me the first time, but after rebooting it did its deed in just a few seconds.
On the second run-through, I rebooted into Ubuntu, then continued with the following steps. I started Nautilus as root (i.e., "sudo nautilus") and changed the permissions (right-click > Properties) of the /home/ray/.vmware folder so that the user named ray (as distinct from root) had permission to create and delete files in that folder. Then I started the VM, but I got "Error: Cannot open file '/home/ray/.vmware/preferences': Permission denied. Unable to read user preferences." Fortunately, time heals all wounds. When I came back to the installation process at this point, a couple of weeks had gone by and I really had no idea what I was doing previously, but I could see that problem just described seemed to have gone away. So if this happens to you, the recommended solution would be to put your computer in a closet and go on vacation. When I got back to it, I had a new problem. The problem was that my CNN news report videos weren't playing. For this, the recommended solution was to install 64-bit Adobe Flash Player. I followed the instructions to download that. It was a tar.gz file, and this time, instead of using the "tar -zxf filename.tar.gz" command that I had used previously, I tried right-clicking and selecting "Open with Archive Manager." (Not sure if that option had existed in prevous versions of Ubuntu.) This showed me a file called libflashplayer.so. I right-clicked and extracted it to the desktop. I used Synaptic to completely uninstall nsplugin. In File Browser (Nautilus), I enabled "Show hidden files" and moved libflashplayer.so to the .mozilla/plugins folder in my Home directory. That worked for many people, but not for me. I tried again as root (i.e., type "sudo" at the Terminal prompt before any other command -- in this case, "nautilus") and moved it instead to /usr/lib/mozilla/plugins, as one commenter on that instruction webpage suggested. I also tried "sudo killall firefox." Still no luck.
Here, for posterity, were a couple of random notes that I made while I was attempting this installation:
As root, set VM > Settings. As root, in the VMs, type "/dev/audio" in place of "Auto Detect" in VM > Settings > Hardware > Sound Card.
To install VMware Tools in a VM, first use VM > Install VMware Tools. Then, in Windows Explorer, go to drive D and run Setup. May have to insert WinXP CD in the physical CD drive during this process. Better if you've copied the WinXP CD's i386 folder to the VM previously; can just point there for some installation files.
At about this point, I gave up on trying to get VMware to work on that machine. I turned instead to the machine where I had been running Ubuntu 8.04 with VMware Workstation for the past year. I did an upgrade installation of Ubuntu 9.04 on that machine and installed Workstation 6.5.2 there. I used pretty much the approach described above. The upgrade type of installation seemed to save a lot of steps, though; I went right into using Workstation without much delay at all.
I did continue to have a problem, in the new setup, that I had had on that same machine in Ubuntu 8.04. The problem was that if I ran more than one VM at a time, the whole computer would crash when I tried to suspend or close on of them. On the new installation, I didn't get crashes, but VMware became nonworking all the same. I would just get a mostly blank white screen. I couldn't figure out a solution, so I posted a question on this problem.
While I was waiting for someone to suggest an answer, it occurred to me that maybe I could open a separate session of VMware Workstation for each of my VMs. In early testing, at this point, it appears that having eight sessions of Workstation open at once (even if nearly all of the VMs themselves are shut down or suspended) does degrade performance in any given VM. I will be experimenting with how many VMs I can have open without too much of a performance penalty. This approach does seem, so far, to solve the problem of Workstation crashing or becoming unresponsive.