note 51623 added to ref.pdf

From: Date: Tue, 05 Apr 2005 21:51:25 +0000
Subject: note 51623 added to ref.pdf
Groups: php.notes 
Request: Send a blank email to php-notes+get-87540@lists.php.net to get a copy of this message
I found this info about pdflib scope on a Chinese (I think) site and translated it. I was trying to do pdf_setfont and kept getting the wrong scope error. Turns out it has to be in the Page scope. So pdf_setfont will only work when called between pdf_begin_page and pdf_end_page. ######################################### When API of the PDFlib is called, the error, Can't - IN 'document' scope occurs There is a concept of " the scope " in the PDFlib, as for all API of the PDFlib it is called with some scope, the *1 which is decided This error occurs when it is called other than the scope where API is appointed. The chart below in reference, please verify API call position. Path: PDF_moveto (), PDF_circle (), PDF_arc (), PDF_arcn (), PDF_rect () in each case PDF_stroke (), PDF_closepath_stroke (), PDF_fill (), PDF_fill_stroke (), PDF_closepath_fill_stroke (), PDF_clip (), PDF_endpath () the between Page: PDF_begin_page () with PDF_end_page () in between outside path Template: PDF_begin_template () with PDF_end_template () in between outside path Pattern: PDF_begin_pattern () with PDF_end_pattern () in between outside path Font: PDF_begin_font () with PDF_end_font () in between outside glyph Glyph: PDF_begin_glyph () with PDF_end_glyph () in between outside path Document: PDF_open_* () with PDF_close () in between outside page tempalte and pattern Object: The PDF_new () with the PDF_delete () it belongs to the other no scope in between the place Null: Outside object Any: All scopes other than ########################################## Hope this helps others as much as it helped me!!! ---- Manual Page -- http://www.php.net/manual/en/ref.pdf.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51623 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51623&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51623&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51623&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51623&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51623&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51623&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#87540) next »