Lankir Logo

Getting Started

  • Installation
    • System Requirements
      • Optional Dependencies
    • Installation Methods
      • Package Manager (Recommended)
        • Debian/Ubuntu
        • Fedora/RHEL/AlmaLinux
      • Manual Package Installation
      • AppImage (Universal)
      • Building from Source
    • Verifying Installation
    • Hardware Token Setup
      • Smart Card Reader
      • PKCS#11 Modules
    • Next Steps
  • Quick Start
    • Launching the Application
      • GUI Mode
      • CLI Mode
    • Opening a PDF
      • Via GUI
      • Via CLI
      • Via Drag & Drop
    • Navigating Documents
      • Keyboard Shortcuts
      • Sidebar
    • Signing Your First PDF
      • Prerequisites
      • Quick Sign (GUI)
      • Verify Signature
    • Viewing Certificate Information
    • Configuration
      • Common Settings
    • Next Steps
  • Configuration
    • Configuration Files
    • Settings Reference
      • Appearance
      • Viewer
      • Files
      • Certificates
        • Certificate Stores
        • Token Libraries
      • Advanced
    • Viewing Configuration
    • Resetting Configuration
    • Environment Variables
    • Configuration Locations
    • Next Steps

User Guide

  • Viewing PDFs
    • Opening Documents
      • From the GUI
      • From the CLI
    • Navigation
      • Page Navigation
      • Scrolling
    • Zoom Controls
      • Keyboard Shortcuts
      • Mouse Zoom
      • Zoom Levels
    • View Modes
      • Scroll Mode (Default)
      • Single Page Mode
    • Sidebar
      • Left Sidebar (Thumbnails)
      • Recent Files
    • Document Information
      • GUI
      • CLI
    • Page Information
    • Rendering Pages
    • Annotations
    • Performance Tips
      • Large Documents
      • Slow Rendering
    • Keyboard Reference
    • Next Steps
  • Digital Signatures
    • Certificate Sources
    • Signing a PDF
      • GUI Method
      • CLI Method
    • Invisible vs Visible Signatures
      • Invisible Signatures
      • Visible Signatures
    • Using Hardware Tokens
      • Smart Cards
      • USB Tokens
    • Certificate Selection
      • By Fingerprint (Recommended)
      • By Name
      • By File Path
    • Batch Signing
    • Signature Profiles
    • Signing Workflow Tips
      • Single Signer
      • Multiple Signers
      • Timestamps
    • Troubleshooting
      • “Certificate not found”
      • “Invalid PIN”
      • “Certificate cannot sign”
      • “Signing failed”
    • Next Steps
  • Certificate Management
    • Certificate Sources
      • PKCS#12 Files (.p12, .pfx)
      • PKCS#11 (Hardware Tokens)
      • NSS Database (Firefox/Chrome)
    • Listing Certificates
      • All Certificates
      • Filtered Lists
      • Show All Details
    • Certificate Properties
    • Certificate Requirements
    • PKCS#12 Certificate Files
      • Creating a Self-Signed Certificate
      • Importing Certificates
    • Hardware Token Setup
      • Smart Card Readers
      • Common PKCS#11 Modules
      • Testing PKCS#11 Access
    • Browser Certificate Import
      • From Firefox
      • From Chrome
    • Troubleshooting
      • Certificate Not Showing
      • “Certificate cannot sign”
      • Wrong Password
      • Certificate Expired
    • Security Best Practices
    • Next Steps
  • Signature Profiles
    • Overview
    • Built-in Profiles
      • Invisible Signature
      • Visible Signature
    • Listing Profiles
    • Using Profiles
      • In GUI
      • In CLI
    • Profile Settings
      • Visibility Options
      • Position Settings
      • Appearance Settings
    • Profile Storage
    • Profile JSON Structure
    • Creating Custom Profiles
      • Via GUI
      • Via File
    • Position Examples
      • Bottom-Right Corner (Last Page)
      • Top-Right Corner (First Page)
      • Centered (Specific Page)
    • Logo Requirements
      • Converting Logo to Base64
      • Logo Positioning
    • Best Practices
      • Consistent Positioning
      • Readable Signatures
      • Logo Usage
    • Troubleshooting
      • Profile Not Appearing
      • Invalid Profile
      • Signature Cut Off
    • Next Steps
  • Signature Verification
    • Verification Overview
    • Verifying Signatures
      • Via GUI
      • Via CLI
      • Verification Output
    • Verification Status
      • Signature Status
      • Certificate Status
    • Understanding Results
      • Valid Signature
      • Valid but Untrusted
      • Invalid Signature
    • Signature Details
      • Signer Information
      • Timing
      • Cryptographic Details
      • Signature Metadata
    • Multiple Signatures
    • Verification in Scripts
      • Check if Document is Signed
      • Parse JSON Output
      • Batch Verification
    • Trust Store
      • Self-Signed Certificates
    • Common Scenarios
      • “Signature valid, certificate expired”
      • “Document modified after signing”
      • “Certificate revoked”
    • Limitations
    • Next Steps

