Jump to content


Photo

Pdf


  • Faça o login para participar
13 replies to this topic

#1 _MELO_

_MELO_

    Normal

  • Usuários
  • 117 posts
  • Sexo:Masculino
  • Localidade:Porto Alegre - RS. Argentina.
  • Interesses:PHP, JavaScript, Ajax, pl/pgSQL e PostgreSQL.

Posted 13/06/2003, 14:30

Alguem poderia me dar um empurrãozinhu de me mostrar o início do caminho para se montar um PDF?
Vaaaaleu gente boa! :P
Alexandre Melo

#2 Stormbringer

Stormbringer

    I'd love to stay with you all

  • Ex-Admins
  • 2927 posts
  • Sexo:Não informado
  • Localidade:Goiânia - GO
  • Interesses:Atualmente: pesquisa e desenvolvimento de web-games

Posted 13/06/2003, 14:48

eu tenho uma classe muito facil de se usar para criar pdfs. infelizmente ñ dah pra por arquivos anexos aqui, então vou por o código dela:

class.ezpdf.php
<?php

include_once('class.pdf.php');

class Cezpdf extends Cpdf {
//==============================================================================
// this class will take the basic interaction facilities of the Cpdf class
// and make more useful functions so that the user does not have to 
// know all the ins and outs of pdf presentation to produce something pretty.
//
// IMPORTANT NOTE
// there is no warranty, implied or otherwise with this software.
// 
// version 004 (versioning is linked to class.pdf.php)
//
// Wayne Munro, R&OS Ltd, 7 December 2001
//==============================================================================

var $ez=array('fontSize'=>10); // used for storing most of the page configuration parameters
var $y; // this is the current vertical positon on the page of the writing point, very important
var $ezPages=array(); // keep an array of the ids of the pages, making it easy to go back and add page numbers etc.
var $ezPageCount=0;

function Cezpdf($paper='a4',$orientation='portrait'){
  // Assuming that people don't want to specify the paper size using the absolute coordinates
  // allow a couple of options:
  // paper can be 'a4' or 'letter'
  // orientation can be 'portrait' or 'landscape'
  // or, to actually set the coordinates, then pass an array in as the first parameter.
  // the defaults are as shown.

  if (!is_array($paper)){
    switch (strtolower($paper)){
      case 'letter':
        $size = array(0,0,612,792);
        break;
      case 'a4':
      default:
        $size = array(0,0,598,842);
        break;
    }
    switch (strtolower($orientation)){
      case 'landscape':
        $a=$size[3];
        $size[3]=$size[2];
        $size[2]=$a;
        break;
    }
  } else {
    // then an array was sent it to set the size
    $size = $paper;
  }
  $this->Cpdf($size);
  $this->ez['pageWidth']=$size[2];
  $this->ez['pageHeight']=$size[3];
  
  // also set the margins to some reasonable defaults
  $this->ez['topMargin']=30;
  $this->ez['bottomMargin']=30;
  $this->ez['leftMargin']=30;
  $this->ez['rightMargin']=30;
  
  // set the current writing position to the top of the first page
  $this->y = $this->ez['pageHeight']-$this->ez['topMargin'];
  $this->ezPages[1]=$this->getFirstPageId();
  $this->ezPageCount=1;
}

function ezNewPage(){
  // make a new page, setting the writing point back to the top
  $this->y = $this->ez['pageHeight']-$this->ez['topMargin'];
  // make the new page with a call to the basic class.
  $this->ezPageCount++;
  $this->ezPages[$this->ezPageCount] = $this->newPage();
}

function ezSetMargins($top,$bottom,$left,$right){
  // sets the margins to new values
  $this->ez['topMargin']=$top;
  $this->ez['bottomMargin']=$bottom;
  $this->ez['leftMargin']=$left;
  $this->ez['rightMargin']=$right;
  // check to see if this means that the current writing position is outside the 
  // writable area
  if ($this->y > $this->ez['pageHeight']-$top){
    // then move y down
    $this->y = $this->ez['pageHeight']-$top;
  }
  if ( $this->y < $bottom){
    // then make a new page
    $this->ezNewPage();
  }
}  

function ezStartPageNumbers($x,$y,$size,$pos='left',$pattern='{PAGENUM} of {TOTALPAGENUM}',$num=''){
  // put page numbers on the pages from here.
  // place then on the 'pos' side of the coordinates (x,y).
  // pos can be 'left' or 'right'
  // use the given 'pattern' for display, where (PAGENUM} and {TOTALPAGENUM} are replaced
  // as required.
  // if $num is set, then make the first page this number, the number of total pages will
  // be adjusted to account for this.
  if (!$pos || !strlen($pos)){
    $pos='left';
  }
  if (!$pattern || !strlen($pattern)){
    $pattern='{PAGENUM} of {TOTALPAGENUM}';
  }
  if (!isset($this->ez['pageNumbering'])){
    $this->ez['pageNumbering']=array();
  }
  $this->ez['pageNumbering'][$this->ezPageCount]=array('x'=>$x,'y'=>$y,'pos'=>$pos,'pattern'=>$pattern,'num'=>$num,'size'=>$size);
}

function ezStopPageNumbers(){
  if (!isset($this->ez['pageNumbering'])){
    $this->ez['pageNumbering']=array();
  }
  $this->ez['pageNumbering'][$this->ezPageCount]='stop';
}

function ezPRVTaddPageNumbers(){
  // this will go through the pageNumbering array and add the page numbers are required
  if (isset($this->ez['pageNumbering'])){
    $totalPages = $this->ezPageCount;
    $tmp=$this->ez['pageNumbering'];
    $status=0;
    foreach ($this->ezPages as $pageNum=>$id){
      if (isset($tmp[$pageNum])){
        if (is_array($tmp[$pageNum])){
          // then this must be starting page numbers
          $status=1;
          $info = $tmp[$pageNum];
        } else if ($tmp[$pageNum]=='stop'){
          // then we are stopping page numbers
          $status=0;
        }
      }
      if ($status){
        // then add the page numbering to this page
        if (strlen($info['num'])){
          $num=$pageNum-$info['num'];
        } else {
          $num=$pageNum;
        }
        $total = $totalPages+$num-$pageNum;
        $pat = str_replace('{PAGENUM}',$num,$info['pattern']);
        $pat = str_replace('{TOTALPAGENUM}',$total,$pat);
        $this->reopenObject($id);
        switch($info['pos']){
          case 'right':
            $this->addText($info['x'],$info['y'],$info['size'],$pat);
            break;
          default:
            $w=$this->getTextWidth($info['size'],$pat);
            $this->addText($info['x']-$w,$info['y'],$info['size'],$pat);
            break;
        }
        $this->closeObject();
      }
    }
  }
}

function ezPRVTcleanUp(){
  $this->ezPRVTaddPageNumbers();
}

function ezStream($options=''){
  $this->ezPRVTcleanUp();
  $this->stream($options);
}

function ezOutput($options=0){
  $this->ezPRVTcleanUp();
  return $this->output($options);
}

function ezSetY($y){
  // used to change the vertical position of the writing point.
  $this->y = $y;
  if ( $this->y < $this->ez['marginBottom']){
    // then make a new page
    $this->ezNewPage();
  }
}

function ezSetDy($dy){
  // used to change the vertical position of the writing point.
  // changes up by a positive increment, so enter a negative number to go
  // down the page
  $this->y += $dy;
  if ( $this->y < $this->ez['marginBottom']){
    // then make a new page
    $this->ezNewPage();
  }
}

function ezPrvtTableDrawLines($pos,$gap,$x0,$x1,$y0,$y1,$y2,$col){
  $x0=1000;
  $x1=0;
  $this->setStrokeColor($col[0],$col[1],$col[2]);
//  $pdf->setStrokeColor(0.8,0.8,0.8);
  foreach($pos as $x){
    $this->line($x-$gap/2,$y0,$x-$gap/2,$y2);
    if ($x>$x1){ $x1=$x; };
    if ($x<$x0){ $x0=$x; };
  }
  $this->line($x0-$gap/2,$y0,$x1-$gap/2,$y0);
  if ($y0!=$y1){
    $this->line($x0-$gap/2,$y1,$x1-$gap/2,$y1);
  }
  $this->line($x0-$gap/2,$y2,$x1-$gap/2,$y2);
}

function ezPrvtTableColumnHeadings($cols,$pos,$height,$gap,$size,&$y){
  $y=$y-$height;
  foreach($cols as $colName=>$colHeading){
    $this->addText($pos[$colName],$y,$size,$colHeading);
  }
  $y -= $gap;
}

function ezTable(&$data,$cols='',$title='',$options=''){
  // add a table of information to the pdf document
  // $data is a two dimensional array
  // $cols (optional) is an associative array, the keys are the names of the columns from $data
  // to be presented (and in that order), the values are the titles to be given to the columns
  // $title (optional) is the title to be put on the top of the table
  //
  // $options is an associative array which can contain:
  // 'showLines'=> 0 or 1, default is 1 (1->alternate lines are shaded, 0->no shading)
  // 'showHeadings' => 0 or 1
  // 'shaded'=> 0 or 1, default is 1 (1->alternate lines are shaded, 0->no shading)
  // 'shadeCol' => (r,g,b) array, defining the colour of the shading, default is (0.8,0.8,0.8)
  // 'fontSize' => 10
  // 'textCol' => (r,g,b) array, text colour
  // 'titleFontSize' => 12
  // 'titleGap' => 5 , the space between the title and the top of the table
  // 'lineCol' => (r,g,b) array, defining the colour of the lines, default, black.
  // 'xPos' => 'left','right','center','centre',or coordinate, reference coordinate in the x-direction
  // 'xOrientation' => 'left','right','center','centre', position of the table w.r.t 'xPos' 
  //
  // note that the user will have had to make a font selection already or this will not 
  // produce a valid pdf file.
  
  if (!is_array($data)){
    return;
  }
  
  if (!is_array($cols)){
    // take the columns from the first row of the data set
    reset($data);
    list($k,$v)=each($data);
    if (!is_array($v)){
      return;
    }
    $cols=array();
    foreach($v as $k1=>$v1){
      $cols[$k1]=$k1;
    }
  }
  
  if (!is_array($options)){
    $options=array();
  }

  $defaults = array(
    'shaded'=>1,'showLines'=>1,'shadeCol'=>array(0.8,0.8,0.8),'fontSize'=>10,'titleFontSize'=>12
    ,'titleGap'=>5,'lineCol'=>array(0,0,0),'gap'=>5,'xPos'=>'centre','xOrientation'=>'centre'
    ,'showHeadings'=>1,'textCol'=>array(0,0,0));

  foreach($defaults as $key=>$value){
    if (is_array($value)){
      if (!isset($options[$key]) || !is_array($options[$key])){
        $options[$key]=$value;
      }
    } else {
      if (!isset($options[$key])){
        $options[$key]=$value;
      }
    }
  }

  $middle = ($this->ez['pageWidth']-$this->ez['rightMargin'])/2+($this->ez['leftMargin'])/2;
  // figure out the maximum widths of each column
  $maxWidth=array();
  foreach($cols as $colName=>$colHeading){
    $maxWidth[$colName]=0;
  }
  foreach($data as $row){
    foreach($cols as $colName=>$colHeading){
      $w = $this->getTextWidth($options['fontSize'],(string)$row[$colName]);
      if ($w > $maxWidth[$colName]){
        $maxWidth[$colName]=$w;
      }
    }
  }
  foreach($cols as $colName=>$colTitle){
    $w = $this->getTextWidth($options['fontSize'],(string)$colTitle);
    if ($w > $maxWidth[$colName]){
      $maxWidth[$colName]=$w;
    }
  }
  
  // calculate the start positions of each of the columns
  $pos=array();
  $x=0;
  $t=$x;
  foreach($maxWidth as $colName => $w){
    $pos[$colName]=$t;
    $t=$t+$w+$options['gap'];
  }
  $pos['_end_']=$t;
  // now adjust the table to the correct location accross the page
  switch ($options['xPos']){
    case 'left':
      $xref = $this->ez['leftMargin'];
      break;
    case 'right':
      $xref = $this->ez['rightMargin'];
      break;
    case 'centre':
    case 'center':
      $xref = $middle;
      break;
  }
  switch ($options['xOrientation']){
    case 'left':
      $dx = $xref;
      break;
    case 'right':
      $dx = $xref-$t;
      break;
    case 'centre':
    case 'center':
      $dx = $xref-$t/2;
      break;
  }
  foreach($pos as $k=>$v){
    $pos[$k]=$v+$dx;
  }
  $x0=$x+$dx;
  $x1=$t+$dx;
  
  // ok, just about ready to make me a table
//  $this->setColor($options['lineCol'][0],$options['lineCol'][1],$options['lineCol'][2]);
  $this->setColor($options['textCol'][0],$options['textCol'][1],$options['textCol'][2]);
  $this->setStrokeColor($options['shadeCol'][0],$options['shadeCol'][1],$options['shadeCol'][2]);

  // if the title is set, then do that
  if (strlen($title)){
    $w = $this->getTextWidth($options['titleFontSize'],$title);
    $this->y -= $this->getFontHeight($options['titleFontSize']);
    if ($this->y < $this->ez['bottomMargin']){
      $this->ezNewPage();
      $this->y -= $this->getFontHeight($options['titleFontSize']);
    }
    $this->addText($middle-$w/2,$this->y,$options['titleFontSize'],$title);
    $this->y -= $options['titleGap'];
  }

  $y=$this->y; // to simplify the code a bit
  
  // make the table
  $height = $this->getFontHeight($options['fontSize']);
  $decender = $this->getFontDecender($options['fontSize']);

//  $y0=$y+$height+$decender;
  $y0=$y+$decender;
  $dy=0;
  if ($options['showHeadings']){
    $this->ezPrvtTableColumnHeadings($cols,$pos,$height,$options['gap'],$options['fontSize'],&$y);
    $dy=$options['gap']/2;
  }
  $y1 = $y+$decender+$dy;
//  columnHeadings($pdf,$col,$pos,$height,$gap,$size,$y);
//  $y1=$y+$height+$decender+$options['gap']/2;
//  $y1=$y+$decender+$options['gap']/2;
  
  $cnt=0;
  foreach($data as $row){
    $cnt++;
    $y-=$height;
    if ($y<$this->ez['bottomMargin']){
//      $y2=$y+$height+$decender;
      $y2=$y+$height+$decender;
      if ($options['showLines']){
        $this->ezPrvtTableDrawLines($pos,$options['gap'],$x0,$x1,$y0,$y1,$y2,$options['lineCol']);
      }
      $this->newPage();
//      $this->setColor($options['lineCol'][0],$options['lineCol'][1],$options['lineCol'][2]);
      $this->setColor($options['textCol'][0],$options['textCol'][1],$options['textCol'][2]);
      $y = $this->ez['pageHeight']-$this->ez['topMargin'];
      $y0=$y+$decender;
      if ($options['showHeadings']){
        $this->ezPrvtTableColumnHeadings($cols,$pos,$height,$options['gap'],$options['fontSize'],&$y);
      }
      $y1=$y+$decender+$options['gap']/2;
  //      drawShading($pdf,$y+$decender,$height);
  //      $pdf->setColor(0,0,0);
      $y -= $height;
    }
    if ($options['shaded'] && $cnt%2==0){
      $this->saveState();
      $this->setColor($options['shadeCol'][0],$options['shadeCol'][1],$options['shadeCol'][2],1);
      $this->filledRectangle($x0-$options['gap']/2,$y+$decender,$x1-$x0,$height);
      $this->restoreState();
    }
    // write the actual data
    foreach($cols as $colName=>$colTitle){
      $this->addText($pos[$colName],$y,$options['fontSize'],$row[$colName]);
    }
  }
  $y2=$y+$decender;
  if ($options['showLines']){
    $this->ezPrvtTableDrawLines($pos,$options['gap'],$x0,$x1,$y0,$y1,$y2,$options['lineCol']);
  }
  
  $this->y=$y;
}

function ezText($text,$size=0,$options=''){
  // this will add a string of text to the document, starting at the current drawing
  // position.
  // it will wrap to keep within the margins, including optional offsets from the left
  // and the right, if $size is not specified, then it will be the last one used, or
  // the default value (12 I think).
  // the text will go to the start of the next line when a return code "\n" is found.
  // possible options are:
  // 'left'=> number, gap to leave from the left margin
  // 'right'=> number, gap to leave from the right margin
  // 'justification' => 'left','right','center','centre','full'

  $left = $this->ez['leftMargin'] + (isset($options['left'])?$options['left']:0);
  $right = $this->ez['pageWidth'] - $this->ez['rightMargin'] - (isset($options['right'])?$options['right']:0);
  if ($size<=0){
    $size = $this->ez['fontSize'];
  } else {
    $this->ez['fontSize']=$size;
  }
  
  if (isset($options['justification'])){
    $just = $options['justification'];
  } else {
    $just = 'left';
  }
  
  $height = $this->getFontHeight($size);
  $lines = explode("\n",$text);
  foreach ($lines as $line){
    $start=1;
    while (strlen($line) || $start){
      $start=0;
      $this->y=$this->y-$height;
      if ($this->y < $this->ez['bottomMargin']){
        $this->ezNewPage();
      }
      $line=$this->addTextWrap($left,$this->y,$right-$left,$size,$line,$just);
    }
  }

}

}
?>

