Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What objects in the context are not affected by flattening (Notability)? #729

Closed
jbeuckm opened this issue Jan 2, 2021 · 2 comments
Closed

Comments

@jbeuckm
Copy link
Contributor

jbeuckm commented Jan 2, 2021

I need to write a string to the PDF (not visible or metadata) that can be read back later after the PDF is edited with Notability. I tried to embed an image with the data but after the user edits in Notability, the embedded images are gone - I assume because of flattening.

What kind of object could be written to the context that will stay the same after editing/flattening in Notability?

@Hopding
Copy link
Owner

Hopding commented Jan 2, 2021

Looks like you identified hidden fields as a solution in #730, so I'll go ahead and close this for now.

Note also that in addition to adding a field to a page and then hiding it, it should also be possible to simply create a field and set its value without ever adding it to a page in the first place.

@Hopding Hopding closed this as completed Jan 2, 2021
@Hopding
Copy link
Owner

Hopding commented Jan 2, 2021

Actually, I'm not sure if hidden fields will necessarily be excluded from a flattening operation, so that may not address this issue. Looks like you've already come across #593 (comment). You could register whatever kind of object you want in the document by using pdfDoc.context.register(...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants