Monday, January 31, 2011

Installing the .wwf toolkit under Windows

Introduction
Converting a PDF file to .wwf is so trivial under Linux that a bunch of shell scripts is enough to perform that task. When a user asked me whether it could be ported to Windows I was bewildered. Running Unix shell scripts under Windows means you have to trick Windows in thinking it is running a Windows program and the shell scripts in thinking they're running in a Unix environment. But all components were available for Windows, so I decided to give it a try. Note I tried Win98 as well, but that didn't work. You will need WinXP at least.

Preparation
First, you have to download all components:If you don't know what your Windows directory is issue this at the prompt:
echo %windir%

You can get a prompt by starting cmd.exe. I will refer to the Windows directory as C:\WINDOWS.

Installing WGET
Place the executable in C:\WINDOWS - or whatever your Windows directory may be.

Installing Poppler-utils
Unzip the archive and place all executables in C:\WINDOWS.

Installing PDFtk
Unzip the archive. You will only need the files in the bin directory. Place pdftk.exe in C:\WINDOWS and libiconv2.dll in C:\WINDOWS\SYSTEM32. Be sure not to overwrite previous versions!!

Installing Zenity
Simply accept all defaults, including the path. Install it on the C:-drive if you can, it will make your life much easier.

Installing BGstart
Simply accept all defaults, including the path. Install it on the C:-drive if you can, it will make your life much easier.

Installing MSYS
You may also take the newer 1.0.11, but note that version has packaging errors. Simply accept all defaults, including the path. Install it on the C:-drive if you can, it will make your life much easier.



Finally, a console will pop up, posing you two questions:
  1. Will you continue the postinstallation [YES]
  2. Have you installed MinGW? [UNLIKELY]
If you installed MinGW before (which is a C-compiler) you probably already have MSYS anyway.

Installing Ghostscript
Simply accept all defaults, including the path. Install it on the C:-drive if you can, it will make your life much easier.

The Windows-version of Ghostscript fortunately comes with Unix scripts of the major utilities. They are all located in the lib directory. You have to add this directory to the path so MSYS can find them. That's not very hard. Simply click the "My computer" icon, then click "Control Panel" and finally "System".



Choose the tab "Advanced" and click the button "Environment variables":



Choose "System variables", then "Path" and add the directory in question up front. Usually, this will be something like C:\Program files\gs\9.00\lib.

Installing .wwf toolkit
MSYS has left an icon on your desktop. Click it. Then navigate to the wwftk-1.7.tar.gz archive. You can use cd as usual, no need to change drives. Note backslashes become slashes and drives become directories, e.g. H:\download\wwftk-1.7.tar.gz becomes /h/download/wwftk-1.7.tar.gz. If the path contains embedded spaces, enclose it with double quotes. Assuming the archive is located at H:\download, issue:
cd /h/download
tar -xzvf wwftk-1.7.tar.gz
cd wwftk-1.7/Windows
sh installwin.sh c

If Ghostscript wasn't installed on the C:-drive adjust accordingly. If all goes well, you'll see the following screen:



After that, .wwf tools is installed.

Post installation
You probably want to start the .wwf tools from the screen. All you have to do is to make two shortcuts. First, click right on the desktop and select "Shortcut":



Second, choose "Browse" and navigate to C:\msys\1.0\share\wwftk\bg_pdf2wwf.bat.



Third, choose a name for this shortcut. I prefer PDF2wwf.



Basically, the shortcut has been created now, but it is not very attractive. Right click it and choose "Properties".



Click "Change icon" and "Browse".



Navigate to C:\msys\1.0\share\wwftk.



Select wwf128.ico.



Select the appropriate icon and press "Ok". Repeat the same procedure for wwf2pdf and you're done.

Wednesday, January 26, 2011

The WWF driver gets competition

A user on the "Save as WWF" Facebook page asked me whether I could port the .wwf toolkit to Windows. It took some research, because emulating a Unix environment on Windows is very quirky, but I did it. I posted some screenshots this morning, but they were not amused. Within hours they were taken offline, despite their promise not to censor. Obviously, they don't like the competition. And for good reason..



First, the .wwf tools allow you .pdf to .wwf conversion. And vice versa. That is by design. Second, you can choose whether you want that banner or not. The WWF driver always appends that free WWF advertisement to each and every document it processes.



And despite some rumors, it cannot be disabled. That is by design. Third, the .wwf tools produce much smaller files. Finally, it doesn't phone home. Feel free to examine the code.



In the meanwhile, the WWF have acknowledged they are violating the BSD license which comes with the OS/X PDF reader "Skim". They promised a new version. Yeah, right..



Their bug ridden Windows driver is still at v1.03. Release Candidate, that is. I'd rather use a beta of .wwf tools.. ;-)

Friday, January 14, 2011

The .wwf format in practice

