function _show_watermark($watermark)
 {
     $font = $this->findfont('Helvetica', 'iso-8859-1');
     pdf_setfont($this->pdf, $font, 100);
     $x = $this->left + $this->width / 2;
     $y = $this->bottom + $this->height / 2 + $this->offset;
     pdf_set_value($this->pdf, "textrendering", 1);
     pdf_translate($this->pdf, $x, $y);
     pdf_rotate($this->pdf, 60);
     pdf_show_xy($this->pdf, $watermark, -pdf_stringwidth($this->pdf, $watermark, $font, 100) / 2, -50);
 }
 function _show_watermark()
 {
     if (is_null($this->_watermark) || $this->_watermark == "") {
         return;
     }
     $font = $this->_control_font();
     pdf_setfont($this->pdf, $font, 100);
     $x = $this->left + $this->width / 2;
     $y = $this->bottom + $this->height / 2 + $this->offset;
     pdf_set_value($this->pdf, "textrendering", 1);
     pdf_translate($this->pdf, $x, $y);
     pdf_rotate($this->pdf, 60);
     pdf_show_xy($this->pdf, $this->_watermark, -pdf_stringwidth($this->pdf, $this->_watermark, $font, 100) / 2, -50);
 }
Example #3
0
    if (in_array(strtolower($album['artist']), $cfg['no_album_artist'])) {
        $title = $album['album'];
    } else {
        $title = $album['artist'] . ' - ' . $album['album'];
    }
    // $title = iconv(NJB_DEFAULT_CHARSET, 'UTF-8', $title);
    pdf_setfont($pdf, $font, 4);
    pdf_save($pdf);
    pdf_rotate($pdf, 90);
    pdf_set_text_pos($pdf, 2, -4.5);
    // y, -x
    pdf_show($pdf, $title);
    pdf_restore($pdf);
    // Restore rotate
    pdf_save($pdf);
    pdf_rotate($pdf, -90);
    pdf_set_text_pos($pdf, -116, 151 - 4.5);
    // -y, x
    pdf_show($pdf, $title);
    pdf_restore($pdf);
    // Restore rotate
    $hash_data .= '-' . $text . '-' . $title;
}
//  +------------------------------------------------------------------------+
//  | PDF front cover                                                        |
//  +------------------------------------------------------------------------+
$x0 = 44 - $x0;
$y0 = 160 - $y0;
pdf_translate($pdf, $x0, $y0);
pdf_moveto($pdf, 0, -1);
pdf_lineto($pdf, 0, -11);
Example #4
0
pdf_fill($pdf);
pdf_restore($pdf);
/* draw minute hand */
pdf_save($pdf);
pdf_rotate($pdf, -($ltime['seconds'] / 60.0 + $ltime['minutes'] - 15.0) * 6.0);
pdf_moveto($pdf, -$radius / 10, -$radius / 20);
pdf_lineto($pdf, $radius * 0.8, 0.0);
pdf_lineto($pdf, -$radius / 10, $radius / 20);
pdf_closepath($pdf);
pdf_fill($pdf);
pdf_restore($pdf);
/* draw second hand */
pdf_setrgbcolor($pdf, 1.0, 0.0, 0.0);
pdf_setlinewidth($pdf, 2);
pdf_save($pdf);
pdf_rotate($pdf, -(($ltime['seconds'] - 15.0) * 6.0));
pdf_moveto($pdf, -$radius / 5, 0.0);
pdf_lineto($pdf, $radius, 0.0);
pdf_stroke($pdf);
pdf_restore($pdf);
/* draw little circle at center */
pdf_circle($pdf, 0, 0, $radius / 30);
pdf_fill($pdf);
pdf_restore($pdf);
/* DONE */
pdf_end_page($pdf);
pdf_close($pdf);
pdf_delete($pdf);
// hides "Generating ..." message:
echo "<script language='JavaScript'>document.getElementById('loading').style.display = 'none';</script>";
if (!file_exists($file)) {
Example #5
0
 }
 $font = pdf_findfont($pdf, 'Helvetica', 'winansi', 0);
 pdf_setfont($pdf, $font, 3);
 pdf_show_boxed($pdf, $temp, 6.5, 0, 138, 108, 'left', '');
 pdf_setfont($pdf, $font, 4);
 pdf_set_text_pos($pdf, 2, -4.5);
 //y,-x
 pdf_rotate($pdf, 90);
 pdf_show($pdf, $artist . ' - ' . $album);
 pdf_rotate($pdf, -90);
 pdf_setfont($pdf, $font, 4);
 pdf_set_text_pos($pdf, -116, 151 - 4.5);
 //-y,x
 pdf_rotate($pdf, -90);
 pdf_show($pdf, $artist . ' - ' . $album);
 pdf_rotate($pdf, 90);
 //  +---------------------------------------------------------------------------+
 //  | PDF Front Cover                                                           |
 //  +---------------------------------------------------------------------------+
 $x0 = 44 - $x0;
 $y0 = 160 - $y0;
 pdf_translate($pdf, $x0, $y0);
 pdf_moveto($pdf, 0, -1);
 pdf_lineto($pdf, 0, -11);
 pdf_moveto($pdf, 121, -1);
 pdf_lineto($pdf, 121, -11);
 pdf_moveto($pdf, 0, 121);
 pdf_lineto($pdf, 0, 131);
 pdf_moveto($pdf, 121, 121);
 pdf_lineto($pdf, 121, 131);
 pdf_moveto($pdf, -1, 0);