๑۩۞۩๑Let the Carnage Begin!!๑۩۞۩๑


#3 Stormbringer

Stormbringer

    I'd love to stay with you all

  • Ex-Admins
  • 2927 posts
  • Sexo:Não informado
  • Localidade:Goiânia - GO
  • Interesses:Atualmente: pesquisa e desenvolvimento de web-games

Posted 13/06/2003, 14:50

Continuando...

class.pdf.php
<?php
class Cpdf {
//======================================================================
// pdf class
//
// wayne munro - R&OS ltd
// pdf@ros.co.nz
// http://www.ros.co.nz/pdf
//
// this code is a little rough in places, but at present functions well enough
// for the uses that we have put it to. There are a number of possible enhancements
// and if there is sufficient interest then we will extend the functionality.
//
// note that the adobe font AFM files are included, along with some serialized versions
// of their crucial data, though if the serialized versions are not there, then this 
// class will re-create them from the base AFM file for the selected font (if it is there).
// At present only the basic fonts are supported (one of the many restrictions)
//
// this does not yet create a linearised pdf file, this is desirable and will be investigated
// also there is no compression or encryption of the content streams, this will also be added
// as soon as possible.
//
// The site above will have the latest news regarding this code, as well as somewhere to
// register interest in being notified as to future enhancements, and to leave feedback.
//
// IMPORTANT NOTE
// there is no warranty, implied or otherwise with this software.
// 
//
// version 0.04
// 7 december 2001
//======================================================================

var $numObj=0;
var $objects = array();
var $catalogId;
var $fonts=array();
var $currentFont;
var $currentFontNum;
var $currentNode;
var $currentPage;
var $currentContents;
var $numFonts=0;
var $currentColour=array('r'=>-1,'g'=>-1,'b'=>-1);
var $currentFillColour=array('r'=>-1,'g'=>-1,'b'=>-1);
var $currentLineStyle='';
var $numPages=0;
var $stack=array(); // the stack will be used to place object Id's onto while others are worked on
var $nStack=0;
var $looseObjects=array();
var $addLooseObjects=array();
var $infoObject=0;
var $numImages=0;
var $options=array('compression'=>1);
var $firstPageId;

function Cpdf ($pageSize=array(0,0,612,792)){
  $this->newDocument($pageSize);
}

function openFont($font){
  // open the font file and return a php structure containing it.
  // first check if this one has been done before and saved in a form more suited to php
  // note that if a php serialized version does not exist it will try and make one, but will
  // require write access to the directory to do it... it is MUCH faster to have these serialized
  // files.
  
  // assume that $font contains both the path and perhaps the extension to the file, split them
  $pos=strrpos($font,'/');
  $dir=substr($font,0,$pos+1);
  $name=substr($font,$pos+1);
  if (substr($name,-4)=='.afm'){
    $name=substr($name,0,strlen($name)-4);
  }
  if (file_exists($dir.'php_'.$name.'.afm')){
    $tmp = file($dir.'php_'.$name.'.afm');
    $this->fonts[$font]=unserialize($tmp[0]);
  } else if (file_exists($dir.$name.'.afm')){
    $data = array();
    $file = file($dir.$name.'.afm');
    foreach ($file as $rowA){
      $row=trim($rowA);
      $pos=strpos($row,' ');
      if ($pos){
        // then there must be some keyword
        $key = substr($row,0,$pos);
        switch ($key){
          case 'FontName':
          case 'FullName':
          case 'FamilyName':
          case 'Weight':
          case 'ItalicAngle':
          case 'IsFixedPitch':
          case 'CharacterSet':
          case 'UnderlinePosition':
          case 'UnderlineThickness':
          case 'Version':
          case 'EncodingScheme':
          case 'CapHeight':
          case 'XHeight':
          case 'Ascender':
          case 'Descender':
          case 'StdHW':
          case 'StdVW':
          case 'StartCharMetrics':
            $data[$key]=trim(substr($row,$pos));
            break;
          case 'FontBBox':
            $data[$key]=explode(' ',trim(substr($row,$pos)));
            break;
          case 'C':
            //C 39; WX 222; N quoteright; B 53 463 157 718;
            $bits=explode(';',trim($row));
            $dtmp=array();
            foreach($bits as $bit){
              $bits2 = explode(' ',trim($bit));
              if (strlen($bits2[0])){
                if (count($bits2)>2){
                  $dtmp[$bits2[0]]=array();
                  for ($i=1;$i<count($bits2);$i++){
                    $dtmp[$bits2[0]][]=$bits2[$i];
                  }
                } else if (count($bits2)==2){
                  $dtmp[$bits2[0]]=$bits2[1];
                }
              }
            }
            if ($dtmp['C']>0){
              $data['C'][$dtmp['C']]=$dtmp;
            } else {
              $data['C'][$dtmp['N']]=$dtmp;
            }
            break;
          case 'KPX':
            //KPX Adieresis yacute -40
            $bits=explode(' ',trim($row));
            $data['KPX'][$bits[1]][$bits[2]]=$bits[3];
            break;
        }
      }
    }
    $this->fonts[$font]=$data;
    $fp = fopen($dir.'php_'.$name.'.afm','w');
    fwrite($fp,serialize($data));
    fclose($fp);
  }
}

function o_catalog($id,$action,$options=''){
  switch ($action){
    case 'new':
      $this->objects[$id]=array('t'=>'catalog','info'=>array());
      $this->catalogId=$id;
      break;
    case 'outlines':
      $this->objects[$id]['info']['outlines']=$options;
      break;
    case 'pages':
      $this->objects[$id]['info']['pages']=$options;
      break;
    case 'viewerPreferences':
      if (!isset($this->objects[$id]['info']['viewerPreferences'])){
        $this->objects[$id]['info']['viewerPreferences']=array();
      }
      foreach($options as $k=>$v){
        switch ($k){
          case 'HideToolbar':
          case 'HideMenuBar':
          case 'HideWindoUI':
          case 'FitWindow':
          case 'CenterWindow':
          case 'NonFullScreenPageMode':
          case 'Direction':
            $this->objects[$id]['info']['viewerPreferences'][$k]=$v;
          break;
        }
      }
      break;
    case 'out':
      $res="\n".$id." 0 obj\n".'<< /Type /Catalog';
      foreach($this->objects[$id]['info'] as $k=>$v){
        switch($k){
          case 'outlines':
            $res.="\n".'/Outlines '.$v.' 0 R';
            break;
          case 'pages':
            $res.="\n".'/Pages '.$v.' 0 R';
            break;
          case 'viewerPreferences':
            $res.="\n".'/ViewerPreferences <<';
            foreach($this->objects[$id]['info']['viewerPreferences'] as $k=>$v){
              $res.="\n/".$k.' '.$v;
            }
            $res.="\n>>\n";
            break;
        }
      }
      $res.=" >>\nendobj";
      return $res;
      break;
  }
}
function o_pages($id,$action,$options=''){
  switch ($action){
    case 'new':
      $this->objects[$id]=array('t'=>'pages','info'=>array());
      $this->o_catalog($this->catalogId,'pages',$id);
      break;
    case 'page':
      $this->objects[$id]['info']['pages'][]=$options;
      break;
    case 'procset':
      $this->objects[$id]['info']['procset']=$options;
      break;
    case 'mediaBox':
      $this->objects[$id]['info']['mediaBox']=$options; // which should be an array of 4 numbers
      break;
    case 'font':
      $this->objects[$id]['info']['fonts'][]=array('objNum'=>$options['objNum'],'fontNum'=>$options['fontNum']);
      break;
    case 'xObject':
      $this->objects[$id]['info']['xObjects'][]=array('objNum'=>$options['objNum'],'label'=>$options['label']);
      break;
    case 'out':
      if (count($this->objects[$id]['info']['pages'])){
        $res="\n".$id." 0 obj\n<< /Type /Pages\n/Kids [";
        foreach($this->objects[$id]['info']['pages'] as $k=>$v){
          $res.=$v." 0 R\n";
        }
        $res.="]\n/Count ".count($this->objects[$id]['info']['pages']);
        if ((isset($this->objects[$id]['info']['fonts']) && count($this->objects[$id]['info']['fonts'])) || isset($this->objects[$id]['info']['procset'])){
          $res.="\n/Resources <<";
          if (isset($this->objects[$id]['info']['procset'])){
            $res.="\n/ProcSet ".$this->objects[$id]['info']['procset']." 0 R";
          }
          if (isset($this->objects[$id]['info']['fonts']) && count($this->objects[$id]['info']['fonts'])){
            $res.="\n/Font << ";
            foreach($this->objects[$id]['info']['fonts'] as $finfo){
              $res.="\n/F".$finfo['fontNum']." ".$finfo['objNum']." 0 R";
            }
            $res.=" >>";
          }
          if (isset($this->objects[$id]['info']['xObjects']) && count($this->objects[$id]['info']['xObjects'])){
            $res.="\n/XObject << ";
            foreach($this->objects[$id]['info']['xObjects'] as $finfo){
              $res.="\n/".$finfo['label']." ".$finfo['objNum']." 0 R";
            }
            $res.=" >>";
          }
          $res.="\n>>";
          if (isset($this->objects[$id]['info']['mediaBox'])){
            $tmp=$this->objects[$id]['info']['mediaBox'];
            $res.="\n/MediaBox [".$tmp[0].' '.$tmp[1].' '.$tmp[2].' '.$tmp[3].']';
          }
        }
        $res.="\n >>\nendobj";
      } else {
        $res="\n".$id." 0 obj\n<< /Type /Pages\n/Count 0\n>>\nendobj";
      }
      return $res;
    break;
  }
}
function o_outlines($id,$action,$options=''){
  switch ($action){
    case 'new':
      $this->objects[$id]=array('t'=>'outlines','info'=>array('outlines'=>array()));
      $this->o_catalog($this->catalogId,'outlines',$id);
      break;
    case 'outline':
      $this->objects[$id]['info']['outlines'][]=$options;
      break;
    case 'out':
      if (count($this->objects[$id]['info']['outlines'])){
        $res="\n".$id." 0 obj\n<< /Type /Outlines /Kids [";
        foreach($this->objects[$id]['info']['outlines'] as $k=>$v){
          $res.=$v." 0 R ";
        }
        $res.="] /Count ".count($this->objects[$id]['info']['outlines'])." >>\nendobj";
      } else {
        $res="\n".$id." 0 obj\n<< /Type /Outlines /Count 0 >>\nendobj";
      }
      return $res;
      break;
  }
}

function selectFont($fontName){
  // if the font is not loaded then load it and make the required object
  // else just make it the current font
  if (!isset($this->fonts[$fontName])){
    // load the file
    $this->openFont($fontName);
    if (isset($this->fonts[$fontName])){
      $this->numObj++;
      $this->numFonts++;
      $pos=strrpos($fontName,'/');
//      $dir=substr($fontName,0,$pos+1);
      $name=substr($fontName,$pos+1);
      if (substr($name,-4)=='.afm'){
        $name=substr($name,0,strlen($name)-4);
      }
      $this->o_font($this->numObj,'new',$name);
      $this->fonts[$fontName]['fontNum']=$this->numFonts;
    }
  }
  if (isset($this->fonts[$fontName])){
    // so if for some reason the font was not set in the last one then it will not be selected
    $this->currentFont=$fontName;
    $this->currentFontNum=$this->fonts[$fontName]['fontNum'];
  }
  return $this->currentFontNum;
}

function o_font($id,$action,$options=''){
  switch ($action){
    case 'new':
      $this->objects[$id]=array('t'=>'font','info'=>array('name'=>$options));
      $fontNum=$this->numFonts;
      $this->objects[$id]['info']['fontNum']=$fontNum;
      // also tell the pages node about the new font
      $this->o_pages($this->currentNode,'font',array('fontNum'=>$fontNum,'objNum'=>$id));
      break;
    case 'out':
      $res="\n".$id." 0 obj\n<< /Type /Font\n/Subtype /Type1\n";
      $res.="/Name /F".$this->objects[$id]['info']['fontNum']."\n";
      $res.="/BaseFont /".$this->objects[$id]['info']['name']."\n";
      $res.="/Encoding /WinAnsiEncoding\n";
//      $res.="/Encoding /MacRomanEncoding\n";
      $res.=">>\nendobj";
      return $res;
      break;
  }
}

function o_procset($id,$action,$options=''){
  switch ($action){
    case 'new':
      $this->objects[$id]=array('t'=>'procset','info'=>array());
      $this->o_pages($this->currentNode,'procset',$id);
      break;
    case 'out':
      $res="\n".$id." 0 obj\n[/PDF /Text]";
      $res.="\nendobj";
      return $res;
      break;
  }
}

function o_info($id,$action,$options=''){
  switch ($action){
    case 'new':
      $this->infoObject=$id;
      $date='D:'.date('Ymd');
      $this->objects[$id]=array('t'=>'info','info'=>array('Creator'=>'R and OS php pdf writer, http://www.ros.co.nz','CreationDate'=>$date));
      break;
    case 'Title':
    case 'Author':
    case 'Subject':
    case 'Keywords':
    case 'Creator':
    case 'Producer':
    case 'CreationDate':
    case 'ModDate':
    case 'Trapped':
      $this->objects[$id]['info'][$action]=$options;
      break;
    case 'out':
      $res="\n".$id." 0 obj\n<<\n";
      foreach ($this->objects[$id]['info']  as $k=>$v){
        $res.='/'.$k.' ('.$this->filterText($v).")\n";
      }
      $res.=">>\nendobj";
      return $res;
      break;
  }
}

function o_page($id,$action,$options=''){
  switch ($action){
    case 'new':
      $this->numPages++;
      $this->objects[$id]=array('t'=>'page','info'=>array('parent'=>$this->currentNode,'pageNum'=>$this->numPages));
      $this->o_pages($this->currentNode,'page',$id);
      $this->currentPage=$id;
      //make a contents object to go with this page
      $this->numObj++;
      $this->o_contents($this->numObj,'new',$id);
      $this->currentContents=$this->numObj;
      $this->objects[$id]['info']['contents']=array();
      $this->objects[$id]['info']['contents'][]=$this->numObj;
      $match = ($this->numPages%2 ? 'odd' : 'even');
      foreach($this->addLooseObjects as $oId=>$target){
        if ($target=='all' || $match==$target){
          $this->objects[$id]['info']['contents'][]=$oId;
        }
      }
      break;
    case 'content':
      $this->objects[$id]['info']['contents'][]=$options;
      break;
    case 'out':
      $res="\n".$id." 0 obj\n<< /Type /Page";
      $res.="\n/Parent ".$this->objects[$id]['info']['parent']." 0 R";
      $count = count($this->objects[$id]['info']['contents']);
      if ($count==1){
        $res.="\n/Contents ".$this->objects[$id]['info']['contents'][0]." 0 R";
      } else if ($count>1){
        $res.="\n/Contents [\n";
        foreach ($this->objects[$id]['info']['contents'] as $cId){
          $res.=$cId." 0 R\n";
        }
        $res.="]";
      }
      $res.="\n>>\nendobj";
      return $res;
      break;
  }
}

function o_contents($id,$action,$options=''){
  switch ($action){
    case 'new':
      $this->objects[$id]=array('t'=>'contents','c'=>'');
      if (strlen($options) && intval($options)){
        // then this contents is the primary for a page
        $this->objects[$id]['onPage']=$options;
      }
      break;
    case 'out':

๑۩۞۩๑Let the Carnage Begin!!๑۩۞۩๑


#4 Stormbringer

Stormbringer

    I'd love to stay with you all

  • Ex-Admins
  • 2927 posts
  • Sexo:Não informado
  • Localidade:Goiânia - GO
  • Interesses:Atualmente: pesquisa e desenvolvimento de web-games

Posted 13/06/2003, 14:52

continuando ainda:


      $tmp=$this->objects[$id]['c'];
      $res= "\n".$id." 0 obj\n<<";
      if ($this->options['compression']){
        // then implement ZLIB based compression on this content stream
        $res.=" /Filter /FlateDecode";
        $tmp = gzcompress($tmp);
      }
      $res.=" /Length ".strlen($tmp)." >>\nstream\n".$tmp."\nendstream\nendobj\n";
      return $res;
      break;
  }
}

function o_image($id,$action,$options=''){
  switch($action){
    case 'new':
      // make the new object
      $this->objects[$id]=array('t'=>'image','data'=>$options['data'],'info'=>array());
      $this->objects[$id]['info']['Type']='/XObject';
      $this->objects[$id]['info']['Subtype']='/Image';
      $this->objects[$id]['info']['Width']=$options['iw'];
      $this->objects[$id]['info']['Height']=$options['ih'];
      $this->objects[$id]['info']['ColorSpace']='/DeviceRGB';
      $this->objects[$id]['info']['BitsPerComponent']=8;
      $this->objects[$id]['info']['Filter']='/DCTDecode';
      // assign it a place in the named resource dictionary as an external object, according to
      // the label passed in with it.
      $this->o_pages($this->currentNode,'xObject',array('label'=>$options['label'],'objNum'=>$id));
      break;
    case 'out':
      $tmp=$this->objects[$id]['data'];
      $res= "\n".$id." 0 obj\n<<";
      foreach($this->objects[$id]['info'] as $k=>$v){
        $res.="\n/".$k.' '.$v;
      }
      $res.="\n/Length ".strlen($tmp)." >>\nstream\n".$tmp."\nendstream\nendobj\n";
      return $res;
      break;
  }
}

function newDocument($pageSize=array(0,0,612,792)){
  $this->numObj=0;
  $this->objects = array();
  $this->o_catalog(1,'new');

//  $this->o_catalog(1,'outlines',2);
  $this->o_outlines(2,'new');
  $this->o_pages(3,'new');

  // hard code the page size for now
  $this->o_pages(3,'mediaBox',$pageSize);
  $this->currentNode = 3;

  $this->o_procset(4,'new');

  $this->numObj=4;

  $this->numObj++;
  $this->o_info($this->numObj,'new');

  $this->numObj++;
  $this->o_page($this->numObj,'new');

  // need to store the first page id as there is no way to get it to the user during 
  // startup
  $this->firstPageId = $this->currentContents;
}

function getFirstPageId(){
  return $this->firstPageId;
}

function checkAllHere(){
  // make sure that anything that needs to be in the file has been included
}

function output($debug=0){

  if ($debug){
    // turn compression off
    $this->options['compression']=0;
  }

  $this->checkAllHere();

  $xref=array();
  $content="%PDF-1.3\n";
  $pos=strlen($content);
//  $xref[]=$pos;
  foreach($this->objects as $k=>$v){
    $tmp='o_'.$v['t'];
    $cont=$this->$tmp($k,'out');
    $content.=$cont;
    $xref[]=$pos;
    $pos+=strlen($cont);
  }
  $content.="\nxref\n0 ".(count($xref)+1)."\n0000000000 65535 f \n";
  foreach($xref as $p){
    $content.=substr('0000000000',0,10-strlen($p)).$p." 00000 n \n";
  }
  $content.=
'
trailer
  << /Size '.(count($xref)+1).'
     /Root 1 0 R
     /Info '.$this->infoObject.' 0 R
  >>
startxref
'.$pos.'
%%EOF
';
  return $content;
}

function addContent($content){
  $this->objects[$this->currentContents]['c'].=$content;
}

function filterText($text){
  $text = str_replace('\\','\\\\',$text);
  $text = str_replace('(','\(',$text);
  $text = str_replace(')','\)',$text);
  return $text;
}
function addText($x,$y,$size,$text,$angle=0,$wordSpaceAdjust=0){
  if (!$this->numFonts){$this->selectFont('./fonts/Helvetica');}
  $text=$this->filterText($text);
//  $text = str_replace('\\','\\\\',$text);
//  $text = str_replace('(','\(',$text);
//  $text = str_replace(')','\)',$text);
  if ($angle==0){
    $this->objects[$this->currentContents]['c'].="\n".'BT /F'.$this->currentFontNum.' '.sprintf('%.1f',$size).' Tf '.sprintf('%.3f',$x).' '.sprintf('%.3f',$y);
    if ($wordSpaceAdjust!=0){
      $this->objects[$this->currentContents]['c'].=' '.sprintf('%.3f',$wordSpaceAdjust).' Tw';
    }
    $this->objects[$this->currentContents]['c'].=' Td ('.$text.') Tj ET';
  } else {
    // then we are going to need a modification matrix
    // assume the angle is in degrees
    $a = deg2rad((float)$angle);
    $tmp = "\n".'BT /F'.$this->currentFontNum.' '.sprintf('%.1f',$size).' Tf ';
    $tmp .= sprintf('%.3f',cos($a)).' '.sprintf('%.3f',(-1.0*sin($a))).' '.sprintf('%.3f',sin($a)).' '.sprintf('%.3f',cos($a)).' ';
    $tmp .= sprintf('%.3f',$x).' '.sprintf('%.3f',$y).' Tm';
    $tmp.= ' ('.$text.') Tj ET';
    $this->objects[$this->currentContents]['c'].=$tmp;
  }
}

function setColor($r,$g,$b,$force=0){
  if ($force || $r!=$this->currentColour['r'] || $g!=$this->currentColour['g'] || $b!=$this->currentColour['b']){
    $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$r).' '.sprintf('%.3f',$g).' '.sprintf('%.3f',$b).' rg';
    $this->currentColour=array('r'=>$r,'g'=>$g,'b'=>$b);
  }
}