This week I promised myself to put the .wwf format to the test. So, I sent a .wwf file to my girlfriend at work and I distributed all documents at work that I didn't find worth printing in the .wwf format. These were the reactions I got:
  1. My girlfriend wasn't even able to open it, because the MIME-type wasn't known in her Vista installation.
  2. I p*ssed off a very expensive consultant at work who ordered me to send a printable version or I'd have to look for another assignment.
  3. A colleague of mine who prints virtually everything sent it to another nerd colleague of mine who returned a printable version of the document using my "cracking" pages.
I asked them whether they had become more "aware" of the issue at hand. Most thought it was merely a nuisance, others said they would never donate a dime to the WWF anymore.

Update: For some reason unknown, WWF Italy is now collaborating with forest managers to "develop awareness on the issues of sustainable management of forest resources" and "promote (..) the purchase of forest products"!

Update: As I predicted, the WWF violates FOSS licenses.

Update: The WWF have promised to comply to the "Skim" BSD license. As always, I'm not holding my breath. Even with a buglist the size of your arm, their Windows driver is still the same old v1.03 Release Candidate.

Friday, January 7, 2011

How to use the .wwf toolkit

DISCLAIMER: This software does NOT originate from the WWF. It is neither supported nor approved by the WWF in any way, shape or form.

The .wwf toolkit is a very simple, but versatile piece of software. If you don't want to use a GUI, you can simply run it from the prompt:



Which is fine if you want to include it in another shell script or do some batch conversion. You can add the -n switch to override the default banner settings or -q if you go for the highest quality PDF possible. The flip side of using this option is that conversion is slower, it generates slightly larger files and worst of all: it may not always work for you.

If you want to integrate it in your GUI, you have to install either KDialog (included in KDE) or Zenity (Gnome). I'm (still) using KDE3, but I'm sure there are similar facilities in other desktop environments. The best way to run them from there is to include them in the menu:



Now the only thing you have to do is to select it:



You can also add .wwf as a mimetype and associate wwf2pdf with it:



Now open your filemanager and navigate to the .wwf file in question. Select wwf2pdf and click it:



wwf2pdf will start and create an unprotected PDF file on the fly, which you can open right away.



This way, converting those .wwf files into something useful will take only a split second of your life. Of course, you can do the same thing for pdf2wwf as well.

Legal stuff
A question I've been getting a lot lately is, "do I have to conform to the WWF "terms of use" when I produce a file with your toolkit?"

Well, first of all: I'm not a lawyer, this is NOT legal advise, so you better consult a professional before willfully violating the WWF terms. I can give you a few general guidelines, but the short answer is: yes.

The official WWF drivers for Windows and OS/X are copyrighted material, so if you use them you are bound to the WWF terms by default, because they are part of the license. It doesn't matter whether you agreed to the license or not - the license is the only thing that gives you the right to use the software. Period.

If you use the .wwf toolkit (with all its GPL components), you're obviously not bound to the WWF software license, but you may still be bound to the "terms of use", as I will explain later on.

The files the .wwf toolkit produces are industry standard PDF files. PDF files are an open standard (ISO/IEC 32000-1:2008) and even if the WWF driver would add some proprietary stuff to its files, it isn't included in the files the WWF toolkit creates.

Well, the WWF might argue that the combination of extension and PDF format is their invention and consequently proprietary, but that is a long stretch by any measure. As far as I know no patents have been filed.

The only part left is their copyrights and trademarks. Trademarks are the most troublesome thing here, because it's also the least tangible kind of intellectual property. Even engine sounds (Harley Davidson), smells or colors (BP, T-Mobile) can be trademarked.

As far as I know, there has never been issued a trademark or any other intellectual property protection for a file extension alone. Furthermore, the .wwf extension is already in use and has been in use for a long time:However, if you include any of their trademarks in your files, you're bound to their terms. That means, the panda bear, the "Save as WWF, save a tree" slogan or their "Save as WWF" tree icons. Note that even a simple uppercase "WWF" is protected, so choose your names carefully!

That is, if they exist. Neither a search with the Swiss trademark organization, nor the German trademark organization, nor the European trademark organization gave any hits for "Save as WWF". As a matter of fact, no trademarks have been entered after August 4th, 2010 for "One Planet MBA".

Matt von Jung, WWF's advertising agency in Germany, has applied for several figurative marks (3020100743719, 3020100743727, 3020100743735 and 3020100743743) on December 18th 2010 at the German Trademark Office (DPMA). Since they are still just applications, the trademarks itself are still unspecified.

Thus, the "terms of use" are in fact a license to use their trademarks. Nothing more, nothing less. The .wwf toolkit license (GPLv3) has nothing to do with it.

There is no © sign or "Copyright" text on their banner, which is required in some countries - but not the US. And here is where local legislation comes in, which makes this issue legally particularly fuzzy, especially when "moral right" is concerned. But again, it boils down to trademarks.

In those countries (where a © sign is required) you could probably get away with your own banner as long as you don't use any of their trademarks, so it is perfectly clear to a casual observer that:
  1. It doesn't originate from the WWF;
  2. The word ".wwf" is only used to identify the file type and its properties.
