Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

288
Views
DOMPDF - Obtener la última posición y del pdf

¿Es posible obtener la posición y del último elemento HTML al representar un documento HTML en un PDF con Dompdf?

Necesito insertar un elemento después de la representación en pdf al final de mi documento (campos para la firma digital)...

EDITAR: como se describe en DOMPDF Github https://github.com/dompdf/dompdf/issues/1424 , debe crear una devolución de llamada para el evento 'end_frame':

 $dompdf = new Dompdf(); $dompdf->setCallbacks( array( 'myCallbacks' => array( 'event' => 'end_frame', 'f' => function ($infos) { $frame = $infos["frame"]; // elements positions $GLOBALS["array_coord"][] = $frame->get_padding_box(); // last page number $counter_frame = $frame->lookup_counter_frame('page'); $page_number = $counter_frame->counter_value('page'); } ) ) );

y luego después de la representación:

 $dompdf->render(); // get the last y position in the PDF $ligne_sign = sizeof($GLOBALS["array_coord"]) - 2; $y = $GLOBALS["array_coord"][$ligne_sign]["y"];
about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!