Pages Text position moves in EPUB export

I have a large photo album Pages document with text captions and other text "boxes." The positioning of nearly all those text boxes drops down a bit from their original positions. This is not merely annoying, but each of the source items have to be artificially moved to compensate for this. That would be a huge task taking many weeks. I have attached an example of a before and after exporting to EPUB. Comparing the original and the EPUB page, you can see that the text has moved downward from its original position. Hope that someone knows a fix or what I'm doing wrong. See attached image.

MacBook Pro 16″, macOS 10.15

Posted on Sep 27, 2023 3:21 PM

Reply
5 replies

Sep 27, 2023 4:10 PM in response to thetasig

Did you embed the fonts in question into the EPUB? For documents with a quantity of images and text, you should be using the Fixed layout EPUB choice.


The following in Pages v13.2 on macOS 14.0 is done in Times New Roman Regular at 14 pt. I am using 3% character spacing. Text inset is 4 pt. I selected the Text box and in the Arrange panel, set Text Wrap to None. You should have done this with all Text boxes and images to keep them statically located in your document, unless you wanted text to flow around them.



The following is the above content exported to EPUB and viewed in Apple Books with No book cover, Fixed layout, and embedded fonts:



I see no difference in these two images using the settings I mentioned.

Sep 28, 2023 7:15 AM in response to VikingOSX

I will try your suggestions later on today. I did embed the fonts for the export. I did use the fixed layout (landscape) to start the project and fixed layout was how it was exported. I did not manually set the Text Wrap to none for any objects. However, I have sometimes moved the text to the "Front" so that it does not seem to interact with the nearby objects such as photos that are moved "Back" and not in "Front"


However, I do see differences between your two images. If you look closely, critically, the text in the bottom image is closer to the bottom edge of the box. I suppose, then, the inset seems to be visibly less on the bottom edge by a point or two.


I have some experimenting to do.


Many thanks for your advice.

Sep 28, 2023 8:10 AM in response to thetasig

If you want the text in that Text box centered top to bottom, then you should set the line height to exactly the same point height as the font size, and then center the selected content using the following setting:




Then, you are at the mercy of how well Pages generates the CSS3 styling in that resulting EPUB for that text box content.

Sep 28, 2023 11:25 AM in response to VikingOSX

Thanks a lot for your insight and help, Viking. Experimentally, I was able to verify that the CSS3 styling for all of my text items is "off" by a small amount. I was able to go through my document and make suitable "adjustments" to compensate for that. In my case, I (mostly) moved text boxes upward by 3 "up arrows" (about 1 one-hundredth of an inch each), and expand the bottom edge of visible boxes ("height", where text is aligned to the top) by about .09 (producing centered text within the box). The results are acceptable and did not take that much effort once I had done the measurements - I just applied those standards across the entire document. There will be some tweaks as I go through to proof the final version.


It does beg the question of who owns the CSS3 styling and do they ever make changes/updates to the code?


Cheers, mate!

Sep 28, 2023 12:37 PM in response to thetasig

When Pages exports to an EPUB, it translates your Pages document contents into HTML/CSS3 within the EPUB container. All EPUBs are really HTML/CSS3 internally. Sometimes, I use the free Sigil utility to open an EPUB and make technical changes to the CSS3 styling, but this is an acquired taste and skill — not the place to learn CSS3.


I only work on a copy of the original EPUB.


Pages is not InDesign, Quark, or Affinity Designer, so you won't have the same object or text placement granularity and professional features that those applications bring to the table. And because Pages uses its own EPUB translation engine, you are excluded from controlling what it does during the translation.

Pages Text position moves in EPUB export

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