View Single Post
Old 12-30-2008, 05:02 PM   #7
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,188
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by ShellShock View Post
lrf2lrs creates an LRS file, which is in xml format--that is, you can edit it using a text editor. If you are reasonably confident with xml it is possible to manually edit the xml to change margins and font sizes. You can then use lrs2lrf to convert your edited LRS file back to LRF.

There a number of tools like lrftools which do something similar automatically. They tend to use lrf2lrs and lrs2lrf under the covers. Because they did not do exactly what I wanted I ended up programming my own--this is just a question of writing some code to tweak the xml before calling lrs2lrf to convert back to an LRF.

One thing to note--lrs2lrf is not perfect. The resulting LRF is not exactly the same as the original LRF, even if you do not make any changes to the intermediate LRS file. For example, any page headers are lost by lrs2lrf.
thanks for the warning about page headers. I'm beginning to think it'll just be easier to re-create the LRF file with the PRC copy I have. Except I can't get the PRC file to open in Book Designer in order to fix things (like removing the crap cover they inserted) And when I try converting in Calibre I end up with both covers. Except one is super tiny for some reason.
Amalthia is offline   Reply With Quote