function setStrokeColor($r,$g,$b,$force=0){
  if ($force || $r!=$this->currentStrokeColour['r'] || $g!=$this->currentStrokeColour['g'] || $b!=$this->currentStrokeColour['b']){
    $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$r).' '.sprintf('%.3f',$g).' '.sprintf('%.3f',$b).' RG';
    $this->currentStrokeColour=array('r'=>$r,'g'=>$g,'b'=>$b);
  }
}

function line($x1,$y1,$x2,$y2){
  $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$x1).' '.sprintf('%.3f',$y1).' m '.sprintf('%.3f',$x2).' '.sprintf('%.3f',$y2).' l S';
}

function setLineStyle($width=1,$cap='',$join='',$dash='',$phase=0){
  // this sets the line drawing style.
  // width, is the thickness of the line in user units
  // cap is the type of cap to put on the line, values can be 'butt','round','square'
  //    where the diffference between 'square' and 'butt' is that 'square' projects a flat end past the
  //    end of the line.
  // join can be 'miter', 'round', 'bevel'
  // dash is an array which sets the dash pattern, is a series of length values, which are the lengths of the
  //   on and off dashes.
  //   (2) represents 2 on, 2 off, 2 on , 2 off ...
  //   (2,1) is 2 on, 1 off, 2 on, 1 off.. etc
  // phase is a modifier on the dash pattern which is used to shift the point at which the pattern starts. 

  // this is quite innefficient in that it sets all the parameters whenever 1 is changed, but will fix another day

  $string = '';
  if ($width>0){
    $string.= $width.' w';
  }
  $ca = array('butt'=>0,'round'=>1,'square'=>2);
  if (isset($ca[$cap])){
    $string.= ' '.$ca[$cap].' J';
  }
  $ja = array('miter'=>0,'round'=>1,'bevel'=>2);
  if (isset($ja[$join])){
    $string.= ' '.$ja[$join].' j';
  }
  if (is_array($dash)){
    $string.= ' [';
    foreach ($dash as $len){
      $string.=' '.$len;
    }
    $string.= ' ] '.$phase.' d';
  }
  $this->currentLineStyle = $string;
  $this->objects[$this->currentContents]['c'].="\n".$string;
}

