Skip to content

feat: per-document signature position picker#19

Closed
mborchuk wants to merge 1 commit into
mainfrom
feat/document-sign-position
Closed

feat: per-document signature position picker#19
mborchuk wants to merge 1 commit into
mainfrom
feat/document-sign-position

Conversation

@mborchuk
Copy link
Copy Markdown
Owner

Visual signature on documents now opens a position picker page instead of signing with the global position. Choose page number and position (6 presets with visual guide). Digital signatures still apply directly.

When signing a document PDF with visual signature, instead of using
the global position from Settings, user now sees a position picker page:
- Choose page (first, last, or specific page number)
- Choose position (6 presets with visual preview)
- Visual guide shows where signature will be placed

Changes:
- pdf_signature: _apply_visual_signature accepts position/page_num overrides
- pdf_signature: new routes sign_file_picker (GET) and sign_file_apply (POST)
- pdf_signature: visual capability has has_position=True flag
- document_view: visual sign button links to picker instead of direct POST
- Digital signatures still use direct POST (no position needed)
signers = module.core.module_manager.find_capabilities('pdf_sign')
if cap_index < 0 or cap_index >= len(signers):
flash('Signing method not available.', 'danger')
return redirect(back_url)
).fetchone()
if not row:
flash('File not found.', 'danger')
return redirect(back_url)
result = module.core.storage.get(file_path)
if not result:
flash('File not found in storage.', 'danger')
return redirect(back_url)
module.logger.error('Sign file error: %s', e)
flash('Signing failed. Check server logs.', 'danger')

return redirect(back_url)
try:
reader = _PdfReader(io.BytesIO(result[0]))
page_count = len(reader.pages)
except Exception:
@mborchuk mborchuk closed this Apr 26, 2026
@mborchuk mborchuk deleted the feat/document-sign-position branch April 26, 2026 18:50
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.

2 participants