Skip to content
Snippets Groups Projects
Select Git revision
  • 3323272-null-setting-bug
  • 2.x default
  • 3323272-dompdf-settings
  • 8.x-1.x
  • 2.2.2
  • 2.2.1
  • 2.2.0
  • v2.2.0
  • 2.1.0
  • 2.0.0
10 results

pdf_api.install

Blame
  • Forked from project / pdf_api
    15 commits behind, 3 commits ahead of the upstream repository.
    bluegeek9's avatar
    Issue #3323272 by bluegeek9, markdorison: DomPDF settings
    Steven Ayers authored and Mark Dorison committed
    485499a8
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    pdf_api.install 942 B
    <?php
    
    /**
     * @file
     * Install, update and uninstall functions for the PDF API module.
     */
    
    /**
     * Adds dompdf settings.
     */
    function pdf_api_update_20403() {
      $settings = \Drupal::configFactory()->getEditable('pdf_api.dom_pdf.settings');
      $settings
        ->set('defaultFont', 'serif')
        ->set('dpi', 96)
        ->set('fontHeightRatio', 1.1)
        ->set('pdfBackend', 'CPDF')
        ->set('pdflibLicense', '')
        ->set('isPhpEnabled', FALSE)
        ->set('isRemoteEnabled', TRUE)
        ->set('isJavascriptEnabled', TRUE)
        ->set('chroot', ['.'])
        ->set('fontDir', 'temporary://')
        ->set('fontCache', 'temporary://')
        ->set('tempDir', 'temporary://')
        ->set('debugPng', FALSE)
        ->set('debugKeepTemp', FALSE)
        ->set('debugCss', FALSE)
        ->set('debugLayout', FALSE)
        ->set('debugLayoutLines', TRUE)
        ->set('debugLayoutBlocks', TRUE)
        ->set('debugLayoutInline', TRUE)
        ->set('debugLayoutPaddingBox', TRUE)
        ->save();
    }