Command Line

  • CLI Overview
    • Basic Usage
    • Global Options
    • Command Groups
    • Quick Examples
    • Getting Help
    • Exit Codes
    • Output Formats
      • Human-Readable (Default)
      • JSON
    • Verbose Mode
    • Piping and Scripting
      • Combining with Other Tools
      • Error Handling
    • Environment Variables
    • Next Steps
  • PDF Commands
    • pdf info
      • Options
      • Examples
      • JSON Output
    • pdf pages
      • Options
      • Examples
      • JSON Output
    • pdf render
      • Options
      • Examples
      • DPI Guidelines
    • pdf thumbnail
      • Options
      • Examples
    • Scripting Examples
      • Generate Thumbnails for All Pages
      • Batch PDF Info Report
      • Find Large PDFs
      • Render All Pages to Images
    • Error Handling
      • File Not Found
      • Invalid PDF
      • Page Out of Range
    • Next Steps
  • Certificate Commands
    • cert list
      • Options
      • Examples
      • JSON Output
    • cert search
      • Options
      • Examples
    • Certificate Properties
      • Understanding Certificate Fields
      • Certificate Sources
      • Key Usage
    • Scripting Examples
      • Find Signing Certificates
      • Check Certificate Expiry
      • Export Certificate Info
      • Find Certificate by Fingerprint
      • Check Hardware Token
    • Troubleshooting
      • No Certificates Found
      • PKCS#11 Token Not Detected
      • Certificate Shows “Cannot Sign”
    • Next Steps
  • Sign Commands
    • sign pdf
      • Certificate Selection (one required)
      • Authentication
      • Visible Signature Options
      • Profile Option
      • Examples
      • Output
    • sign verify
      • Options
      • Examples
      • JSON Output
      • Exit Codes
    • sign profiles list
      • Options
      • Examples
    • Scripting Examples
      • Batch Sign PDFs
      • Verify and Report
      • Sign with Timestamp
      • Interactive Signing
      • Verify Before Processing
    • Error Messages
      • Certificate Errors
      • PIN Errors
      • File Errors
    • Security Notes
      • PIN Handling
      • Logging
    • Next Steps
  • Config Commands
    • config get
      • Options
      • Examples
      • JSON Output
    • config set
      • Available Keys
      • Examples
      • Array Values
    • config reset
      • Example
    • Configuration File
      • Location
      • Manual Editing
      • Default Configuration
    • Scripting Examples
      • Backup Configuration
      • Restore Configuration
      • Export Settings
      • Import Settings
      • Setup Script
      • Toggle Debug Mode
    • Environment Variables
      • Example
    • Troubleshooting
      • Config File Corrupted
      • Permission Issues
      • Invalid JSON
    • Next Steps

