Skip to content

signatures: add docs for preserveOriginalStructure#313

Merged
haysch merged 1 commit intomasterfrom
signatures/preserveOriginalStructure
Apr 10, 2026
Merged

signatures: add docs for preserveOriginalStructure#313
haysch merged 1 commit intomasterfrom
signatures/preserveOriginalStructure

Conversation

@haysch
Copy link
Copy Markdown
Contributor

@haysch haysch commented Apr 10, 2026

Document the use case for the new preserveOriginalStructure flag.

@haysch haysch requested review from mickhansen and nmoskaleva April 10, 2026 11:16
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 10, 2026

Deploy Preview for criipto-docs ready!

Name Link
🔨 Latest commit 5fdc9f2
🔍 Latest deploy log https://app.netlify.com/projects/criipto-docs/deploys/69d8f121992707000882a421
😎 Deploy Preview https://deploy-preview-313--criipto-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mickhansen
Copy link
Copy Markdown
Collaborator

@mickhansen
Copy link
Copy Markdown
Collaborator

Ah, we add the flag on the DocumentInput level: https://deploy-preview-313--criipto-docs.netlify.app/signatures/graphql/schema/#DocumentInput

I guess technically a mistake since some of these flags only apply to PDF documents.

@haysch
Copy link
Copy Markdown
Contributor Author

haysch commented Apr 10, 2026

Ah, we add the flag on the DocumentInput level: https://deploy-preview-313--criipto-docs.netlify.app/signatures/graphql/schema/#DocumentInput

I guess technically a mistake since some of these flags only apply to PDF documents.

Initially I assumed it might apply to other formats as well, but that sounds it was naively.

There is still time to amend this - no one is using the flag, but it requires a new deployment.

@mickhansen
Copy link
Copy Markdown
Collaborator

There is still time to amend this - no one is using the flag, but it requires a new deployment.

@haysch Might be more prudent? What do you think?

@haysch
Copy link
Copy Markdown
Contributor Author

haysch commented Apr 10, 2026

There is still time to amend this - no one is using the flag, but it requires a new deployment.

@haysch Might be more prudent? What do you think?

Agree. Just remembered that the SDK was already published, so those need to be removed as well - so not sure if the "cost" is worth the work?
We could live with it as-is, amend in v2 and have it no-op (with proper documentation) if XML signing joins the fray?

@mickhansen
Copy link
Copy Markdown
Collaborator

Agree. Just remembered that the SDK was already published, so those need to be removed as well - so not sure if the "cost" is worth the work?
We could live with it as-is, amend in v2 and have it no-op (with proper documentation) if XML signing joins the fray?

@haysch Yeah... let's go with as-is

Copy link
Copy Markdown
Collaborator

@nmoskaleva nmoskaleva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, some suggestions for text.

Comment thread src/pages/changelog/2026-04-10.mdx Outdated

## Preserve Original Structure for PDFs in Signatures

Previously we attempted to recreate documents to fix errors before signing to avoid breaking signatures -or- if features, such as document ID watermarking or custom seal page template was required.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:

Previously, we attempted to recreate documents to fix errors before signing and avoid breaking signatures, or when features like document ID watermarking or a custom seal page template were required.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/pages/changelog/2026-04-10.mdx Outdated

Previously we attempted to recreate documents to fix errors before signing to avoid breaking signatures -or- if features, such as document ID watermarking or custom seal page template was required.

However, in some scenarios the original document structure might have to be preserved, e.g., when the signing process aren't allowed to change the document or the document have been certified by third party beforehand, which would break if we were to recreate it.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:

However, in some scenarios, the original document structure must be preserved. For example, if the signing process isn't allowed to change the document, or if the document has already been certified by a third party, recreating it would invalidate the certification.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


### Preserve original document structure

By default, we attempt to fix any problems with the uploaded document before signing to avoid situations where the signatures would break -or- if features, such as document ID watermark, custom seal page template or removal of existing signatures, are used.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same suggestions as in changelog.

/** (BETA feature) When enabled, will allow any existing signatures to remain on the document. This disables recreation of the PDF document, which disables a number of features such as automatic seal placement, document id watermarking and custom seals area. */
keepPreviousSignatures?: InputMaybe<Scalars['Boolean']['input']>;
pdf?: InputMaybe<PadesDocumentInput>;
/** (BETA feature) When enabled, preserves the original document structure. Automatically enables `keepPreviousSignatures`. This will disables features that requires recreating, such as, document watermarking and automatic seal placement. */
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will disables => disables or will disable

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

such as, document watermarking and automatic seal placement => such as document watermarking and automatic seal placement. (no comma)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will keep in mind - this is generated from our API schema, so will have to change the codebase for it to be picked up 😄

Document the use case for the new `preserveOriginalStructure` flag.
@haysch haysch force-pushed the signatures/preserveOriginalStructure branch from 824fb12 to 5fdc9f2 Compare April 10, 2026 12:46
@nmoskaleva nmoskaleva self-requested a review April 10, 2026 12:58
@haysch haysch merged commit 0b002ff into master Apr 10, 2026
5 checks passed
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

Successfully merging this pull request may close these issues.

3 participants