Skip to content

How to rebuild a page instance and put it back to the pdf with the results of page.get_text("json")? #1461

Answered by JorjMcKie
lidh15 asked this question in Q&A
Discussion options

You must be logged in to vote

Don't take the JSON string, take the "dict" format instead. JSON is derived from it.

You cannot write back to the same page - instead make a new page in a new PDF and write (a subset of) the contents of the dictioanry to it.
There is an example set of scripts for font replacement, where you can probably learn a lot from.

Replies: 3 comments 13 replies

Comment options

You must be logged in to vote
1 reply
@lidh15
Comment options

Answer selected by lidh15
Comment options

You must be logged in to vote
12 replies
@JorjMcKie
Comment options

@lidh15
Comment options

@JorjMcKie
Comment options

@lidh15
Comment options

@JorjMcKie
Comment options

Comment options

You must be logged in to vote
0 replies
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
Converted from issue

This discussion was converted from issue #1459 on December 15, 2021 17:39.