Architecture

  • Architecture Overview
    • High-Level Architecture
    • Execution Modes
      • GUI Mode
      • CLI Mode
    • Key Components
      • Frontend
      • Backend
      • External Dependencies
    • Data Flow
      • Opening a PDF
      • Signing a PDF
    • File Structure
    • Design Principles
      • 1. Single Binary
      • 2. Offline First
      • 3. Native Integration
      • 4. Security by Default
    • Next Steps
  • Backend Architecture
    • Service Pattern
      • Service Lifecycle
    • Core Services
      • PDFService
      • ConfigService
      • SignatureService
    • Signature Subsystem
      • Certificate Sources
      • PKCS#11 Integration
      • PKCS#12 Integration
      • NSS Integration
      • Signing Flow
    • Profile Management
    • Thread Safety
    • Error Handling
    • Testing
    • Build Requirements
      • CGO Dependencies
      • NSS Dependencies
    • Next Steps
  • Frontend Architecture
    • Technology Stack
    • Module Structure
    • Entry Point
    • State Management
    • Event System
    • Wails Integration
      • Importing Services
      • Calling Backend
      • Runtime Functions
    • PDF Rendering Pipeline
      • Page Loading
      • Canvas Rendering
    • UI Components
      • Modal Pattern
      • Toast Messages
    • Security Considerations
      • XSS Prevention
      • Input Validation
    • Error Handling
      • Global Handler
      • Service Errors
    • Build Process
    • Testing
    • Next Steps
  • Signature System Architecture
    • Overview
    • Certificate Types
      • Certificate Structure
      • Fingerprint Generation
    • Certificate Sources
      • PKCS#12 (.p12, .pfx files)
      • PKCS#11 (Hardware Tokens)
      • NSS (Browser Databases)
    • Signer Interface
      • PKCS#12 Signer
      • PKCS#11 Signer
      • NSS Signer
    • Signing Process
      • Flow
      • PDF Signing with pdfsign
    • Signature Appearance
      • Profile Structure
      • Appearance Generation
    • Verification
    • Security Considerations
      • PIN Handling
      • Path Validation
      • PKCS#11 Module Validation
    • Next Steps
  • Wails Integration
    • How Wails Works
    • Service Binding
      • Registering Services
      • Generated Bindings
      • Binding Example
    • Using Bindings in Frontend
      • Importing
      • Calling Methods
      • Handling Return Types
    • Wails Runtime
      • Window Control
      • System Dialogs
      • Events
    • Context Handling
      • Startup Context
      • Using Context
    • Asset Embedding
    • Build Process
      • Development Mode
      • Production Build
    • Regenerating Bindings
    • Common Patterns
      • Loading State
      • Error Boundary
      • Progress Tracking
    • Debugging
      • DevTools
      • Go Logging
      • Frontend Logging
    • Next Steps

Development

  • Development Setup
    • Prerequisites
      • Required Tools
      • System Dependencies
    • Installation
      • 1. Install Go
      • 2. Install Wails
      • 3. Install Task
      • 4. Install Node.js
    • Clone and Setup
    • MuPDF Libraries
    • Running Development Mode
      • Development Features
    • Project Structure
    • Available Tasks
    • IDE Setup
      • VS Code
      • GoLand
    • Environment Variables
    • Troubleshooting
      • “wails: command not found”
      • CGO Errors
      • Missing GTK Libraries
      • NSS Build Errors
    • Next Steps
  • Building Lankir
    • Build Types
    • Development Build
    • Standard Build
    • Static Build
      • How Static Build Works
    • AppImage Build
      • AppImage Structure
    • Build Requirements
      • System Dependencies
      • MuPDF Libraries
    • Build Configuration
      • Wails Configuration
      • Taskfile
    • Cross-Compilation
      • Building for Different Architectures
    • Optimization
      • Binary Size
      • Build Speed
    • Versioning
    • Release Checklist
    • Troubleshooting
      • “go-fitz-libs not found”
      • CGO Linking Errors
      • AppImage Won’t Run
      • Frontend Not Updating
    • CI/CD Integration
    • Next Steps
  • Testing
    • Running Tests
      • All Tests
      • With Coverage
      • Specific Package
    • Backend Tests
      • Test Structure
      • Test Helpers
      • Example Test
      • Table-Driven Tests
      • Test Data
    • Frontend Tests
      • Running Frontend Tests
      • Test Structure
      • Example Frontend Test
      • Mocking Wails Bindings
    • Coverage Reports
      • Go Coverage
      • Frontend Coverage
      • Coverage Goals
    • Integration Tests
      • Backend Integration
      • Frontend Integration
    • Continuous Integration
      • GitHub Actions
    • Writing Good Tests
      • Test Naming
      • Assertions
      • Cleanup
    • Next Steps
  • Contributing
    • Getting Started
    • Development Workflow
      • 1. Make Changes
      • 2. Test Your Changes
      • 3. Build and Verify
      • 4. Commit Changes
      • 5. Push and Create PR
    • Code Style
      • Go
      • JavaScript
      • CSS
    • Pull Request Guidelines
      • Before Submitting
      • PR Description
    • Areas for Contribution
      • Good First Issues
      • Feature Development
      • Documentation
      • Testing
    • Code of Conduct
    • Getting Help
    • License
    • Recognition

