当前位置: 首页>>代码示例>>PHP>>正文


PHP TCPDFBarcode::getBarcodePNG方法代码示例

本文整理汇总了PHP中TCPDFBarcode::getBarcodePNG方法的典型用法代码示例。如果您正苦于以下问题:PHP TCPDFBarcode::getBarcodePNG方法的具体用法?PHP TCPDFBarcode::getBarcodePNG怎么用?PHP TCPDFBarcode::getBarcodePNG使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TCPDFBarcode的用法示例。


在下文中一共展示了TCPDFBarcode::getBarcodePNG方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dirname

//
// TCPDF is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with TCPDF.  If not, see <http://www.gnu.org/licenses/>.
//
// See LICENSE.TXT file for more information.
// -------------------------------------------------------------------
//
// Description : Example for tcpdf_barcodes_2d.php class
//
//============================================================+
/**
 * @file
 * Example for tcpdf_barcodes_2d.php class
 * @package com.tecnick.tcpdf
 * @author Nicola Asuni
 * @version 1.0.000
 */
// include 1D barcode class (search for installation path)
require_once dirname(__FILE__) . '/tcpdf_barcodes_1d_include.php';
// set the barcode content and type
$barcodeobj = new TCPDFBarcode('http://www.tcpdf.org', 'C128');
// output the barcode as PNG image
$barcodeobj->getBarcodePNG(2, 30, array(0, 0, 0));
//============================================================+
// END OF FILE
//============================================================+
开发者ID:tcsoftwareaustin,项目名称:vint,代码行数:31,代码来源:example_1d_png.php

示例2: array

                     if ($numRow == 0) {
                         $qty = $_POST['qty'][$key];
                         $sqlGetInbound = $db->get_where('inbound_po', 'inbound_id = ' . $key);
                         $rsGetInbound = $sqlGetInbound->row_array();
                         $data = array('pallet_id' => $updateID, 'po_id' => $rsGetInbound['po_id'], 'inbound_key' => $rsGetInbound['inbound_id'], 'supplier_id' => $rsGetInbound['po_supplier'], 'qty' => $qty, 'create_time' => _DATE_TIME_, 'user_id' => $user_id);
                         $db->insert('inbound_pallet_item', $data);
                     } else {
                         if ($numRow == 1) {
                             $qty = $_POST['qty'][$key] + $rsRow['qty'];
                             $data = array('qty' => $qty);
                             $db->update('inbound_pallet_item', $data, 'id =' . $rsRow['id']);
                         }
                     }
                     $barcode = str_pad($updateID, 10, "0", STR_PAD_LEFT);
                     $barcodeobj = new TCPDFBarcode($barcode, 'C128');
                     $showBarcode = $barcodeobj->getBarcodePNG(2, 30, array(0, 0, 0), $updateID);
                     $back['barcode'] = '
     <span class="detailBarcode" style="text-align: center; line-height:40px;font-size: 16px;float:right;">
         <span class="barcodeImg" style="margin-left:10px; margin-top:10px;">
             <img class="imgBarcode" src="data:image/png;base64,' . $showBarcode . '" style="" />
         </span>
     </span>
 ';
                     //echo $db->last_query();
                 }
                 $back['actionID'] = $updateID;
                 echo json_encode($back);
             } else {
                 if ($_POST['method'] == 'manage_pallet_success') {
                     $palletID = $_POST['palletID'];
                     $db->edit('inbound_pallet', array('pallet_status' => 1, 'confirm_time' => _DATE_TIME_), array('pallet_id' => $palletID));
开发者ID:natcha23,项目名称:wmstm,代码行数:31,代码来源:inbound_action.php

示例3: buildBarCode

 /**
  *	Return an image file on the fly (no need to write on disk)
  *
  *	@param	   string	    $code		      Value to encode
  *	@param	   string	    $encoding	      Mode of encoding
  *	@param	   string	    $readable	      Code can be read
  *	@param	   integer		$scale			  Scale (not used with this engine)
  *  @param     integer      $nooutputiferror  No output if error (not used with this engine)
  *	@return	   int			                  <0 if KO, >0 if OK
  */
 function buildBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0)
 {
     global $_GET;
     $tcpdfEncoding = $this->getTcpdfEncodingType($encoding);
     if (empty($tcpdfEncoding)) {
         return -1;
     }
     $color = array(0, 0, 0);
     $_GET["code"] = $code;
     $_GET["type"] = $encoding;
     $_GET["height"] = $height;
     $_GET["readable"] = $readable;
     if ($code) {
         // Load the tcpdf barcode class
         if ($this->is2d) {
             $height = 3;
             $width = 3;
             require_once TCPDF_PATH . 'tcpdf_barcodes_2d.php';
             $barcodeobj = new TCPDF2DBarcode($code, $tcpdfEncoding);
         } else {
             $height = 50;
             $width = 1;
             require_once TCPDF_PATH . 'tcpdf_barcodes_1d.php';
             $barcodeobj = new TCPDFBarcode($code, $tcpdfEncoding);
         }
         dol_syslog("buildBarCode::TCPDF.getBarcodePNG");
         $barcodeobj->getBarcodePNG($width, $height, $color);
         return 1;
     } else {
         return -2;
     }
 }
开发者ID:NoisyBoy86,项目名称:Dolibarr_test,代码行数:42,代码来源:tcpdfbarcode.modules.php

示例4: TCPDFBarcode

</td>
                            <td>
                                <button onclick="$.managePallet(<?php 
    echo $arr['pallet_id'];
    ?>
)">จัดการ</button>
                            </td>
                        </tr>
                        <div id="barcode<?php 
    echo $arr['pallet_id'];
    ?>
" style="display: none;">
                            <?php 
    $barcode = str_pad($arr['pallet_id'], 10, "0", STR_PAD_LEFT);
    $barcodeobj = new TCPDFBarcode($barcode, 'C128');
    $showBarcode = $barcodeobj->getBarcodePNG(2, 30, array(0, 0, 0), $arr['pallet_id']);
    echo '
                                <span class="detailBarcode" style="text-align: center; line-height:40px;font-size: 16px;float:right;">
                                    <span class="barcodeImg" style="margin-left:10px; margin-top:10px;">
                                        <img class="imgBarcode" src="data:image/png;base64,' . $showBarcode . '" style="" />
                                    </span>
                                </span>
                            ';
    ?>
                        </div>
                <?php 
}
?>
                </tbody>
            </table>
        </div>
开发者ID:natcha23,项目名称:wmstm,代码行数:31,代码来源:pallet_manage.php


注:本文中的TCPDFBarcode::getBarcodePNG方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。