User Contributed Notes 1 note

Here is how I added a dashed line to my pdf. I couldn't find any info on this, so I decided to write what I learned from trial and error.

On a page that is 612px wide and signified by $p, I drew a dashed line from left to right.$p = pdf_new();pdf_begin_document($p,"","");pdf_begin_page_ext($p,612,792,"");

pdf_setdash($p,3,7); //3,7 can be any set of numberspdf_save($p); //This saves what already therepdf_moveto($p,0,700); //move the pointer herepdf_lineto($p,612,700); //draw a linepdf_closepath_stroke($p); //show the linepdf_restore($p); //put it all back