No pictures when saving pdf

Plus d'informations
il y a 1 an 10 mois #54 par Alex-Mata
Réponse de Alex-Mata sur le sujet No pictures when saving pdf
Shein, thank you very much
The problem with using a self-signed certificate was solved as follows
Add it at the end of the constructor method :

// Allow self-signed ssl certificate
$context = stream_context_create([
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed'=> true
]
]);

$this->setHttpContext($context);

Thus modified constructor method :
public function __construct($config = [])
{
$this->config = $config;
$this->app = CMSFactory::getApplication();

if (empty($this->config))
{
$this->config = [
'chroot' => JPATH_ROOT,
'isRemoteEnabled' => true,
'isFontSubsettingEnabled' => true,
'isHtml5ParserEnabled' => true,
'isJavascriptEnabled' => false,
'defaultMediaType' => 'all',
'defaultFont' => 'Helvetica, sans-serif',
'defaultPaperSize' => 'a4',
'defaultPaperOrientation' => 'portrait',
'tmpDir' => ComponentHelper::TMPDIR,
];
}

parent::__construct($this->config);

$this->setBasePath(JPATH_ROOT);
$this->setCustomFonts();

// Allow self-signed SSL certificate
$context = stream_context_create([
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed'=> true
]
]);

$this->setHttpContext($context);

}

Connexion ou Créer un compte pour participer à la conversation.