Zunenonooo / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Assign current page number to new variable #477

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I want to store current page number to new variable and use it for further 
processing.but i am not able to do so.

i am using like 

<script type="text/php"> 
if ($pdf) { 
  $GLOBALS['chapters'][1] = $pdf->get_page_number() + 1; 

}  

but  $GLOBALS['chapters'] producing NULL value .my inline PHP script is on .

i want like this $page_num = CURRENT PAGE NUMBER;

version of dompdf : dompdf_0-6-0_beta3
version of PHP: 5.3
operating system : Windows XP

Original issue reported on code.google.com by amtpraja...@gmail.com on 30 Apr 2012 at 6:54

GoogleCodeExporter commented 8 years ago
How, exactly, are you trying to use this value? Inline script is run during 
document processing, which is done after other PHP code has already executed. 
This means the only place you could use $GLOBALS['chapters'] is in inline 
script.

Original comment by eclecticgeek on 2 May 2012 at 1:36

GoogleCodeExporter commented 8 years ago

Original comment by eclecticgeek on 24 May 2013 at 3:00