View Single Post
Old 10-06-2020, 09:59 PM   #1
jo_by
Junior Member
jo_by began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2020
Location: New Zealand
Device: iPad
Unhappy Error when uploading to vendor platforms, and a question about editing the OPF file

Kia ora,

I am new to ePub. I'm a graphic designer with some rudimentary html skills, but definitely flying blind in terms of fiddling with code. So much so that I don't really know where to put this question, so sorry if it's in the wrong place.

I have been working on a fixed layout ePub for a design journal. (I should note here that yes, it does need to be fixed not reflowable as it contains several visual essays where the authors have specific requirements around layout – my preference would have been for it to be web-based or in a native app, but that isn't my call ).

It was produced in InDesign and is generally working well. I ended up finding Calibre as I needed a way to resize a heap of pngs that InDesign generated for visual elements like text underlines and overrules – these were causing a problem with vendor platforms as though they are tiny in kb terms, the dimensions of some of them exceeded 4 million pixels. What a headache.

Anyway I worked through that, and now have a single error:

ERROR ITMS-9000: Invalid prefix attribute in root (package) element of the OPF file. Please supply a prefix attribute with valid rendition value in root <package> element of the OPF file

I found the OPF file in 'edit file' and the package bit reads:

<package xmlns="http://www.idpf.org/2007/opf" version="3.0" unique-identifier="bookid" prefix="ibooks: http://vocabulary.itunes.apple.com/r...xtensions-1.0/ calibre: https://calibre-ebook.com">

I tried to swap this out for content from an OPF file where this error was not occurring (but the image issue persisted), and saving it:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<package version="3.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="bookid" prefix="rendition: http://www.idpf.org/vocab/rendition/# ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/">

But when I reopen the editor, it looks like Calibre strips that out and reverts it to the original.

Any suggestions about what's wrong with that package element? (I have no idea what a prefix attribute is or what is should look like!) And how can I maintain the changes that Calibre seems to want to remove?

Any advice appreciated, especially if it's basic enough for my non-expert skills!

jo_by is offline   Reply With Quote