Forum How do I...?

Extracting styles from a PDF

pelagic
I have a PDF produced with Prince 7.1 from an XHTML source.
Is it possible to extract the styles embedded in the source file from the PDF?

Thanks in advance!
mikeday
Not really. What is it you want to achieve?
pelagic
Hi Mike,

I created a PDF with Prince 7.1 from an XHTML source, which I accidentally lost... I am trying to recover the styles (CSS) from the source document (a book) and before I start again from scratch I was wondering if (as I have the PDF) I could in some way extract the styles from it?

Thanks.
mikeday
Oh I see. Unfortunately, HTML to PDF conversion is not a reversible process. :(

You might be able to use Acrobat (or Acrobat Pro?) to check the font family and size, colors, and so forth. But this wouldn't help with overall layout and page headers/footers, and the CSS would still need to be rewritten from scratch I'm afraid.

(I would suggest using DropBox, GitHub, or some other cloud storage solution for future development projects; it can be a massive time saver when local files are erased by accident).