function polygon($p,$np,$f=0){
  $this->objects[$this->currentContents]['c'].="\n";
  $this->objects[$this->currentContents]['c'].=sprintf('%.3f',$p[0]).' '.sprintf('%.3f',$p[1]).' m ';
  for ($i=2;$i<$np*2;$i=$i+2){
    $this->objects[$this->currentContents]['c'].= sprintf('%.3f',$p[$i]).' '.sprintf('%.3f',$p[$i+1]).' l ';
  }
  if ($f==1){
    $this->objects[$this->currentContents]['c'].=' f';
  } else {
    $this->objects[$this->currentContents]['c'].=' S';
  }
}

function filledRectangle($x1,$y1,$width,$height){
  $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$x1).' '.sprintf('%.3f',$y1).' '.$width.' '.$height.' re f';
}

function rectangle($x1,$y1,$width,$height){
  $this->objects[$this->currentContents]['c'].="\n".sprintf('%.3f',$x1).' '.sprintf('%.3f',$y1).' '.$width.' '.$height.' re S';
}

function newPage(){
  $this->numObj++;
  $this->o_page($this->numObj,'new');
  // and if there has been a stroke or fill colour set, then transfer them
  if ($this->currentColour['r']>=0){
    $this->setColor($this->currentColour['r'],$this->currentColour['g'],$this->currentColour['b'],1);
  }
  if ($this->currentStrokeColour['r']>=0){
    $this->setStrokeColor($this->currentStrokeColour['r'],$this->currentStrokeColour['g'],$this->currentStrokeColour['b'],1);
  }

  // if there is a line style set, then put this in too
  if (strlen($this->currentLineStyle)){
    $this->objects[$this->currentContents]['c'].="\n".$string;
  }

  // the call to the o_page object set currentContents to the present page, so this can be returned as the page id
  return $this->currentContents;
}

