benbois’s posterous

 
Filed under

howto

 

Convert a PDF to Epub for reading with your iPhone

It's a bit frustrating to read a PDF file with an iPhone.

Why ?
Not only because the screen is too small (ok.. it could be is) but really because the PDF format doesn't offer the needed functionalities for this type of device (no zoom, fixed page width..).
It' why the formats of eBook exist, of course!

Good but what to do if you have like me some PDF impossible to find in eBook format?
It's not more a problem since I found this very useful online tool called epub2go (http://epub2go.com/).

In 3 clicks, your PDF file will be converted.
 And more, the website offers the possibility to import easily the eBook in your iPhone via your email.

Let's go for the (unneeded) howto:

1- Choose if the PDF file is on your computer or online.
2a- if it's online, click on the bottom button and insert the URL
2b- if the file is on your computer, click on the top button and choose where it is (Browse)
3- After the processing screen, insert your email address and click on "Send to my iPhone"

That's it for the conversion part.

Now to install the eBook on your Iphone:
1- go to Apple Store and install Stanza. It's a free eBook reader.
2- check your email on your iPhone and open the message from ePUB2Go
3- click (tap) on the link inside the message
4- now the ePUB2Go website is automatically open and in the second after a black screen appears with an icon of a book in the middle of the screen.
5- finally, Stanza is open with your new book in the list!

A good read!

 

Update:
If you want to read your ePub on your desktop, have a look on this list (from fileinfo.com):

Mac OS Mac OS Adobe Digital Editions
Lexcycle Stanza
FBReader
calibre
Windows Windows Adobe Digital Edition
Lexcycle Stanza
Mobipocket Reader Desktop
FBReader
dotReader
calibre
Linux Linux FBReader
dotReader
calibre

Filed under  //   ebook   howto   iphone   pdf   tips  

Comments [1]

Jaunty Jackalope (Ubuntu Remix 9.04) on eeePC 901

Today is the migration day for the netbook of my wife, Alice. After a long time with pleasure and  some annoying things , we've decided to migrate the eeePC 901 from Xandros to Ubuntu Remix.
And to be honest, it hasn't been really painful to achieve this job.

Find here the steps to do the same with your netbook:

1- download the last release from the Ubuntu server:
http://releases.ubuntu.com/9.04/ubuntu-9.04-netbook-remix-i386.img

2- install ImageWriter:
sudo apt-get install usb-imagewriter

3- use ImageWriter to put ubuntu-9.04-netbook-remix-i386.img in the USB key (need a mini. 1Gb usb stick)

4- insert the usb key to the eeePC, start the PC and tape on ESC touch to view the boot menu. Select the USB key in the list.

5- in the boot menu, choose the right language (F2) and the right keyboard map (F3) and Enter
You'll start the live distribution.

6- when the system is ready, click on the Install shorcut.

7- after the firsts easy steps, you arrive to the screen of partitioning. Here, you have some choices to make. I chose to make 3 partitions: 1 partition on the first SSD (root "/"), 2 on the second SSD (10Gb for"/usr" and ~5Gb for "/home") all with the new format Ext4 (better results than Ext3).
You have noticed that I didn't add swap partition, why? First of all, because the netbook has 2Gb of RAM and secondly because after some reads, the writings in the swap seems bad for the life of the SSD (not all people are agree with that but I had to take a decision).

8- after this important step, the installer copies the OS on the netbook.

9- reboot when it's asked (don't forget to remove the usb key).

As you can see, the boot is quite quick, under 40 seconds to go to the desktop with the wifi connexion.

Alice uses her eeePC for 4 main usages:
- to stay in touch with our family (in Spain, France, ),
- in the kitchen as a (luxury) webradio
- to make videos of our children or take a picture during cookery.
- to record her voice for her French lessons.

So, I had to install some softs:
- for the video, wxCam (sudo apt-get install wxcam). It has better perfomances than Cheese in video recording mode.
- for the webradio, Rhythmbox with a customized list of French webradios.
- for the webphone, Skype for linux (works better than on Xandros even the webcam). You must specify the sound device to get sound. Go to Options / Sound Devices and choose in the 3 lists, "HDA Intel (hw:Intel,0)", then Apply.
- finally, nothing to do for the voice, Sound Recorder is already installed on Ubuntu Remix.

To finish the job:
- remove unused stuff like Evolution
- add plugins like Flash (nonfree), Jre (SUN).
You can do this job with the Synaptic Package Manager (in Administration tab).
- remove unused applications started with the system: go to Preferences tab / Startup Applications and unselect "Bluetooth Manager", "Check for new hardware drivers", "Remove Desktop", "Visual Assistance". Of course it depends of your specifi hardware or preferences.
- add shortcuts in the Favourites tab: simply selecting the shortcut (from its tab for example, Internet) and to glide it into the Favourites tab.

Here you can see the result.

Update (2009.06.13):
Wifi WPA authentication is impossible with the current rt2860 driver. To solve this problem, we have to downgrade the driver.

1) Get the driver from http://www.array.org/ubuntu/dists/intrepid/eeepc/binary-i386/rt2860-dkms_1.7.1.1_all.deb

wget http://www.array.org/ubuntu/dists/intrepid/eeepc/binary-i386/rt2860-dkms_1.7.1.1_all.deb


