View Single Post
Old 08-27-2023, 11:04 PM   #588
willemml
Junior Member
willemml is an accomplished Snipe hunter.willemml is an accomplished Snipe hunter.willemml is an accomplished Snipe hunter.willemml is an accomplished Snipe hunter.willemml is an accomplished Snipe hunter.willemml is an accomplished Snipe hunter.willemml is an accomplished Snipe hunter.willemml is an accomplished Snipe hunter.willemml is an accomplished Snipe hunter.willemml is an accomplished Snipe hunter.willemml is an accomplished Snipe hunter.
 
Posts: 7
Karma: 123456
Join Date: Aug 2023
Location: BC, Canada
Device: Kindle Scribe
Quote:
Originally Posted by jhowell View Post
Type 1 is text, type 2 is an image. For a print replica KFX there is a single image associated with each PDF page. There may also be type 1 entries if the source PDF had a text layer that was included in the KFX version of the book.
Great thanks, that's good to know.

Quote:
Originally Posted by jhowell View Post
As far as I can tell the included PDF is essentially the same as the original PDF, at least in terms of its page dimensions. The four margins for cropping are instead expressed as KFX metadata associated with each PDF page image resource.

That cropping data is currently not handled by the KFX Input plugin. Something will need to be done about that.

Each XHTML page of the EPUB converted from the annotation notebook has an embedded SVG image that references the external SVG image containing the stroke data. If the aspect ratio of the annotation does not match the PDF then the style associated with the embedded SVG will have the height, width, top, and left properties needed to adjust it to match the associated PDF page aspect ratio.
That simplifies things for me in the end I think, the cropping metadata should give me enough to achieve a correct overlap and lets me keep the original PDF sizing (this is desirable as I would be sending PDFs to my Kindle and then taking them back and uploading them somewhere in an annotated form.) And really helpful that the SVG style includes the adjustment properties.

Quote:
Originally Posted by jhowell View Post
I am curious to see what you come up with.
I will be posting very soon, I have a mostly working serializer for KRDS files (I know this might sound pointless, and I know there is already a Python deserializer) but I want to have something that can go both ways and in a strongly typed and compiled language (Rust in this case). I am also using this as a sort of warm up project to serializing and deserializing KDF, KPF and KFX files. I also have hopes that I might be able to create annotations on my computer and send them to the kindle in a way that it can recognize them (rather than just hardcoding them into a PDF or book.)
willemml is offline   Reply With Quote