My advise? The WWF is known for aggressively defending its trademarks, so why take the risk? Most users will never produce files that remotely violate the "terms of use" stated. And if you do, simply don't add the banner. Or even better: make it a PDF. Same thing, different extension.

Admitted, it is rather scary that a company can decide what you can and may produce with their software. Imagine Microsoft, stating in its EULA that you cannot use Internet Explorer to surf to porn sites?

Fortunately, there is always FOSS between you and the proprietary world. And that is a comforting thought..

Thursday, January 6, 2011

What the WWF has to learn about FOSS

The WWF must have understood by now that you cannot enter the realm of software development without finding the FOSS community on your way. Where and when software is concerned, FOSS is a force to be reckoned with.

For example, the French April organization, dedicated to the promotion of FOSS and open standards, sent a letter to the WWF, voicing the same objections as Tracy Anne of LXer and other members of the FOSS community:
Re: request for a meeting concerning your campaign "Save as WWF, Save a Tree"

Madam President,

The April organization is dedicated to the development and promotion of free software. It tries to make people aware of the dangers of leaving certain information and knowledge in the hands of private enterprises. Free software - like GNU / Linux operating system and OpenOffice.org office suite - is designed to ensure that users have control over their own computer.

It was with some surprise that we learned of the WWF initiative to create a new file format, which is just a PDF using DRM to disable printing.

We understand the need of the WWF to draw attention to the ecological impact of computers and even support it. However, we regret the the WWF have resorted to DRM for this purpose. In effect, the WWF format is merely a PDF format with restricted functionality, designed to constrain the user.

DRM is not only ineffective but are also detrimental in many ways (technical, economical, cultural). These issues were recently addressed in an April publication, which I've included.

However, although the goals themselves are laudable, the form this initiative has taken is regrettable for several reasons. The fact that this format is based on DRM, a secret format locked by means of cryptography, makes it impossible to read with free software. Moreover, the WWF disregards users of free software, since the software in question is only available to proprietary systems like Apple MacOS X and has not been released under an Open Source license.

In addition, WWF should note that the lack of interoperability is a major contributor to obsolescence. Obsolescence is in the interest of the manufacturers, since it promotes consumerism, which causes many environmental problems if not properly controlled. This initiative is therefore catastrophic. For example, if I want to read a WWF file and I can not get the software required to read it, the only thing I can do is to buy a new computer that does. Because computers are so quickly outdated and consequently so quickly replaced, the ecological impact of these "gadgets" is particularly detrimental.

Finally, it is regrettable that WWF seeks to address social problems by means of coercive technology. Because DRM is primarily there to enable publishers to interfere with the privacy of their clients.

Because we really want to help you to make the public aware of the ecological impact of computer usage, I propose a meeting in order to discuss the subject. The WWF may approach the Free Software Foundation on an international level. Couchet Frederick, Executive, and the team at April are available for more information.

Madam President, I'm hoping to see you soon.

Yours truly,

Tangui Morlier
Chairman of April

The WWF have promised to publicly address these concerns, but don't hold your breath..

In the meanwhile, there is not much help from the industry either. Rick Brown, senior director, product management, Acrobat Solutions said: "Adobe Acrobat allows customers to create PDF with a range of security permissions, including the ability to disallow printing. The .wwf format is based on the PDF standard and it is great to see WWF leveraging PDF in creative ways. At this point, we don’t intend to support the .wwf file extension."

As if that is not enough, the software itself is giving the WWF headaches as well. In addition to their OS/X driver the WWF recently published their Windows driver. It features the following annoyances:

Consequently, as of January 5th an overwhelming majority of "Chip" readers dislike it. Note that the OS/X version has its problems too.

It seems it will be some time before the WWF will release a Linux version. But wait a minute: Linux is already supported! Yes, a set of simple bash scripts was able to fill the gap, simply because the FOSS ecosystem is very rich already. And it is performing very well.

In a test performed by Hermann Radeloff this file was printed using the WWF driver, which resulted in this file. The same file generated by the Linux .wwf toolkit resulted in this file. In short, a 104 KB file was bloated to a massive 686 KB file, while the Linux .wwf toolkit reduced it to a meager 95 KB. That is: with WWF banner.

So WWF, why not release the mess you made under a free license and let the FOSS community take care of it? Why not work together? Or would you rather persist in continuing this public relations disaster?

Update: Well, it's come to this: the WWF have threatened to kick me off their Facebook page. Obviously, I've gone on their nerves. For those who want to make up their own mind, here is the full thread.



Update: I've just released the .wwf toolkit manual as .wwf. FOSS style. ;-)

Update: Neither a search with the Swiss trademark organization, nor the German trademark organization, nor the European trademark organization gave any hits for "Save as WWF". As a matter of fact, no trademarks have been entered for the WWF after August 4th, 2010 for "One Planet MBA".

Matt von Jung, WWF's advertising agency in Germany, has applied for several figurative marks (3020100743719, 3020100743727, 3020100743735 and 3020100743743) on December 18th 2010 at the German Trademark Office (DPMA). Since they are still just applications, the trademarks itself are still unspecified.