Considering that the version of PDFRead I am rewriting from scratch in C++ is going to have only EPUB output (i.e. a ZIP of images), that's great news to hear! Unfortunately, a deadline at the office has kept me away from working at it for the last 1-2 weeks. Don't know when I'll really finish it, though...

The margins are still off on all of them. Can you post the html and the command line you are using to create the ePUB?

Unzip the bierig-src.zip attached and use the following command html2epub command. BTW, I had to do all of this in the calibre install directory for it to work properly with path's and such. You may have a different (better) way to do this.

Inside the .epub calibre places bierig_0.css, bierig_1.css and bierig_2.css files, with bierig_0.css derived from my .html, but bierig_2.css (created by calibre) has some standard margins that may effect what you see. I don't know of any way to turn them off, if they are the cause of that offset you see.

Does this .epub above still have a left-margin that makes the text go off the screen on the right-hand side? Sorry, but I don't have access to a Sony hardware reader.

I want to nail this, so that the next version of PDFRead will work with the Sony reader from the onset.

Page 2 looks fine (images 0_0.png and 1_1.png)

The rest have the margin problem.

So I have a theory, well I'm pretty sure actually this is the problem.

If you look at the image size (width only) Image 0_0 and 1_1 are 584 pixels wide. (Both are on page 2)
Images 2-4 have an image width of 552 pixels. So slap an image in an HTML that is 584 guess what you'll get margins. I bet if you center the images you'll get even margins on both the left and right side.

The only way you'll get rid of the margins is to stretch the image to 584 pixels. My recommendation is that you do so but make this feature togglable by the user.

A couple notes. I recommend you center the image and also add a page break after each image or else you get smaller images bunched up on one page.

The margin problem I thought you had was the text being pushed off the screen to the right and being clipped/chopped. I can (and will) live with the image having white space on both left and right sides (this is a restriction imposed by keeping the screen aspect ratio , and that's OK!)

Quote:

So I have a theory, well I'm pretty sure actually this is the problem.

If you look at the image size (width only) Image 0_0 and 1_1 are 584 pixels wide. (Both are on page 2)
Images 2-4 have an image width of 552 pixels. So slap an image in an HTML that is 584 guess what you'll get margins. I bet if you center the images you'll get even margins on both the left and right side.

To center the image all I would have to do is make the <p> tag be <p align="center"> around each portrait image. Doesn't work well with landscape mode, though.

Quote:

The only way you'll get rid of the margins is to stretch the image to 584 pixels. My recommendation is that you do so but make this feature togglable by the user.

No, that's a no-no! Don't stretch the image or else the aspect ratio will be off (and you'll get the 4:3 on 16:9 TV problem)

Quote:

A couple notes. I recommend you center the image and also add a page break after each image or else you get smaller images bunched up on one page.

The centering can be fixed as per above using the <p align="center"> tag, but the page break would seem unnecessary as the most recent Sony inspired PDFRead update (v1.8.2.1) makes all short pages be 754 tall and hence no "bunching" up. I think.

Quote:

I've attached the my modified ePUB. I've stretched the last image to see if the margins disappear. They do but the image does not look so good.
Also I've added a page break after image 1 and 2.
=X=

Will this force, in the epub created, the "XX_2.css" file to have zero margins though?

That file seems the cause of the shift to the left and clipping of the text on the right hand side of the scrren according to =X=. My original html had specified zero margins (in the "XX_0.css" file), but was overriden by your "XX_2.css" created file.

Kovid, could you perhaps reverse the order and make your "XX_2.css" (Sony defaults) file come first, then the one from my html file? Like this:

I agree with Kovid, one html per image. Chances are you will have problems with large ePUBs loading if you don't.

Quote:

Originally Posted by nrapallo

The margin problem I thought you had was the text being pushed off the screen to the right and being clipped/chopped. I can (and will) live with the image having white space on both left and right sides (this is a restriction imposed by keeping the screen aspect ratio , and that's OK!)

Oh that's right that was the original problem, it's been a while and I forgot.

Quote:

Originally Posted by nrapallo

No, that's a no-no! Don't stretch the image or else the aspect ratio will be off (and you'll get the 4:3 on 16:9 TV problem)

PDFLRF has a switch for this. There are some PDF images that have their default font so small without this feature it would be hard to read.

Quote:

Originally Posted by nrapallo

The centering can be fixed as per above using the <p align="center"> tag, but the page break would seem unnecessary as the most recent Sony inspired PDFRead update (v1.8.2.1) makes all short pages be 784 tall and hence no "bunching" up. I think.

I posted this on the older thread and Nick pointed out this is the newer one. I have my Intel Mac running 10.5.5. I followed the directions on the package but I'm getting an error....

Nick:

Thanks for the prompt reply. I've actually been bouncing between this thread and the other two you posted and I still have the error.

I have the Apple Developer Tool installed.
I downloaded the latest Python (2.6)
I installed pdktk
I downloaded pngnq (how does this get installed exactly? - just curious)
Installed fink and downloaded all packages as instructed
downloaded PIL and installed it
downloaded the latest PDFRead source from here and followed the directions

I'm a bit dumbfounded as to what I could be doing wrong .... should I post this on the newer thread instead of here?

I would say yes, PDFRead 1.8.2 works on the Mac, once you make sure pngnq works. Other than that, I didn't have to do anything else (other than follow the mac instructions for previous versions). I haven't noticed the missing page problem myself, but I have only done a few small tests at the moment. If you have a pdf that fails consistently and you would like me to check it on the mac, then let me know.

Thanks for the reply. Indeed it seems the problem was were pngnq was located. After digging up some posts via Google, I found the right place where to put it. Now that it is in the right place, I can successfully convert to lrf but the pdf to prc conversion is a no go. Instead, I get an html file that is blank.

This is seriously a good schooling on my VERY rusty Unix skills... I guess the purdy interface shields you out of the Terminal, at least in my case...

Cheers,

Roy

Quote:

Originally Posted by nrapallo

Here is fine (I read the post in the older thread, but will respond here).

While I'm no MACOS X / linux expert, it would appear that your problem lies in a system call to 'pngnq' and that program cannot be found.

This a path issue, as it seems to PDFRead that it is not installed by you/MACOS X.

Check the MACOS X instructions (read donovand's posts starting from here) again to see where this module gets installed (or is assumed to be already installed).