function stream($options=''){
  // setting the options allows the adjustment of the headers
  // values at the moment are:
  // 'Content-Disposition'=>'filename'  - sets the filename, though not too sure how well this will 
  //        work as in my trial the browser seems to use the filename of the php file with .pdf on the end
  // 'Accept-Ranges'=>1 or 0 - if this is not set to 1, then this header is not included, off by default
  //    this header seems to have caused some problems despite tha fact that it is supposed to solve
  //    them, so I am leaving it off by default.
  // 'compress'=> 1 or 0 - apply content stream compression, this is on (1) by default
  if (isset($options['compress']) && $options['compress']==0){
    $tmp = $this->output(1);
  } else {
    $tmp = $this->output();
  }
  header("Content-type: application/pdf");
  header("Content-Length: ".strlen(trim($tmp)));
  $fileName = (isset($options['Content-Disposition'])?$options['Content-Disposition']:'file.pdf');
  header("Content-Disposition: inline; filename=".$fileName);
  if (isset($options['Accept-Ranges']) && $options['Accept-Ranges']==1){
    header("Accept-Ranges: ".strlen(trim($tmp))); 
  }
  echo trim($tmp);
}

function getFontHeight($size){
  if (!$this->numFonts){
    $this->selectFont('./fonts/Helvetica');
  }
  // for the current font, and the given size, what is the height of the font in user units
  $h = $this->fonts[$this->currentFont]['FontBBox'][3]-$this->fonts[$this->currentFont]['FontBBox'][1];
  return $size*$h/1000;
}
function getFontDecender($size){
  // note that this will most likely return a negative value
  if (!$this->numFonts){
    $this->selectFont('./fonts/Helvetica');
  }
  $h = $this->fonts[$this->currentFont]['FontBBox'][1];
  return $size*$h/1000;
}

function getTextWidth($size,$text){
  if (!$this->numFonts){
    $this->selectFont('./fonts/Helvetica');
  }
  // hmm, this is where it all starts to get tricky - use the font information to
  // calculate the width of each character, add them up and convert to user units
  $w=0;
  $len=strlen($text);
  $cf = $this->currentFont;
  for ($i=0;$i<$len;$i++){
    $w+=$this->fonts[$cf]['C'][ord($text[$i])]['WX'];
  }
  return $w*$size/1000;
}

function PRVTadjustWrapText($text,$actual,$width,&$x,&$adjust,$justification){
  switch ($justification){
    case 'left':
      return;
      break;
    case 'right':
      $x+=$width-$actual;
      break;
    case 'center':
    case 'centre':
      $x+=($width-$actual)/2;
      break;
    case 'full':
      // count the number of words
      $words = explode(' ',$text);
      $nspaces=count($words)-1;
      $adjust = ($width-$actual)/$nspaces;
      break;
  }
}

function addTextWrap($x,$y,$width,$size,$text,$justification='left'){
  // this will display the text, and if it goes beyond the width $width, will backtrack to the 
  // previous space or hyphen, and return the remainder of the text.

  // $justification can be set to 'left','right','center','centre','full'
    
  if (!$this->numFonts){$this->selectFont('./fonts/Helvetica');}
  if ($width<=0){
    // error, pretend it printed ok, othereise risking a loop
    return '';
  }
  $w=0;
  $break=0;
  $breakWidth=0;
  $len=strlen($text);
  $cf = $this->currentFont;
  $tw = $width/$size*1000;
  for ($i=0;$i<$len;$i++){
    $w+=$this->fonts[$cf]['C'][ord($text[$i])]['WX'];
    if ($w>$tw){
      // then we need to truncate this line
      if ($break>0){
        // then we have somewhere that we can split :)
        $tmp = substr($text,0,$break+1);
        $adjust=0;
        $this->PRVTadjustWrapText($tmp,$breakWidth,$width,&$x,&$adjust,$justification);
        $this->addText($x,$y,$size,$tmp,0,$adjust);
        return substr($text,$break+1);
      } else {
        // just split before the current character
        $tmp = substr($text,0,$i);
        $adjust=0;
        $tmpw=($w-$this->fonts[$cf]['C'][ord($text[$i])]['WX'])*$size/1000;
        $this->PRVTadjustWrapText($tmp,$tmpw,$width,&$x,&$adjust,$justification);
        $this->addText($x,$y,$size,$tmp,0,$adjust);
        return substr($text,$i);
      }
    }
    if ($text[$i]=='-'){
      $break=$i;
      $breakWidth = $w*$size/1000;
    }
    if ($text[$i]==' '){
      $break=$i;
      $breakWidth = ($w-$this->fonts[$cf]['C'][ord($text[$i])]['WX'])*$size/1000;
    }
  }
  // then there was no need to break this line
  if ($justification=='full'){
    $justification='left';
  }
  $adjust=0;
  $tmpw=$w*$size/1000;
  $this->PRVTadjustWrapText($text,$tmpw,$width,&$x,&$adjust,$justification);
  $this->addText($x,$y,$size,$text,0,$adjust);
  return '';
}

function saveState(){
  $this->objects[$this->currentContents]['c'].="\nq";
}

function restoreState(){
  $this->objects[$this->currentContents]['c'].="\nQ";
}

function openObject(){
  // make a loose object, the output will go into this object, until it is closed, then will revert to
  // the current one.
  // this object will not appear until it is included within a page.
  // the function will return the object number
  $this->nStack++;
  $this->stack[$this->nStack]=$this->currentContents;
  // add a new object of the content type, to hold the data flow
  $this->numObj++;
  $this->o_contents($this->numObj,'new');
  $this->currentContents=$this->numObj;
  $this->looseObjects[$this->numObj]=1;
  
  return $this->numObj;
}

function reopenObject($id){
   $this->nStack++;
   $this->stack[$this->nStack]=$this->currentContents;
   $this->currentContents=$id;
}

function closeObject(){
  // close the object, as long as there was one open in the first place, which will be indicated by
  // an objectId on the stack.
  if ($this->nStack>0){
    $this->currentContents=$this->stack[$this->nStack];
    $this->nStack--;
    // easier to probably not worry about removing the old entries, they will be overwritten
    // if there are new ones.
  }
}

function stopObject($id){
  // if an object has been appearing on pages up to now, then stop it, this page will
  // be the last one that could contian it.
  if (isset($this->addLooseObjects[$id])){
    $this->addLooseObjects[$id]='';
  }
}

function addObject($id,$options='add'){
  // add the specified object to the page
  if (isset($this->looseObjects[$id]) && $this->currentContents!=$id){
    // then it is a valid object, and it is not being added to itself
    switch($options){
      case 'all':
        // then this object is to be added to this page (done in the next block) and 
        // all future new pages. 
        $this->addLooseObjects[$id]='all';
      case 'add':
        if (isset($this->objects[$this->currentContents]['onPage'])){
          // then the destination contents is the primary for the page
          // (though this object is actually added to that page)
          $this->o_page($this->objects[$this->currentContents]['onPage'],'content',$id);
        }
        break;
      case 'even':
        $this->addLooseObjects[$id]='even';
        $pageObjectId=$this->objects[$this->currentContents]['onPage'];
        if ($this->objects[$pageObjectId]['info']['pageNum']%2==0){
          $this->addObject($id); // hacky huh :)
        }
        break;
      case 'odd':
        $this->addLooseObjects[$id]='odd';
        $pageObjectId=$this->objects[$this->currentContents]['onPage'];
        if ($this->objects[$pageObjectId]['info']['pageNum']%2==1){
          $this->addObject($id); // hacky huh :)
        }
        break;
    }
  }
}

