| @@ 170-225 (lines=56) @@ | ||
| 167 | /** |
|
| 168 | * pBuildDACCE |
|
| 169 | */ |
|
| 170 | private function pBuildDACCE() |
|
| 171 | { |
|
| 172 | $this->pdf = new Pdf($this->orientacao, 'mm', $this->papel); |
|
| 173 | if ($this->orientacao == 'P') { |
|
| 174 | // margens do PDF |
|
| 175 | $margSup = 2; |
|
| 176 | $margEsq = 2; |
|
| 177 | $margDir = 2; |
|
| 178 | // posição inicial do relatorio |
|
| 179 | $xInic = 1; |
|
| 180 | $yInic = 1; |
|
| 181 | if ($this->papel == 'A4') { // A4 210x297mm |
|
| 182 | $maxW = 210; |
|
| 183 | $maxH = 297; |
|
| 184 | } |
|
| 185 | } else { |
|
| 186 | // margens do PDF |
|
| 187 | $margSup = 3; |
|
| 188 | $margEsq = 3; |
|
| 189 | $margDir = 3; |
|
| 190 | // posição inicial do relatorio |
|
| 191 | $xInic = 5; |
|
| 192 | $yInic = 5; |
|
| 193 | if ($this->papel == 'A4') { // A4 210x297mm |
|
| 194 | $maxH = 210; |
|
| 195 | $maxW = 297; |
|
| 196 | } |
|
| 197 | } // orientação |
|
| 198 | ||
| 199 | // largura imprimivel em mm |
|
| 200 | $this->wPrint = $maxW - ($margEsq + $xInic); |
|
| 201 | // comprimento imprimivel em mm |
|
| 202 | $this->hPrint = $maxH - ($margSup + $yInic); |
|
| 203 | // estabelece contagem de paginas |
|
| 204 | $this->pdf->aliasNbPages(); |
|
| 205 | // fixa as margens |
|
| 206 | $this->pdf->setMargins($margEsq, $margSup, $margDir); |
|
| 207 | $this->pdf->setDrawColor(0, 0, 0); |
|
| 208 | $this->pdf->setFillColor(255, 255, 255); |
|
| 209 | // inicia o documento |
|
| 210 | $this->pdf->open(); |
|
| 211 | // adiciona a primeira página |
|
| 212 | $this->pdf->addPage($this->orientacao, $this->papel); |
|
| 213 | $this->pdf->setLineWidth(0.1); |
|
| 214 | $this->pdf->setTextColor(0, 0, 0); |
|
| 215 | // montagem da página |
|
| 216 | $pag = 1; |
|
| 217 | $x = $xInic; |
|
| 218 | $y = $yInic; |
|
| 219 | // coloca o cabeçalho |
|
| 220 | $y = $this->pHeader($x, $y, $pag); |
|
| 221 | // coloca os dados da CCe |
|
| 222 | $y = $this->pBody($x, $y + 15); |
|
| 223 | // coloca o rodapé |
|
| 224 | $y = $this->pFooter($x, $y + $this->hPrint - 20); |
|
| 225 | } |
|
| 226 | ||
| 227 | /** |
|
| 228 | * pHeader |
|
| @@ 172-227 (lines=56) @@ | ||
| 169 | /** |
|
| 170 | * pBuildDACCE |
|
| 171 | */ |
|
| 172 | private function pBuildDACCE() |
|
| 173 | { |
|
| 174 | $this->pdf = new Pdf($this->orientacao, 'mm', $this->papel); |
|
| 175 | if ($this->orientacao == 'P') { |
|
| 176 | // margens do PDF |
|
| 177 | $margSup = 2; |
|
| 178 | $margEsq = 2; |
|
| 179 | $margDir = 2; |
|
| 180 | // posição inicial do relatorio |
|
| 181 | $xInic = 1; |
|
| 182 | $yInic = 1; |
|
| 183 | if ($this->papel == 'A4') { // A4 210x297mm |
|
| 184 | $maxW = 210; |
|
| 185 | $maxH = 297; |
|
| 186 | } |
|
| 187 | } else { |
|
| 188 | // margens do PDF |
|
| 189 | $margSup = 3; |
|
| 190 | $margEsq = 3; |
|
| 191 | $margDir = 3; |
|
| 192 | // posição inicial do relatorio |
|
| 193 | $xInic = 5; |
|
| 194 | $yInic = 5; |
|
| 195 | if ($papel == 'A4') { // A4 210x297mm |
|
| 196 | $maxH = 210; |
|
| 197 | $maxW = 297; |
|
| 198 | } |
|
| 199 | } // orientação |
|
| 200 | ||
| 201 | // largura imprimivel em mm |
|
| 202 | $this->wPrint = $maxW - ($margEsq + $xInic); |
|
| 203 | // comprimento imprimivel em mm |
|
| 204 | $this->hPrint = $maxH - ($margSup + $yInic); |
|
| 205 | // estabelece contagem de paginas |
|
| 206 | $this->pdf->aliasNbPages(); |
|
| 207 | // fixa as margens |
|
| 208 | $this->pdf->setMargins($margEsq, $margSup, $margDir); |
|
| 209 | $this->pdf->setDrawColor(0, 0, 0); |
|
| 210 | $this->pdf->setFillColor(255, 255, 255); |
|
| 211 | // inicia o documento |
|
| 212 | $this->pdf->open(); |
|
| 213 | // adiciona a primeira página |
|
| 214 | $this->pdf->addPage($this->orientacao, $this->papel); |
|
| 215 | $this->pdf->setLineWidth(0.1); |
|
| 216 | $this->pdf->setTextColor(0, 0, 0); |
|
| 217 | // montagem da página |
|
| 218 | $pag = 1; |
|
| 219 | $x = $xInic; |
|
| 220 | $y = $yInic; |
|
| 221 | // coloca o cabeçalho |
|
| 222 | $y = $this->pHeader($x, $y, $pag); |
|
| 223 | // coloca os dados da CCe |
|
| 224 | $y = $this->pBody($x, $y + 15); |
|
| 225 | // coloca os dados da CCe |
|
| 226 | $y = $this->pFooter($x, $y + $this->hPrint - 20); |
|
| 227 | } |
|
| 228 | ||
| 229 | /** |
|
| 230 | * pHeader |
|