- π¦πΊAustralia nigelcunningham Geelong
Looks like this is outdated, but thanks for all your other contributions!
PdfFormat::getOutput() gets the entity from the route. But, $this->entity already exists. The routeMatch is unnecessary.
$printable = \Drupal::service('printable.controller');
$node = \Drupal::service('entity_type.manager')->getStorage('node')->load(1);
$file = $printable->getOutput($node, 'pdf', []);
// $file will be the full path to the file
$entity_type = $this->entity->getEntityTypeId();
$pdf_location = $token_service->replace($pdf_location, [$entity_type => $this->entity]);
Closed: outdated
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Looks like this is outdated, but thanks for all your other contributions!