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 06-23-2025, 04:29 PM   #1
JollyRachele
Junior Member
JollyRachele began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2025
Device: None
Multiple XML into 1 PDF?

Hello, I've been trying host of tools to achieve this but have always failed, although something tells me ebook-convert may have the key - although I'm not quite sure how to formulate the command

Here are the XML files I want to convert: https://github.com/PerseusDL/lexica

As far as I understand ebook-convert doesn't actually support XML, but for me rendering it as HTML is more than enough (in fact opening it in Firefox displays everything properly, all I need to do is 'stitch' the files together into one PDF file.

Any suggestions for this particular case? (Here, after "gh repo clone https://github.com/PerseusDL/lexica", I navigated to the folders containing the XML files and tried appending a '.html' extension before passing all of the files at the same time as an argument with the command 'ebook-convert "*.html" .pdf', but ebook-convert wasn't able to parse them like Firefox did...

JollyRachele is offline   Reply With Quote
Old 06-23-2025, 11:07 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,318
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://manual.calibre-ebook.com/faq...specific-order
kovidgoyal is offline   Reply With Quote
Advert
Old 06-24-2025, 01:38 AM   #3
JollyRachele
Junior Member
JollyRachele began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2025
Device: None
Ok, perfect, I've got this far for now:

Code:
bash-5.2$ ls
README.md                   grc.lsj.perseus-eng22.html
grc.lsj.perseus-eng1.html   grc.lsj.perseus-eng23.html
grc.lsj.perseus-eng10.html  grc.lsj.perseus-eng24.html
grc.lsj.perseus-eng11.html  grc.lsj.perseus-eng25.html
grc.lsj.perseus-eng12.html  grc.lsj.perseus-eng26.html
grc.lsj.perseus-eng13.html  grc.lsj.perseus-eng27.html
grc.lsj.perseus-eng14.html  grc.lsj.perseus-eng3.html
grc.lsj.perseus-eng15.html  grc.lsj.perseus-eng4.html
grc.lsj.perseus-eng16.html  grc.lsj.perseus-eng5.html
grc.lsj.perseus-eng17.html  grc.lsj.perseus-eng6.html
grc.lsj.perseus-eng18.html  grc.lsj.perseus-eng7.html
grc.lsj.perseus-eng19.html  grc.lsj.perseus-eng8.html
grc.lsj.perseus-eng2.html   grc.lsj.perseus-eng9.html
grc.lsj.perseus-eng20.html  test.html
grc.lsj.perseus-eng21.html
bash-5.2$ cat test.html

<html>
   <body>
     <h1>Table of Contents</h1>
     <p style="text-indent:0pt">
        <a href="grc.lsj.perseus-eng1.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng2.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng3.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng4.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng5.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng6.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng7.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng8.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng9.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng10.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng11.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng12.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng13.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng14.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng15.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng16.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng17.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng18.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng19.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng20.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng21.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng22.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng23.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng24.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng25.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng26.html">First File</a><br/>
        <a href="grc.lsj.perseus-eng27.html">First File</a><br/>
     </p>
   </body>
</html>
Before trying to import in Calibre, I checked if it rendered in a browser, and whilw "test.html" did, it wasn't able to load the other files, not even if I clicked on them: do I have a problem with my formatting by any chance?
JollyRachele is offline   Reply With Quote
Old 06-24-2025, 01:42 AM   #4
JollyRachele
Junior Member
JollyRachele began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2025
Device: None
This is the error message my browser would give when trying to open one of the files:

Your file couldn’t be accessed

It may have been moved, edited, or deleted.
ERR_FILE_NOT_FOUND
JollyRachele is offline   Reply With Quote
Old 06-24-2025, 02:12 AM   #5
JollyRachele
Junior Member
JollyRachele began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2025
Device: None
Here's one last issue I was having with the files (once these two problems are sorted I'll be able to successfully render in PDF )

If I take this file for instance, which is supposed to show Greek characters, it's instead just displaying plain UTF-8. I wonder if I can somehow tell Calibre to display it like it says to do inside (what was originally) the XML file...

Here is an example file to illustrate what I mean: https://raw.githubusercontent.com/Pe...rseus-eng1.xml
JollyRachele is offline   Reply With Quote
Advert
Old 06-24-2025, 02:17 AM   #6
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 45,946
Karma: 168961900
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
For what it may be worth, UTF-8 includes the Hellenic character set.
DNSB is offline   Reply With Quote
Reply

Tags
batch, html, pdf, render, xml


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change wrong xml:lang in multiple files? LucyOne Conversion 17 07-29-2021 06:14 AM
xml:lang empty (pdf to epub) fxp33 Conversion 3 05-07-2015 11:40 PM
PDF to XML Conversion of Business Documents citizen994 Other formats 3 11-17-2013 11:46 PM
PDF Conversion to XML citizen994 Other formats 1 02-03-2012 12:46 AM
How to convert PDF to XML? Ambar Other formats 3 01-12-2012 12:48 PM


All times are GMT -4. The time now is 10:56 PM.


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