Reference

  • API Reference
    • PDFService
      • Methods
        • OpenPDF() (*PDFMetadata, error)
        • OpenPDFByPath(path string) (*PDFMetadata, error)
        • ClosePDF()
        • GetPageCount() int
        • RenderPage(pageNum int, zoom float64) (string, error)
        • GetPageDimensions(pageNum int) (*PageDimensions, error)
      • Types
    • SignatureService
      • Certificate Methods
        • ListCertificates() ([]Certificate, error)
        • ListCertificatesFiltered(filter CertificateFilter) ([]Certificate, error)
        • SearchCertificates(query string) ([]Certificate, error)
      • Signing Methods
        • SignPDF(pdfPath, certFingerprint, pin string) (string, error)
        • SignPDFWithProfile(pdfPath, certFingerprint, pin, profileID string) (string, error)
        • SignPDFWithProfileAndPosition(pdfPath, certFingerprint, pin, profileID string, position *SignaturePosition) (string, error)
      • Verification Methods
        • VerifySignatures(pdfPath string) ([]SignatureInfo, error)
      • Profile Methods
        • ListSignatureProfiles() ([]*SignatureProfile, error)
        • GetSignatureProfile(profileID string) (*SignatureProfile, error)
        • GetDefaultSignatureProfile() (*SignatureProfile, error)
        • SaveSignatureProfile(profile *SignatureProfile) error
        • DeleteSignatureProfile(profileID string) error
      • Configuration Methods
        • AddCertificateStore(path string) error
        • RemoveCertificateStore(path string) error
        • AddTokenLibrary(path string) error
        • RemoveTokenLibrary(path string) error
      • Types
    • ConfigService
      • Methods
        • Get() *Config
        • Update(config *Config) error
        • Reset() error
      • Types
    • RecentFilesService
      • Methods
        • GetRecentFiles() []RecentFile
        • AddRecentFile(path string) error
        • ClearRecentFiles() error
      • Types
    • App
      • Methods
        • OpenFileDialog() (string, error)
        • SaveFileDialog(defaultFilename string) (string, error)
        • ShowMessageDialog(title, message string)
    • Frontend Usage Examples
      • Opening a PDF
      • Listing Certificates
      • Signing a PDF
      • Updating Configuration
  • Configuration Reference
    • Configuration File
    • Settings
      • Appearance
        • theme
        • accentColor
      • Viewer
        • defaultZoom
        • showLeftSidebar
        • showRightSidebar
        • defaultViewMode
      • Files
        • recentFilesLength
        • autosaveInterval
      • Certificates
        • certificateStores
        • tokenLibraries
      • Advanced
        • debugMode
        • hardwareAccel
    • Complete Example
    • Environment Variables
      • Example
    • Related Files
    • CLI Commands
    • Backup and Restore
      • Backup
      • Restore
      • Export/Import
  • Troubleshooting
    • Installation Issues
      • AppImage Won’t Run
      • Missing Libraries
    • Certificate Issues
      • No Certificates Found
      • Certificate Not Valid for Signing
      • Wrong PIN / Invalid Password
      • Token Not Detected
    • Signing Issues
      • Signing Fails Silently
      • “Certificate does not have associated file path”
      • Signed PDF Invalid in Adobe Reader
    • PDF Viewing Issues
      • PDF Won’t Open
      • Slow Rendering
      • Blank Pages
    • Configuration Issues
      • Config File Corrupted
      • Settings Not Persisting
    • Performance Issues
      • High Memory Usage
      • Application Freezes
    • Debug Mode
    • Getting Help
      • Collect Diagnostic Information
      • Reporting Issues
    • See Also
  • Frequently Asked Questions
    • General
      • What is Lankir?
      • Is Lankir free?
      • What operating systems are supported?
      • Does Lankir require an internet connection?
    • PDF Viewing
      • What PDF features are supported?
      • Can I edit PDFs?
      • Why are some PDFs slow to render?
      • Are password-protected PDFs supported?
    • Digital Signatures
      • What signature types are supported?
      • Do I need a certificate from a CA?
      • What’s the difference between visible and invisible signatures?
      • Can a PDF have multiple signatures?
      • What happens if a document is modified after signing?
      • Why does Adobe Reader show my signature as “unknown”?
    • Hardware Tokens
      • What hardware tokens are supported?
      • How do I set up my smart card?
      • Why isn’t my token detected?
      • What if I enter the wrong PIN?
    • Certificates
      • Where should I put my certificate files?
      • How do I create a test certificate?
      • How long are certificates valid?
      • Can I use my browser’s certificates?
    • CLI
      • Can I automate signing?
      • How do I get JSON output?
      • What’s the exit code for verification?
    • Troubleshooting
      • The app won’t start
      • Signing fails with no error
      • How do I reset all settings?
    • Development
      • Can I contribute?
      • How do I build from source?
      • What technologies does Lankir use?
    • Security
      • Are my certificates secure?
      • Is the source code audited?
      • How are PINs handled?
    • Support
      • Where can I get help?
      • How do I report a security issue?
Lankir
  • Search


© Copyright 2025, Lankir Contributors.

Built with Sphinx using a theme provided by Read the Docs.