You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Where can I adjust width and height value to „device width” and „device height” for an e-book created in Pages?

I'm having difficulty in submitting an e-book from Pages to Apple Books. I receive an error message for every single page of the book that reads: Viewport "width" value must be a positive number or the keyword "device-width"

Does anyone know where to adjust it? Apple Books Support couldn't help unfortunately. Thanks in advance, Tamas

MacBook Pro 13″, macOS 14.5

Posted on Aug 22, 2024 12:56 AM

Reply
8 replies

Aug 22, 2024 10:23 AM in response to cservenyak

I just generated a one-page EPUB from Pages as a fixed layout document. I opened it in Sigil 2.3.0 and the first page shows the following information which now reveals the viewport data for a Letter sized document:



Just the kind of content that gives writers migraines… 🧐 By your admission, this is not for you as you don't know HTML/CSS3 coding.



Aug 22, 2024 9:09 AM in response to VikingOSX

Thank you for responding. I am not surprised that you have seen no examples of this issue. I also made several searches with these keywords and found nothing...


Actually, I published 5 ebooks earlier from iBooks Author with no problems submitting content. A few years ago the process was changed and now e-books can be produced and uploaded directly from Pages.


Yes, it is a fixed layout book. I have seen some solutions just as the one you linked in "Changing the size of an epub book", but not being an IT guy, I have no idea how to access that xml document where I could change the value to "device width".


Thanks, Tamas

Aug 22, 2024 10:58 AM in response to cservenyak

Sigil is available for Intel and Apple Silicon Macs. You double-click the downloaded txz image and just double-click it in the Finder to reveal the Sigil executable that you then drag into the Finder Window's application sidebar.


Right-click on that Sigil application and a dialog will tell you macOS cannot verify it. Don't delete it. Visit System Settings > Privacy & Security panel and in the Security section, there will be a challenge to open Sigil anyway. Do so. Now, when you launch Sigil and choose Open… you can open that EPUB document. Sigil will observe that the EPUB isn't exactly standard and will automatically apply fixes.


I cannot provide Sigil usage instructions as that is in the Sigil User Guide.

Aug 22, 2024 8:40 AM in response to cservenyak

I don't have an answer for you. I have no experience with the ebook submission process to Apple. I believe yours is the first post I have seen over the years with this issue, at least posted in the Pages community or at this low-level request in the Apple Books for Authors community.


Is this a fixed layout book? If so, perhaps Changing the size of an ePub Book, or Fixed Layout ePub may help with the custom sizing. That is where Sigil (next paragraph) would come in handy.


I exported an EPUB from Pages v14.1 on Sonoma 14.6.1 and inspected the EPUB internals using Sigil. I found no instance of Viewport width or device-width wording anywhere in the EPUB. I have no explanation as to why the submission process is producing per-page errors.

Aug 22, 2024 10:40 AM in response to VikingOSX

Thanks for investigating this further!


Looks scary! :-D


However, I can see the thing we are looking for in your screenshot. If I can't find the solution within Pages (from where I can directly submit the book), than I can try going forward on this path (using Sigil, and than check out how to upload an epub file to Apple Books in another way).


Thanks again,


Tamas

Aug 24, 2024 3:38 AM in response to cservenyak

Just to close the loop, here is what the final result has been. My colleague changed the value on each page as it was in the error message, he used Calibre instead of Sibil as he already had that app. These changes resulted in the epub document loosing the bottom quarter of the page, so there must have been some other problems as well with that old template.


Therefore I decided to stop trying, opened a new document with the flexible layout, and have rebuilt the e-book from scratch. Then Apple Books accepted the submission without any error message. Currently under review.


End of story (I hope). ;-)

Where can I adjust width and height value to „device width” and „device height” for an e-book created in Pages?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.