function addInfo($label,$value=0){
  // this will only work if the label is one of the valid ones.
  // modify this so that arrays can be passed as well.
  // if $label is an array then assume that it is key=>value pairs
  // else assume that they are both scalar, anything else will probably error
  if (is_array($label)){
    foreach ($label as $l=>$v){
      $this->o_info($this->infoObject,$l,$v);
    }
  } else {
    $this->o_info($this->infoObject,$label,$value);
  }
}

function setPreferences($label,$value=0){
  // this will only work if the label is one of the valid ones.
  if (is_array($label)){
    foreach ($label as $l=>$v){
      $this->o_catalog($this->catalogId,'viewerPreferences',array($l=>$v));
    }
  } else {
    $this->o_catalog($this->catalogId,'viewerPreferences',array($label=>$value));
  }
}

function addJpegFromFile($img,$x,$y,$w=0,$h=0){
  // attempt to add a jpeg image straight from a file, using no GD commands
  // note that this function is unable to operate on a remote file.
  $tmp=getimagesize($img);
  $imageWidth=$tmp[0];
  $imageHeight=$tmp[1];
    
  if ($w<=0 && $h<=0){
    return;
  }
  if ($w==0){
    $w=$h/$imageHeight*$imageWidth;
  }
  if ($h==0){
    $h=$w*$imageHeight/$imageWidth;
  }

  if (!file_exists($img)){
    return;
  }

  $fp=fopen($img,'r');
  $data = fread($fp,filesize($img));
  fclose($fp);

  $this->addJpegImage_common($data,$x,$y,$w,$h,$imageWidth,$imageHeight);
}

function addImage(&$img,$x,$y,$w=0,$h=0,$quality=75){
  // add a new image into the current location, as an external object
  // add the image at $x,$y, and with width and height as defined by $w & $h
  
  // note that this will only work with full colour images and makes them jpg images for display
  // later versions could present lossless image formats if there is interest.
  
  // there seems to be some problem here in that images that have quality set above 75 do not appear
  // not too sure why this is, but in the meantime I have restricted this to 75.  
  if ($quality>75){
    $quality=75;
  }

  $imageWidth=imagesx($img);
  $imageHeight=imagesy($img);
  
  if ($w<=0 && $h<=0){
    return;
  }
  if ($w==0){
    $w=$h/$imageHeight*$imageWidth;
  }
  if ($h==0){
    $h=$w*$imageHeight/$imageWidth;
  }
  
  // gotta get the data out of the img..

/*
  // wanted to use this output buffering code, but it doesn't seem to work and I get an 
  // header sent error message which balses everything up. not sure why this is.
  ob_start();
  imagejpeg($img,'',$quality);
  $data=ob_get_contents();
  ob_end_clean();
*/  

  // so I write to a temp file, and then read it back.. soo ugly, my apologies.
  $tmpDir='/tmp';
  $tmpName=tempnam($tmpDir,'img');
  imagejpeg($img,$tmpName,$quality);
  $fp=fopen($tmpName,'r');
  $data = fread($fp,filesize($tmpName));
  fclose($fp);
  unlink($tmpName);
  $this->addJpegImage_common($data,$x,$y,$w,$h,$imageWidth,$imageHeight);
}

function addJpegImage_common(&$data,$x,$y,$w=0,$h=0,$imageWidth,$imageHeight){
  // note that this function is not to be called externally
  // it is just the common code between the GD and the file options
  $this->numImages++;
  $im=$this->numImages;
  $label='I'.$im;
  $this->numObj++;
  $this->o_image($this->numObj,'new',array('label'=>$label,'data'=>$data,'iw'=>$imageWidth,'ih'=>$imageHeight));

  $this->objects[$this->currentContents]['c'].="\nq";
  $this->objects[$this->currentContents]['c'].="\n".$w." 0 0 ".$h." ".$x." ".$y." cm";
  $this->objects[$this->currentContents]['c'].="\n/".$label.' Do';
  $this->objects[$this->currentContents]['c'].="\nQ";
}

}

?>

๑۩۞۩๑Let the Carnage Begin!!๑۩۞۩๑


#5 Stormbringer

Stormbringer

    I'd love to stay with you all

  • Ex-Admins
  • 2927 posts
  • Sexo:Não informado
  • Localidade:Goiânia - GO
  • Interesses:Atualmente: pesquisa e desenvolvimento de web-games

Posted 13/06/2003, 14:56

e finalmente:


coloque esses arquivos no seu servidor... aqui vai um scriptzinho que fiz pra testar a classe:

<?
$path_globales = "../../fonte_faturamento/globales";
$path_classes = "../../fonte_faturamento/classes";
include("$path_classes/class_filesaver.php");

include('class.ezpdf.php');



// Iniciando o pdf
$pdf =& new Cezpdf('a4','portrait');
$pdf->ezSetMargins(10,10,10,10);
$pdf->selectFont('./fonts/Helvetica');

//Configuração de linhas orizontais e verticais
$pdf->line(30,800,540,800); // primeira linha vertical
$pdf->line(30,530,540,530); // ultima linha vertical
$pdf->line(540,800,540,530); // primeira linha horizontal
$pdf->line(30,800,30,530); // segunda linha horizontal

// Cabeçalho
$pdf->selectFont('./fonts/Helvetica-Bold');
$pdf->addTextWrap(-10,785,540,12,'Texto texto','right'); // Gera um texto com alinhamento.


//linhas verticais
$pdf->line(30,780,540,780);
$pdf->line(30,765,540,765);
$pdf->line(30,750,540,750);
$pdf->line(30,650,540,650);
$pdf->line(30,610,540,610);
$pdf->line(30,570,540,570);
$pdf->line(30,550,540,550);


//labels 
$pdf->addText(35,770,10,'Cód. Prestador: ');
$pdf->addText(35,755,10,'N° do sinistro: ');
$pdf->addText(35,735,10,'Origem do Prestador: ');
$pdf->addText(280,735,10,'Prefixo da Empresa: ');
$pdf->addText(35,720,10,'Posição do Prestador: ');
$pdf->addText(35,700,10,'Cód. Beneficiário: ');
$pdf->addText(35,680,10,'Situação da Glosa: ');
$pdf->addText(280,680,10,'Tipo do Atendimento: ');
$pdf->addText(35,660,10,'Tipo de Internação: ');
$pdf->addText(280,660,10,'Data Exec.: ');
$pdf->addText(35,635,10,'Cód. Serviço.: ');
$pdf->addText(250,635,10,'Quantidade: ');
$pdf->addText(35,620,10,'Emergencia: ');
$pdf->addText(35, 595,10,'Cód. CID:');
$pdf->addText(35, 580,10,'Cód. Glosa: ');
$pdf->addText(250, 580,10,'Guia de Remessa: ');
$pdf->addText(35, 555,10,'Nº CRM: ');
$pdf->addText(250, 555,10,'Nº Senha:');
$pdf->addText(35, 535,10,'Valor Informado:');
$pdf->addText(250, 535,10,'Valor Liberado:');

// Gera o arquivo pdf
$filename = "glosa_".$id_docto.".pdf";
$content  = $pdf->ezOutput();
$fs       = new filesaver($filename,$content);
$fs->generate();
?>

quanto as fontes... bom, no linux tem as fontes, com extensão afm
ñ sei se rola direito no windows.

ah, usei mais uma classe pra gravar o arquivo... aqui está ela: class_filesaver.php
<?
// class_filesaver.php EXTENDS: NONE Abstract: NO
// AUTHOR: Luis Argerich.
//
// Given a string data makes the browser prompt the user to save the data as a file.
//
// Takes 2 arguments to construct:
// $filename Name of the file to save
//      $content  Content to save
//
// generate()   Generates the content (DONT SEND HEADERS BEFORE generate() )
 

class filesaver {
  var $content;
  var $file;
 
  function filesaver($filename,$content) {
    $this->content=$content;
    $this->file=$filename;
  }
 
  function generate() {
    header("Content-type: unknown");
    header( "Content-Disposition: attachment; filename=$this->file" );
    echo "$this->content";    
  }
 
}
?>


bom, acho que agora vc jah tem por onde começar :D
abraços

๑۩۞۩๑Let the Carnage Begin!!๑۩۞۩๑


#6 _MELO_

_MELO_

    Normal

  • Usuários
  • 117 posts
  • Sexo:Masculino
  • Localidade:Porto Alegre - RS. Argentina.
  • Interesses:PHP, JavaScript, Ajax, pl/pgSQL e PostgreSQL.

Posted 14/06/2003, 14:30

Bahhh o meu, comecei a l"e e soh dava risada q lata, peso de extenso!!!
Bom.... acho que naum preciso nem dizer o qnt eu to grato pelo cohdigo neh!!!! Brigadaum mesmo meu vehio.. qualqueh coisa eh soh prende o berro.
Vou implementar e depois te dou um retorno c deu tudu certinho, valeu mesmo. :D
Alexandre Melo

#7 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 13201 posts

Posted 16/10/2017, 23:32

Propecia 1mg Side Effects Buy Accutane In Usa30 Mg Accutane From Canada Online Cytotec 200 Microgrammes Comprime Secable viagra Efectos Secundarios Del Cialis Medications Cephalexin T
Viagra Depoxetine reputable online levitra Amoxil 250mg
Cialis E Ulcera Flovent cialis Online Pharmac Naproxen And Amoxicillin Allergy Women Cialis Reviews

#8 fapedlok

fapedlok

    Ativo

  • Usuários
  • 341 posts
  • Sexo:Masculino
  • Localidade:Brisbane

Posted 17/10/2017, 10:18

Discounts! latest beauty products 2017 progect12.jpg Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked! If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included). buy.png READ MORE Dikki, Dejl360 lace frontal with bundle brazilian virgin hair body wave with frontal closure 360 frontal with 3 bundles with lace closure ( 150.70 $)Hot ! high quality new winter fashion men's coat, men's jackets, men's leather jacket free shipping ( 83.72 $)Doneckoe upravlenie. Specialnij reportazh Yulii MakarovojPeres, Roziredmi note 3 pro prime flip cases for Xiaomi Redmi Note 3 Pro case cover phone accessories for xiaomi Redmi Note 3 IMUCA Cover ( 11.82 $)Full Lace Human Hair Wigs With Baby Hair Remy Lace Front Human Hair Wigs for Black Women Glueless Lace Frontal Natural Hair Wigs ( 88.00 $)2016 spring autumn new fashion skinny slim thin high elastic waist washed jeans jeggings pencil pants ( 13.80 $)Indian curly virgin hair 3 bundles indian virgin hair deep curly raw indian hair deep wave wet and wavy human hair bundles weave ( 51.30 $)CP-GP0025 Compact 90 Degree Elbow Mount ( $2.75 )Ben-Gur (film, 1959)Cubot CHEETAH 2 Android 6.0 5.5 inch 4G Phablet MTK6753 Octa Core 1.3GHz 3GB RAM 32GB ROM 8.0MP + 13.0MP Fingerprint Scanner Type-C$OUKITEL C3 8GB 3G WCDMA Phone 3D Diamond Cover 5.0''Android 6.0 MT6580 Quad Core 1.3GHz RAM 1GB 1280720 Smartphone 5 Colors ( 64.69 $)Mother of Pearl and Brass Horn Cufflinks ( 110.00 $)Foream Compass 1080P 8.0MP Mini WiFi Action Camera Camcorder 119.00$ 71bb.jpg
Discounts! must have 2017

progect12.jpg
Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked!
If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included).

buy.png

READ MORE
8a full lace human hair wigs for black women glueless lace front wig brazilian virgin hair straight lace front human hair wigs ( 78.69 $)
Putin critic gunned down in Ukraine
50 Blue Daisy , Blue Cineraria easiest growing flower, hardy plants flower seeds exotic ornamental for garden ( 0.99 $)
Anmuka 100pcs 4cm 0 19g soft lure red worms earthworm fishing baits worms trout fishing lures ( 1.99 $)
3pcs MIPOW BTL300 — 3 Bluetooth 4.0 Flameless Candle Lamp-49.99 $
Yoga balance training ball fitness weight loss stovepipe explosion-proof hemisphere ball elastic instruments fedex freedrop ( 142.50 $)
Junsun 7 inch hd car gps navigation fm 8gb 256m ddr map free upgrade navitel europe sat nav truck gps navigators automobile ( 70.13 $)
Mink brazilian virgin hair body wave 3 bundles unprocessed human hair extensions annabelle hair 7a brazilian ( 60.42 $)
Cute cartoon fashion cute puppy zipper long wallet cartoon dog 6 colors pu leather women wallets ( 26.77 $)
7A Brazilian Virgin Hair Body Wave 4 Bundles Brazilian Body Wave Unprocessed Brazilian Hair Weave Bundles Human Hair Weave ( 49.00 $)
Men Dress Shirt Hawaii Casual Camisa Slimming Social Masculina Para Hombre Vestir Brand Clothing Chemise Vetement Homme 8098 ( 6.99 $)
Good useful travel portable toothbrush toothpaste storage box cover protect case ( 1.03 $)
Creative Skull Design Crystal Transparent Glass Cup-3.43 $
New Hot European style Women crocodile pattern Doctor Backpack 2016 Ladies Famous HASP Belt bags Women's PU leather rucksack bag ( 38.99 $)
Dejli, Den


117bb.jpg
Discounts! best beauty care products

progect12.jpg
Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked!
If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included).

buy.png

READ MORE
Alluring strapless floral print women's bikin set ( 10.39 $)
Successo Black Stainless Steel Case and Leather Strap Mens Chrono Watch ( 197.00 $)
Raffaello Dark Gray Leather Slip On Shoe ( 99.00 $)
Televizionnij sezon 2013/14 (SShA)
P001 Blank Tattoo Simulation Practice Skin Tattoo Accessories ( $1.71 )
New Cartoon Cats Printed Female Shopping Tote Bag Big Canvas Handbag Women's One Shoulder Crossbody Bag Portable Student Bookbag ( 9.90 $)
Car-styling liquid glass coating rain and water repel nano hydrophobic coating car windshield self cleaner ( 76.00 $)
D plus b cobalt blue high top suede sneaker ( 171.50 $) D Acquasparta
Luxor Navy Blue Haircalf Sneaker ( 157.50 $)
New 2016 brand clothing fitness compression shirt men superman bodybuilding long sleeve 3d t shirt crossfit super tops shirts ( 13.80 $)
Peashooter PVZ Shooter Calabash Educational Toy Safe Game Plant + Zombie + 3 Ball Set ( $2.79 )
Original Xiaomi QiCYCLE — EF1 Smart Bicycle-936.02 $
Vernee Thor 4G Smartphone-119.99 $
Color block splicing design turn-down collar short sleeve cotton+linen men's polo t-shirt ( 14.26 $)
2016 new fashion jewelry gold silver fallen leaves stud earrings for women vintage leaf earrings gifts ( 0.99 $)


40.jpg

#9 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 18/10/2017, 01:10

Buy Online cialis price Legally Levaquin Where To Buy Discount Overnight Shipping Isotretinoin in internet Cheap Amoxil Buy

#10 iapedlok

iapedlok

    Expert

  • Usuários
  • 538 posts
  • Sexo:Feminino
  • Localidade:Balaclava

Posted 18/10/2017, 15:17

Discounts! best consumer product websites progect11.jpg Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked! If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included). buy.png READ MORE Best peruvian straight virgin hair 4 bundles queen like hair products human hair weave unprocessed peruvian ( 65.00 $)Donald Tramp… (Video)Hot Selling Fix It Pro Clear Car Scratch Repair Pen Simoniz Clear Coat Applicator Auto Paint Pen Car Styling Paint Pens ( 1.90 $)Top quality 24 frets maple inlay bird electric guitar neck rosewood fingerboard guitar parts musical instruments accessories ( 111.60 $)Original Xiaomi Mi Rabbit Bluetooth 4.0 Wireless Speaker $26.231PCS Skid Resistance Body Sponge Bath Massage Of Shower Bath Scrub Gloves Shower Exfoliating Bath Gloves Shower Scrubber Cuozao ( 1.24 $)Richardson, MirandaStylish hooded letters printing striped color matching long sleeves men's hoodie ( 25.67 $)Cobbler Legend Brand Designer Men's Shoulder Bags Genuine Leather Business Bag 2016 New High Quality Handbags For Men #109171 ( 68.00 $)4M 3 Modes Flexible EL Wire for Halloween Party 4.39$Auxmart h1h4h7h11h1390059006 cob 72w led car headlight bulbs 6500k 8000lm headlight all-in-one hi-losingle beam fog lamps ( 26.39 $)Silicone Watch Strap for Xiaomi Miband 2 ( $2.17 )Eastnights 2016 handbag fashion genuine leather women shoulder bag messenger bag ladies crossbody bag bolsas femininas ( 43.72 $)Blue and yellow striped cotton slim fit mens shirt ( 50.82 $) ForzieriZoeva 12pcs Rose Golden Complete Eye Set 142 224 226 227 228 230 231 234 237 315 317 322 makeup brush sets with case ( 11.99 $) 7bb.jpg
Discounts! top best makeup products

progect11.jpg
Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked!
If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included).

buy.png

READ MORE
Naivety 2016 new fashion women canvas handbags striped totes bags jun7u drop shipping ( 6.73 $)
New arrival zoeva 8pcs makeup brushes professional rose golden luxury set brand make up tools kit ( 9.91 $)
Solid silk pre-tied bowtie ( 82.38 $) Versace
Brazilian deep wave 3 bundles brazilian virgin hair 7a grade cheap deep wave brazilian hair curly weave human hair extensions ( 115.02 $)
Ulefone Power 6050mAh Android 6.0 5.5 inch 4G Phablet FHD 2.5D Screen MTK6753 64bit Octa Core 1.3GHz Fingerprint Scanner 3GB RAM 16GB ROM 5.0MP + 13.0MP Cameras 168.59$
Zmodo 720P HD Small WiFi Camera-39.99 $
20 pieceslot zb pain relief orthopedic plasters pain relief plaster medical muscle aches pain relief patch muscular fatigue ( 30.00 $)
Slide Wallet Credit Card Slot Phone Case For Samsung Galaxy S3 S4 S5 S6 S7 S7 Edge NOTE 5 7 A5 A7 J5 J7 Grand Core Prime Covers ( 4.59 $)
Grade 7a peruvian virgin hair straight 3 bundles human hair peruvian straight virgin hair 8 ( 45.00 $)
Man sports running shoes flat trendy walking shoes korean cheap breathable comfortable trainers outdoor lightweight sneakers ( 36.35 $)
Sequins silver fabric sneaker ( 147.11 $) Pinko
1PC GT MTB bike Guard Cover Pad Bicycle accessories Bicycle Chain Care Stay Retain Post Protector Chain Protective cover Parts ( 0.99 $)
Stylish high waist tribal print skirt for women ( 16.35 $)
Walkera F210 5.8G FPV Quadcopter RTF-399.00 $
Spare Carbon Fiber Tube for Wltoys V686 / 686G / 686J / 686K JJRC V686G RC Quadcopter ( $0.99 )


244.jpg
Discounts! best makeup buys 2017

progect11.jpg
Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked!
If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included).

buy.png

READ MORE
Ulefone Be Touch 3 4G Phablet-149.14 $
Vernee Apollo Lite 5.5 inch 4G+ Phablet Android 6.0 MTK6797 Deca Core 4GB RAM 32GB ROM 16.0MP Main Camera Corning Gorilla Type-C Fingerprint Sensor 258.79$
Fashionable round neck long sleeve striped see-through women's bodysuit ( 12.09 $)
EUUSUKAU Power Supply Adapter Transformer AC 110-240V to DC 5V 12V 24V 1A 2A 3A 4A 5A 6A 7A 8A 10ALED Strips Light Converter ( 2.50 $)
ESP8266 Serial WiFi Wireless Module ( $2.89 )
Anti - explosion Bicycle Sunglasses Eyewear Anti - UV Goggle Eye Protector Cycling Necessaries ( $2.43 )
Xiaomi Mi5s 4G Smartphone-394.87 $
Brazilian Virgin Hair Fummi Afro Kinky Curly Hair Bob Short Human Hair Weave bundles Aunty Funmi Bouncy Curls Spiral Curl Weave ( 55.00 $)
Stylish flat heel and cross straps design women's sandals ( 28.37 $)
Hot 2017 Fashion Women Belts Luxury PU Leather Pin Buckle Belt Women Casual All-Match Embossed Popular Ladies Belt 110-115CM ( 9.78 $)
Kanningem, Liam
BlueStacks skachat besplatno BlueStacks 2.6.105.7902
Red and Black Quilted Wallet On Chain ( 132.00 $)
Black grainy leather large tote bag ( 346.64 $) Versace Collection
Rosa hair products brazilian body wave 3 bundles 7a virgin brazilian hair unprocessed body wave brazilian hair weave bundles ( 56.00 $)


