Is there an XSLT floating around anywhere that converts Apple Pages documents to decent HTML?

StackOverflow https://stackoverflow.com/questions/10343064

  •  03-06-2021
  •  | 
  •  

Apple’s word processor/DTP app Pages saves its files as zipped folders, containing an XML file with the content inside, and attachments (e.g. images) saved as files.

I’m looking to convert this content into decent HTML: <p>s for things that look like paragraphs, tables translated into HTML tables, images and links maintained.

I don’t need to copy over styles from the Pages document.

Is there an XSLT floating around the internet anywhere that does this? A chap called Davin Granroth wrote one that’s a good starting point for getting the text out, but it doesn’t handle images, tables or links.

I quite fancy having a go myself, but it seems like someone would have written this already.

有帮助吗?

解决方案

If this is not for some kind of automated, server-side processing, you may want to try the export functions of Pages itself.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top