Skip to content

Is there a way to save all/a single freetext bookmark to PNG? #1249

Answered by ahrm
zetashift asked this question in Q&A
Discussion options

You must be logged in to vote

This was not possible before, but I added some new javascript api commands which makes it possible now. You can do something like this:

screenshot.js:

let annots = sioyek_api.get_json_annotations();
let state = sioyek_api.get_json_state();
let checksum = state["document_checksum"]; // this is only used to differentiate the file names of different documents
let screenshots_path = "e:/sioyek_screenshots/"

var index = 0;
for (let bookmark of annots["bookmarks"]){
    index++;

    if (bookmark["description"].startswith("#r")){
        let bookmark_abs_rect = {
            "x0": bookmark["begin_x"],
            "x1": bookmark["end_x"],
            "y0": bookmark["begin_y"],
            "y1":…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@zetashift
Comment options

@ahrm
Comment options

ahrm Dec 4, 2024
Maintainer

Answer selected by zetashift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants