Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 2.2.x
  • 2.4.x
  • 2.x
  • 8.x-1.x
  • 2.0.0
  • 2.0.1
  • 2.0.2
  • 2.0.3
  • 2.1
  • 2.1.0
  • 2.1.1
  • 2.1.2
  • 2.1.3
  • 2.1.4
  • 2.1.5
  • 2.2.0
  • 2.2.1
  • 2.2.2
  • 2.3.0
  • 2.3.1
  • 2.3.1-beta1
  • 2.3.2
  • 2.4.0
  • 2.4.1
  • 2.4.2
  • 2.4.3
  • 2.4.4
  • 2.4.5
  • 3.0.0
  • 3.0.0-rc1
  • 3.0.0-rc2
  • 3.0.1
  • 3.0.2
  • 3.1.0
  • 3.1.1
  • 3.1.2
  • 3.1.3
  • 8.x-1.0
  • 8.x-1.1
  • previous/3321310-log-dompdfwarnings/2023-05-15
  • previous/3321310-log-dompdfwarnings/2023-09-04
  • v2.2.0
42 results

Target

Select target project
  • project/pdf_api
  • issue/pdf_api-3225595
  • issue/pdf_api-3250273
  • issue/pdf_api-3275815
  • issue/pdf_api-3299734
  • issue/pdf_api-3323024
  • issue/pdf_api-3321310
  • issue/pdf_api-3323272
  • issue/pdf_api-3335742
  • issue/pdf_api-3345390
  • issue/pdf_api-3316703
  • issue/pdf_api-3347420
  • issue/pdf_api-3348174
  • issue/pdf_api-3399917
  • issue/pdf_api-3400863
  • issue/pdf_api-3404728
  • issue/pdf_api-3394399
  • issue/pdf_api-3409151
  • issue/pdf_api-3412440
  • issue/pdf_api-3427422
  • issue/pdf_api-3451253
  • issue/pdf_api-3500294
22 results
Select Git revision
  • 2.x
  • 3323272-dompdf-settings
  • 3323272-null-setting-bug
  • 8.x-1.x
  • 2.0.0
  • 2.1.0
  • 2.2.0
  • 2.2.1
  • 2.2.2
  • v2.2.0
10 results
Show changes

Commits on Source 15

behaviour
cpdf
dompdf
dompdf's
dumpio
filelocation
headful
headlessly
htmlout
initialise
intsance
mikehaertl
mpdf
pagedjs
pdflib
pupeteer
pupphpeteer
tcpdf
webform
willbe
wkhtmlto
################
# DrupalCI GitLabCI template
#
# Gitlab-ci.yml to replicate DrupalCI testing for Contrib
#
# With thanks to:
# * The GitLab Acceleration Initiative participants
# * DrupalSpoons
################
################
# Guidelines
#
# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification. It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained.
#
# However, you can modify this template if you have additional needs for your project.
################
################
# Includes
#
# Additional configuration can be provided through includes.
# One advantage of include files is that if they are updated upstream, the changes affect all pipelines using that include.
#
# Includes can be overridden by re-declaring anything provided in an include, here in gitlab-ci.yml
# https://docs.gitlab.com/ee/ci/yaml/includes.html#override-included-configuration-values
################
include:
################
# DrupalCI includes:
# As long as you include this, any future includes added by the Drupal Association will be accessible to your pipelines automatically.
# View these include files at https://git.drupalcode.org/project/gitlab_templates/
################
- project: $_GITLAB_TEMPLATES_REPO
ref: $_GITLAB_TEMPLATES_REF
file:
- '/includes/include.drupalci.main.yml'
# EXPERIMENTAL: For Drupal 7, remove the above line and uncomment the below.
# - '/includes/include.drupalci.main-d7.yml'
- '/includes/include.drupalci.variables.yml'
- '/includes/include.drupalci.workflows.yml'
################
# Pipeline configuration variables
#
# These are the variables provided to the Run Pipeline form that a user may want to override.
#
# Docs at https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/includes/include.drupalci.variables.yml
################
# variables:
# SKIP_ESLINT: '1'
phpcs:
allow_failure: false
phpstan:
allow_failure: false
###################################################################################
#
# *
# /(
# ((((,
# /(((((((
# ((((((((((*
# ,(((((((((((((((
# ,(((((((((((((((((((
# ((((((((((((((((((((((((*
# *(((((((((((((((((((((((((((((
# ((((((((((((((((((((((((((((((((((*
# *(((((((((((((((((( .((((((((((((((((((
# ((((((((((((((((((. /(((((((((((((((((*
# /((((((((((((((((( .(((((((((((((((((,
# ,(((((((((((((((((( ((((((((((((((((((
# .(((((((((((((((((((( .(((((((((((((((((
# ((((((((((((((((((((((( ((((((((((((((((/
# (((((((((((((((((((((((((((/ ,(((((((((((((((*
# .((((((((((((((/ /(((((((((((((. ,(((((((((((((((
# *(((((((((((((( ,(((((((((((((/ *((((((((((((((.
# ((((((((((((((, /(((((((((((((. ((((((((((((((,
# (((((((((((((/ ,(((((((((((((* ,(((((((((((((,
# *((((((((((((( .((((((((((((((( ,(((((((((((((
# ((((((((((((/ /((((((((((((((((((. ,((((((((((((/
# ((((((((((((( *(((((((((((((((((((((((* *((((((((((((
# ((((((((((((( ,(((((((((((((..((((((((((((( *((((((((((((
# ((((((((((((, /((((((((((((* /((((((((((((/ ((((((((((((
# ((((((((((((( /((((((((((((/ (((((((((((((* ((((((((((((
# (((((((((((((/ /(((((((((((( ,((((((((((((, *((((((((((((
# (((((((((((((( *(((((((((((/ *((((((((((((. ((((((((((((/
# *((((((((((((((((((((((((((, /(((((((((((((((((((((((((
# ((((((((((((((((((((((((( ((((((((((((((((((((((((,
# .(((((((((((((((((((((((/ ,(((((((((((((((((((((((
# ((((((((((((((((((((((/ ,(((((((((((((((((((((/
# *((((((((((((((((((((( (((((((((((((((((((((,
# ,(((((((((((((((((((((, ((((((((((((((((((((/
# ,(((((((((((((((((((((* /((((((((((((((((((((
# ((((((((((((((((((((((, ,/((((((((((((((((((((,
# ,(((((((((((((((((((((((((((((((((((((((((((((((((((
# .(((((((((((((((((((((((((((((((((((((((((((((
# .((((((((((((((((((((((((((((((((((((,.
# .,(((((((((((((((((((((((((.
#
###################################################################################
.composer-base:
artifacts:
exclude:
- '.git'
- '.git/**/*'
- '$_WEB_ROOT/**/.git'
- '$_WEB_ROOT/**/.git/**/*'
- 'vendor/**/.git'
- 'vendor/**/.git/**/*'
- "vendor/mpdf/ttfonts/"
- "vendor/mpdf/ttfonts/**/*"
- "vendor/tecnickcom/tcpdf/fonts"
- "vendor/tecnickcom/tcpdf/fonts/**/*"
......@@ -8,6 +8,6 @@
"dompdf/dompdf" : ">=2.0.4",
"mikehaertl/phpwkhtmltopdf": "^2.3",
"mpdf/mpdf" : "^8.2.0",
"tecnickcom/tcpdf": "^6.2"
"tecnickcom/tcpdf": "^6.8 || ^6.7.5"
}
}
pdf_api.dom_pdf.setting:
pdf_api.dom_pdf.settings:
type: config_object
label: 'Dompdf Settings'
mapping:
......@@ -30,7 +30,7 @@ pdf_api.dom_pdf.setting:
description: '"chroot" of dompdf'
type: sequence
sequence:
- type: string
type: string
fontDir:
description: 'The location of the dompdf font directory'
type: string
......
name: Puphpeteer
description: Generate PDFs using Puppeteer
type: module
core_version_requirement: ^9 || ^10
core_version_requirement: ^9 || ^10 || ^11
dependencies:
- pdf_api:pdf_api
......@@ -192,7 +192,7 @@ class PuphpeteerGenerator extends PdfGeneratorBase implements ContainerFactoryPl
CsrfTokenGenerator $csrfTokenGenerator,
AccountInterface $currentUser,
RequestStack $requestStack,
ExtensionPathResolver $extensionPathResolver
ExtensionPathResolver $extensionPathResolver,
) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
......
......@@ -2,5 +2,5 @@ name: PDF API
type: module
description: 'Provides an API for generating PDFs.'
package: PDF
core_version_requirement: ^8.8 || ^9 || ^10
core_version_requirement: ^8.8 || ^9 || ^10 || ^11
configure: pdf_api.settings
......@@ -60,6 +60,7 @@ class DompdfSettingsForm extends ConfigFormBase {
'#default_value' => $settings->get('fontHeightRatio') ?? 1.1,
];
// phpcs:disable DrupalPractice.General.OptionsT.TforValue
$form['pdfBackend'] = [
'#type' => 'select',
'#title' => $this->t('PDF backend'),
......@@ -72,6 +73,7 @@ class DompdfSettingsForm extends ConfigFormBase {
],
'#default_value' => $settings->get('pdfBackend') ?? 'CPDF',
];
// phpcs:enable DrupalPractice.General.OptionsT.TforValue
$form['pdflibLicense'] = [
'#type' => 'textfield',
......@@ -142,7 +144,7 @@ class DompdfSettingsForm extends ConfigFormBase {
$chroot = [];
if ($form_state->hasValue('chroot')) {
$chroot = $form_state->getValue('chroot');
$chroot = $chroot['directories'] ?? [];
$chroot = $chroot['directories'] ?? ['.'];
}
else {
$chroot = $settings->get('chroot') ?? ['.'];
......
......@@ -73,8 +73,9 @@ class DompdfGenerator extends PdfGeneratorBase implements ContainerFactoryPlugin
$php_enabled = $settings->get('isPhpEnabled');
$remote_enabled = $settings->get('isRemoteEnabled');
$javascript_enabled = $settings->get('isJavascriptEnabled');
$chroot = $settings->get('chroot') ?? ['.'];
$chroot_path = [];
foreach ($settings->get('chroot') as $path) {
foreach ($chroot as $path) {
$chroot_path[] = $file_system->realpath(DRUPAL_ROOT . '/' . $path);
}
......@@ -95,8 +96,7 @@ class DompdfGenerator extends PdfGeneratorBase implements ContainerFactoryPlugin
$debug_layout_blocks = $settings->get('debugLayoutBlocks');
$debug_layout_inline = $settings->get('debugLayoutInline');
$debug_layout_padding_box = $settings->get('debugLayoutPaddingBox');
$options = new Options([
$options_array = [
'defaultFont' => $default_font,
'dpi' => $dpi,
'fontHeightRatio' => $font_height_ratio,
......@@ -116,7 +116,11 @@ class DompdfGenerator extends PdfGeneratorBase implements ContainerFactoryPlugin
'debugLayoutBlocks' => $debug_layout_blocks,
'debugLayoutInline' => $debug_layout_inline,
'debugLayoutPaddingBox' => $debug_layout_padding_box,
]);
];
$options_array = array_filter($options_array, function ($value, $key) {
return !is_null($value);
}, ARRAY_FILTER_USE_BOTH);
$options = new Options($options_array);
if ($pdflib_license) {
$options['pdflibLicense'] = $pdflib_license;
......
......@@ -6,8 +6,8 @@ use Drupal\Core\Messenger\MessengerInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\pdf_api\Plugin\PdfGeneratorBase;
use Drupal\pdf_api\Plugin\PdfGeneratorInterface;
use mikehaertl\wkhtmlto\Pdf;
use Symfony\Component\DependencyInjection\ContainerInterface;
use mikehaertl\wkhtmlto\Pdf;
/**
* A PDF generator plugin for the WKHTMLTOPDF library.
......