MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Calibre (https://www.mobileread.com/forums/forumdisplay.php?f=166)
-   -   Validation error (https://www.mobileread.com/forums/showthread.php?t=96777)

rrosenwald 08-31-2010 05:41 PM

Validation error
 
Using epubcheck 1.0.5 as provided at:

http://www.threepress.org/document/epub-validate/

I get the following error for all FileName.epub:

# ERROR: FileName.epub/titlepage.xhtml(13): bad value for attribute "preserveAspectRatio"

If I edit the line in titlepage.xhtml file which reads:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 323 500" preserveAspectRatio="none">

and remove the part that reads: viewBox="0 0 323 500" preserveAspectRatio="none" or just remove the: preserveAspectRatio="none" I am able to eliminate the error. Can anyone tell me what the effect of this is edit is?

Is there a way to stop Calibre from writing the preserveAspectRatio="none"?

kovidgoyal 08-31-2010 10:14 PM

this is a bug in epubcheck. If you want to work around it, turn on the preserve aspect ration setting in the epub output conversion settings.

rrosenwald 09-03-2010 01:54 PM

Thanks Kovid, you've done a great job with Calibre.

Is there any way to get Calibre to just output YYYY-MM-DD without the timestamp to avoid the erroneous error epubcheck reports:

ERROR ... .epub/content.opf(12): date value '2010-06-09 00:00:00-04:00' is not valid, YYYY[-MM[-DD]] expected

kovidgoyal 09-03-2010 01:55 PM

use the epub-fix command that comes with calibre

mrbillb 09-27-2010 09:36 PM

epub-fix
 
Quote:

Originally Posted by kovidgoyal (Post 1091374)
use the epub-fix command that comes with calibre

How do I use it?

DoctorOhh 09-27-2010 11:29 PM

Quote:

Originally Posted by mrbillb (Post 1133956)
How do I use it?

Epub fix is a command line tool, read up on it here.

K-Thom 09-30-2010 10:02 AM

Is there any possibility to use/run epub fix in the GUI and not from the command line? Which gets quite tedious if you've got to fix dozens of files ...

Manichean 09-30-2010 10:05 AM

Quote:

Originally Posted by K-Thom (Post 1138339)
Is there any possibility to use/run epub fix in the GUI and not from the command line? Which gets quite tedious if you've got to fix dozens of files ...

You can write a shell script or a batch file, depending on your OS, to automate that. Look for documentation on using the for- loop in your OS' CLI.

K-Thom 09-30-2010 01:02 PM

Sorry, usually I write novels, but not batch files. ;)

Manichean 09-30-2010 06:21 PM

Quote:

Originally Posted by K-Thom (Post 1138648)
Sorry, usually I write novels, but not batch files. ;)

Are you running windows?

Manichean 10-01-2010 12:12 PM

I'll post this regardless of your answer for future reference:
On windows, paste this into a new text file:
Code:

@echo off
for /r . %%f in (*.epub) do <command>

and replace <command> with whatever command you want to run. Save with extension .bat in directory containing epubs, run from command line.
This will recurse through all subdirectories and run the command on all epubs it finds. If you only want to check/fix the ones in the current directory, use this instead:
Code:

@echo off
for %%f in (*.epub) do <command>



All times are GMT -4. The time now is 07:58 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.