Changes in this Release- Removing Adobe XPGT margins also removes css margins on body and page selectors
Well here goes. For now I just included this as an additional function tied to the Adobe xpgt checkbox, partially because I don't like messing with gui's so much, and partially because one checkbox to remove all the junk margins makes a bit more sense to me. Your call if you want to change it.
Note this only removes margins - replacing with a user configurable margin isn't quite so easy, so I'm just going to leave that alone for now. I've just tested on a handful of epubs, so use at your own risk.
btw, if you want to add a check for this to quality check, the regex to run against css is:
Code:
re.compile(r'(?P<element_id>#\w+\s+)?(?P<selector>\bbody|@page)\b\s*{(?P<styles>[^}]+margin[^}]+);?\s*\}', re.IGNORECASE)