Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 03-07-2025, 05:25 PM   #1
piovac
Member
piovac began at the beginning.
 
piovac's Avatar
 
Posts: 16
Karma: 10
Join Date: Jan 2014
Device: iPad Pro, Onyx Note 3, Kindle Paperwhite, MacBook Pro, Pixel 7 Pro
Center-aligned figures in EPUB to PDF conversion

Does anyone knows a simple easy way to align figures in center of the pages in EPUB to PDF conversion?

By default mine are left-aligned in the PDF even if they are centered in the EPUB...
piovac is offline   Reply With Quote
Old 03-08-2025, 04:29 AM   #2
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,637
Karma: 103503445
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Export to docx. Edit / style in LO Writer or MS Word. Export to PDF.
Quoth is offline   Reply With Quote
Advert
Old 03-08-2025, 07:11 AM   #3
rjwse@aol.com
Addict
rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.
 
rjwse@aol.com's Avatar
 
Posts: 312
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
center an image

I work exclusively in calibre's editor to make the epub for upload to Amazon. I convert the EPUB via calibre to PDF for upload to Amazon for printed books. There are several ways in CSS to center an image. Here are six print-screens showing how to alter by adding style="display: flex; float: none; margin: auto;" to center an image. There are umpteen other ways of doing this. Best regards, Pop
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2025-03-08 05-52-14.png
Views:	52
Size:	593.5 KB
ID:	214202   Click image for larger version

Name:	Screenshot from 2025-03-08 05-53-18.png
Views:	45
Size:	227.5 KB
ID:	214203   Click image for larger version

Name:	Screenshot from 2025-03-08 05-53-56.png
Views:	49
Size:	465.2 KB
ID:	214204   Click image for larger version

Name:	Screenshot from 2025-03-08 05-56-10.png
Views:	44
Size:	743.3 KB
ID:	214205   Click image for larger version

Name:	Screenshot from 2025-03-08 05-56-20.png
Views:	44
Size:	246.9 KB
ID:	214206   Click image for larger version

Name:	Screenshot from 2025-03-08 05-56-36.png
Views:	47
Size:	492.3 KB
ID:	214207  
rjwse@aol.com is offline   Reply With Quote
Old 03-13-2025, 09:42 AM   #4
piovac
Member
piovac began at the beginning.
 
piovac's Avatar
 
Posts: 16
Karma: 10
Join Date: Jan 2014
Device: iPad Pro, Onyx Note 3, Kindle Paperwhite, MacBook Pro, Pixel 7 Pro
Question

Unfortunately the problem is more subtle than that. The images are correctly centered in the EPUB and the DOCX translation, but not in the PDF. The CSS is correctly configured to center the images. Here is an example:

Here is how the images are included in the EPUB:

Code:
<div class="illustype_image_text"><div class="image_text" style="width:65%"><img src="images/e9780486153353_i0004.jpg" alt="e9780486153353_i0004.jpg"/></div>
And here is the definition of "illustype_image_text" in the CSS:

Code:
.illustype_image, .illustype_image_net, .illustype_image_tab, .illustype_image_text, .illustype_image_text_net, .illustype_image_math, .illustype_image_deco, .illustype_image_deco_net, .image_orig_tab, .illustype_image_externe, .image_sep_para {
		text-align: center;
		margin-top: 1.5em;
		margin-bottom: 1.5em;
		page-break-inside: avoid;
	}
piovac is offline   Reply With Quote
Old 03-13-2025, 12:37 PM   #5
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,637
Karma: 103503445
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
If you have docx, and want PDF, don't bother with epub, Export direct from LO Writer.
Quoth is offline   Reply With Quote
Advert
Reply

Tags
convert epub to pdf, figures=, layout


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Highlighting not aligned with text after pdf conversion degroove Calibre 1 02-02-2025 09:59 AM
How to force old-style figures ("text figures") in conversion to kepub? Liudprand Conversion 10 08-22-2022 10:29 AM
PDF to PDF conversion causes all the text to be aligned to the left Swifty4635 Conversion 1 01-16-2022 10:17 PM
Left aligned conversion shamus888 Conversion 1 12-25-2012 03:53 PM
Text becomes center-aligned when converting Alfy Calibre 12 01-19-2009 12:41 AM


All times are GMT -4. The time now is 09:26 AM.


MobileRead.com is a privately owned, operated and funded community.