13bb.png
Discounts! product progect11.jpg Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked! If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included). buy.png READ MORE Multi Color Liquid Lipstick Hot Brand Makeup Lips Lasting Elegant Smooth Lipsticks Batom Sexy Sweet girl Lip Lipstick Beauty D13 ( 1.24 $)8a brazilian deep wave virgin hair brazilian hair human hair weave brazilian virgin hair 4 bundles cheap brazilian curly virgin ( 86.50 $)Car Seat Covers Seat Sleep Aid Head Support Belt Eliminates Pressure for Toddler Kids Children Auto Styling Safest ( 4.61 $)Swing Low, Sweet Rugby Controversy?SQ8 Mini DV Camera 1080P Full HD Car DVR-14.16 $FENASY charm Shell design Pearl Jewelry,Pearl Necklace Pendant, 925 sterling silver jewelry ,fashion necklaces for women 2016 ( 65.00 $)2016 new 1pcs dc12v to ac 220v110v 200w300w500w800w1000w car auto power inverter converter adaptor with two usb for car ( 21.44 $)Motospeed K87S Mechanical Keyboard ( 48.99 $)MG995 Digital Metal Gear RC Car Robot 55G Servos for DIY Projects ( $5.69 )Spare Fitting Light Cover Set for JJRC H12C RC Quadcopter - 5Pcs / Set ( $0.66 )New 2016 Kawaii Cartoon Elsa The First Children Plush Coin Purse Zip Change Purse Wallet Kids Girl Women For Gift ( 1.09 $)Doroga v MarokkoLEAGOO Elite 4 Original View Window Protective Case ( $7.58 )WLXY KL - 138 Portable LCD Display Mini Electronic Balance Digital Jewelry Pocket Scale ( $6.85 )Moschino Signature Print Navy Blue Twill Silk Narrow Tie ( 54.60 $) 18.jpg
Discounts! best new hair products 2017

progect11.jpg
Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked!
If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included).

buy.png

READ MORE
Top quality inlay led dots rosewood fretboard canadian maple electric guitar neck wholesale guitar parts accessories ( 101.37 $)
Cute peacock print high waist one-piece dress swimwear for women ( 16.05 $)
Hot sale new synthetic wigs 26 ( 22.80 $)
Black leather tote bag ( 936.16 $) Roberto Cavalli
UMi Z 4G Phablet-290.99 $
SJ X300 - 2C RC Quadcopter-46.49 $
Women formal pants 2016 winter high waisted outer wear women female fashion slim warm thick down pants trousers skinny cs1 ( 25.65 $)
GM320 Infrared Thermometer-9.10 $
7 inch monitor handfree video door phone intercom doorbell camera kits 1 camera 1 monitor night vision call and intercom ( 101.36 $)
Ali moda Hair 3 Bundles Hot 7a Brazilian Virgin Hair Ms Lula Hair brizilian body Wave Grace Hair Extensions Cheap Luvin bodywave ( 40.11 $)
Umi Max 4G Phablet-187.60 $
2016 best selling car dvr registrator dash camera cam night vision min car dvrs digital video recorder g-sensor detector ( 25.70 $)
Remy clip human 26 inch color 2 human remy hair clip in extensions body wave human ( 27.97 $)
Beelink GT1 Ultimate TV Android HD Box ( 72.99 $)
1 Piece CAMEWIN Brand Knee Support Knee Protector Prevent Arthritis Injury High Elastic Kneepad Sports Knee Gurad Keep Knee Warm ( 7.80 $)


104bb.png

#11 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 13201 posts

Posted 22/11/2017, 07:15

Doctissimo Kamagra In Linea What Is Keflex For Keflex For Urinary Bladder Infection viagra cialis Amoxicillin And Tinnitus Sie Effect

#12 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 29/11/2017, 08:01

Pflanzliches Viagra Nebenwirkungen levitra 20mg best price Viagra 100mg Filmtabletten Apotheke
Erfahrungsbericht Viagra Rezeptfrei Generic Dutasteride On Line Discount Mastercard Accepted Shop Lambert Fish Amoxicillin viagra Cialis 20mg No 12
Commander Du Cytotec Amoxicillin And Cost viagra Buy Antidepressants Online In Uk Discount Bentyl Amoxicillin High Dose
Buy now isotretinoin claravis Description Of The Drug Fluconazole 100mg viagra United Pharmacies Propecia Side Effects Amoxicillin In Canines
Propecia Generico En Madrid buy levitra generic online Viagra Apotheke Versand Viagra Duree Efficacite Order Tiniclazole Online Usa
Doxycycline From Canada Buy Viagra Canada Viagra 71 Ans levitra overnight delivery Generic Sildenafil Citrate For Sale
Como Tomar El Viagra Amoxicillin Lab Faq viagra cialis Purchase Tadalafil Online Prix Cialis Tunisie Cialis Kaufen In Der Schweiz
Amoxicillin And Clavulante Que Es Cialis Cialis Rezept Falschen viagra Comprare Cialis Generico In Italia
Kamagra Cost Cialis Generico Con Postepay viagra prescription Venlafaxin Online Bestellen
Clomid Accident Fausse Couche Acheter Amoxil Pharmacie Canadian Farmacy cialis buy online Erfahrung Mit Cialis Soft Tabs Genericos De Propecia 1 Mg
Progesterone 300mg Without Rx Pharm Suppoet Group Canada cialis Fiabilidad Propecia Zithromax Dry Eye
Viagra Farmacia Acquisto Propecia De Por Vida viagra online pharmacy Generic Doxycycline Internet Website Cephalexin 250 Mg Price
Propecia Hsa Cialis Clobetasol Temovate In Us Direct levitra 100mg guaranteed lowest price Dutasteride Duprost Londonderry Where To Get Antabuse In Massachusetts
Viagra Acheter Pharmacie Cheap Kamagra Soft Tabs buy cialis Where To Purchase Progesterone By Money Order Buy Keflex Online Levitra Cialis Ou Viagra

#13 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 30/11/2017, 07:04

Lasix No Prescription Overnight Mambo 36 Kamagra En Valencia buy viagra online Buy Ramapril Without Prescription
Buying Macrobid 100mg Free Shipping In Internet Priligy Precio En Venezuela Levitra Pour Homme cialis Viagra Achat Sans Ordonnance Orlistat Weight Loss Cialis Ventajas Desventajas
Andrologia Levitra Cialis Pills Cheapest Cialis Nedeland cialis Buy Isotretinoin Online Cephalexin 500mg Capsule Side Effects Propecia Generica Online
Commander Kamagra 100mg Productos Con Kamagra buy brand name accutane viagra Cialis 10 Ou 20 Mg Will Keflex Treat Gonorreah
Where Can I Buy Cyotec In The Us Doryx Overnight Shipping order generic worldwide isotretinoin 10mg tablet usa buy viagra online Cheapest Price Propecia Cheap
Doxycycline 150 Mg Sale Cialis Generico Consegna 24 Ore Generic Hydrochlorothiazide Kidney Disease Medicine Low Price Shop cialis Clomid Maladie De Ventre
Propecia Disefoto cialis viagra levitra kaufen rezeptfrei Viagra Y Testosterona Levitra Professional Overnight Delivery
Propecia Barato Venta Buy Amitriptyline 50mg Kamagra Tablets cialis Buy Accutane Canada
Canadian Online Drugs buy viagra Purchasing Discount Secure Ordering Macrobid Medicine Direct Fedex
Propecia Dosage In Women Propecia Menopause buy cialis Buy Amoxicillin Antibodics Online Canada Zithromax Picture Viagra El Mejor
Zithromax For Kidney Infection viagra prescription Abuse Propecia And Rogaine
Propecia Brust Rogaine Con Propecia cialis Buy Viagra Usa Html Sale Generic Pyridium Tab Free Shipping Dumfries
1767 Buy Clonidine Overnight Vardenafil Warnings Generique Baclofen 10mg viagra online Achat Cialis Usa Mexican Pharmacies That Ship Propecia Molestia Testicular
Valtrex X Zovirax viagra cialis Ou Acheter Du Cialis Sur Le Net Priligy Dapoxetina Direct Isotretinoin Where To Order Medication Without Rx West Lothian
100 Mg Viagra Price Amoxicillin 2000mg Dosage viagra 5129.1 Buy Cialis Online Usa
Cialis Original De La India cialis Tadalafil 40 Mg Dose Viagra E Hipertension Arterial
Priligy Precio En Chile Cialis Cheapest viagra Nolvadex Homme

#14 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 15385 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 04/12/2017, 10:01

Viagra Cialis Acheter Clomid Comment Se Prendre Flos Medicinae viagra Cialis Romania Site Cialis Generique
Viagra Maschile Nonprescription Levitra Levitra Eating viagra cialis Viagra Non Generique Keflex Sunscreen
Foto Levitra 10 Mg online pharmacy Cialis Genrico Canada
World Pharmacy Store viagra prescription Levitra Pharmacie Sans Ordonnance
Pak viagra online pharmacy Order Now On Line Bentyl 20mg Price Overseas Cialis Stripes Kaufen
Viagra Et Performance Viagra Y Ciclismo generic viagra Progesterone 400mg Purchase Tab Visa Acheter Du Cytotec Cialis In Turkei Kaufen




0 user(s) are reading this topic

0 membro(s), 0 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq