TP_SEI_Project/arm_PDFGenerator-dontSaveOnline.md
2025-04-15 16:18:08 +02:00

2.7 KiB

PDFGenerator-dontSaveOnline Documentation

Overview

PDFGenerator-dontSaveOnline is a variant of the main PDFGenerator component, specifically designed for offline document generation and testing purposes. It maintains all the core PDF generation capabilities while providing flexible storage options.

Key Features

Storage Management

  • No automatic online database storage
  • Configurable via SavePDFtoDISK in App.config
  • Storage options:
    • Local filesystem
    • Selective saving
    • Custom storage paths

Configuration

  • SavePDFtoDISK_Folder: Defines local storage path
  • Separate testing database (C6StampeCentralizzate_Testing)
  • Flexible save behavior configuration
  • Custom error handling settings

Core Functionality

  • Maintains all PDFGenerator rendering capabilities
  • Chart generation and image handling
  • Support for all report types
  • Custom database error management

Use Cases

  1. Development

    • Template testing
    • Layout verification
    • Feature development
    • Debug sessions
  2. Testing

    • Offline document generation
    • Format validation
    • Content verification
    • Performance testing
  3. Document Preview

    • Pre-production verification
    • Layout checks
    • Content review
    • Format validation

Differences from Standard PDFGenerator

Storage

  • Standard: Automatic online storage
  • dontSaveOnline: Configurable local storage

Database

  • Standard: Production database
  • dontSaveOnline: Testing database

Error Handling

  • Standard: Production logging
  • dontSaveOnline: Development-focused logging

Configuration

  • Standard: Fixed production settings
  • dontSaveOnline: Flexible configuration

Configuration Settings

App.config Parameters

<add key="SavePDFtoDISK" value="1" />
<add key="SavePDFtoDISK_Folder" value="path/to/storage" />

Database Connection

<add name="SqlServerStampeC6Connection" 
     connectionString="Data Source=10.14.152.19; 
     Database=C6StampeCentralizzate_Testing;
     User Id=C6Report; 
     Password=C6Report; 
     Max Pool Size=10"/>

Best Practices

  1. Development

    • Use for all development work
    • Test new templates offline
    • Verify layouts before production
  2. Testing

    • Run comprehensive tests
    • Validate document generation
    • Check error handling
  3. Maintenance

    • Regular configuration review
    • Path validation
    • Error log monitoring

Integration

Development Workflow

  1. Create/modify templates
  2. Generate test documents
  3. Verify output locally
  4. Deploy to production

Testing Workflow

  1. Configure test environment
  2. Generate sample documents
  3. Validate output
  4. Document issues