2) Go to terminal, and move the pre-installed driver so it won't get loaded.

cd /lib/modules/2.6.28-11-generic/kernel/drivers/staging/rt2860/
sudo mv rt2860sta.ko rt2860sta.bak

3) Install rt2860-dkms_1.7.1.1_all.deb. It will also install dependencies needed to compile the driver.

sudo dpkg -i rt2860-dkms_1.7.1.1_all.deb
sudo apt-get install -f

If it doesn't retrieve the right packages, makesure "build-essential", "linux-header-generic" and "dkms" is installed. Let it run and it should complete without a problem.

4) Restart. The new driver should work automatically.

 

Filed under  //   eeepc   howto   opensource   ubuntu  

Comments [18]

Easy multiple image submit buttons management with Mootools

It can be interesting to have multiple image type submit buttons in a form for example to print and to submit  the form to another page.
A way to do it is to change dynamically the action attribute (in the form tag) by another value just before to send the form.

First of all, add the buttons to your form:

<form id="myform" name="myform" method="post" action="my/temp/page.html">
...
<input type="image" src="path/to/myimagebutton1.gif" id="btn1" rel="path/to/print/action/page.html" />
<input type="image" src="path/to/myimagebutton2.gif" id="btn2" rel="path/to/submit/action/page.html" />
</form>

Secondly, insert a small Javascript code after the DOMready declaration.

window.addEvent('domready',function(){
$('btn1').addEvent('click', function() {
$('myform').setAttribute('action', $('btn1').getProperty('rel'));
$('myform').setAttribute('target','_print');
});
$('btn2').addEvent('click', function() {
$('myform').setAttribute('action', $('btn2').getProperty('rel'));
$('myform').setAttribute('target','_parent');
});
});

We get the action link from the rel attribute of the related image button and inject it to the action attribute of the form tag.

In the same time, it's possible to declare the place (target) which will be active (here we have _print page for the 1st and _parent for the 2nd button).

This tip is really usefull when you use the Formcheck class!

Filed under  //   dev   howto   javascript   opensource  

Comments [2]

FormCheck library for Mootools - fix overlay tips for IE6.x

It's not possible to show a div element (or any other elements) on a select field in Internet Explorer 6.x
Of course, we get the same problem with the library FormCheck (http://mootools.floor.ch/).

I've produced recently a small "dirty" fix.
The solution is to insert a iframe inside the generated div (tips).

in forcheck.js:

	/*
Function: addError
Private method

Add error message
*/
addError : function(obj) {
...
if (obj.element) {
obj.element.empty();
if (this.options.display.errorsLocation == 1) {
var errors = [];
obj.errors.each(function(error) {
errors.push(new Element('p').set('html', error));
});
/** Iframe hack for IE6.x for select overlay **/
if(Browser.Engine.trident4){
var cf_iframe = IFrame({
src:'about:blank',
'frameborder':0,
'height':'35px', //must be improve but how?
'width':'300px', //must be improve but how?
'background':'transparent'
}).injectInside(obj.element);
}
/****/
var tips = this.makeTips(errors).injectInside(obj.element);
...

in formcheck.css
...
/* fix IE6.x iframe/select */
.fc-tbx iframe {
z-index:-1;
filter:mask();
display:block;
position:absolute;
}

The known problem with this fix is the fixed dimensions of the iframe.
It's not possible to put at 100%, the iframe generates ann horizontal scrolling bar.

This solution is based on an idea of Fabien Molinet (http://fabien-molinet.fr/) and his script called "Select Fix 0.30".
Thanks to him!

Filed under  //   dev   howto   javascript   opensource  

Comments [1]

IE6.x doesn't work again with some Mootools code

Following my yesterday work, I have to add a new check on change event for the form in the script.

The idea is to send a request for each change in the form.
It's easy to do it with Mootools, just add the addEvent() method
This code works fine with Firefox..and Co:
$('myform').addEvent('change', function() {
request.send($('myform'));
});
BUT with Internet Explorer 6.x, it doesn't work at all!
Yes again.. I know.

So, another way to get the same result is to use the magic function $$
With it, it's easy to get all form elements to check their state (on change status)
$$('^myform_').addEvent('change', function() {
request.send($('myform'));
});

Literally, we follow all the id elements starting by "myform_", for example:
<input type="text" name="myform_text1" id="my_form_text1" />

Of course, you have to start all of your form elements name like this..
It's not a problem for me, I do it by convention.

Filed under  //   dev   howto   javascript   opensource  

Comments [3]

working day with Mootools.. find good tips here: http://davidwalsh.name blog

Well, a web dev day again today.
I looked for a solution to auto-update form in ajax.
I found solution here:
http://davidwalsh.name/periodical-ajax-requests-mootools-12
and here: http://davidwalsh.name/return-multiple-values-from-ajax-using-mootools
thanks to David ;-)

I modified a bit the script to return form parameters in the ajax
request, here you are if you want it:

var request = new Request({
url: 'ajax.php',
method: 'post',
onComplete: function(fullresponse) {
var response= fullresponse.split('::');
$('result0').set('html',response[0]);
$('result1').set('html',response[1]);
}
})
var sendForm = function() {
request.send($('form3'));
}
sendForm.periodical(5000);

Filed under  //   dev   howto   javascript   opensource  

Comments [3]