當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PDF_Common::get_pdf_filename方法代碼示例

本文整理匯總了PHP中PDF_Common::get_pdf_filename方法的典型用法代碼示例。如果您正苦於以下問題:PHP PDF_Common::get_pdf_filename方法的具體用法?PHP PDF_Common::get_pdf_filename怎麽用?PHP PDF_Common::get_pdf_filename使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PDF_Common的用法示例。


在下文中一共展示了PDF_Common::get_pdf_filename方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: generate_pdf_parameters

 public static function generate_pdf_parameters($index, $form_id, $lead_id, $template = '')
 {
     global $gfpdf;
     $config = $gfpdf->configuration[$index];
     $pdf_name = isset($config['filename']) && strlen($config['filename']) > 0 ? $gfpdf->get_pdf_name($index, $form_id, $lead_id) : PDF_Common::get_pdf_filename($form_id, $lead_id);
     $template = isset($template) && strlen($template) > 0 ? $template : $gfpdf->get_template($index);
     $pdf_size = isset($config['pdf_size']) && (is_array($config['pdf_size']) || strlen($config['pdf_size']) > 0) ? $config['pdf_size'] : PDFGenerator::$default['pdf_size'];
     $orientation = isset($config['orientation']) && strlen($config['orientation']) > 0 ? $config['orientation'] : PDFGenerator::$default['orientation'];
     $security = isset($config['security']) && $config['security'] ? $config['security'] : PDFGenerator::$default['security'];
     $premium = isset($config['premium']) && $config['premium'] === true ? true : false;
     /* added in v3.4.0 */
     $dpi = isset($config['dpi']) && (int) $config['dpi'] > 0 ? (int) $config['dpi'] : false;
     /* added in v3.4.0 */
     $pdfa1b = isset($config['pdfa1b']) && $config['pdfa1b'] === true ? true : false;
     /* added in v3.4.0 */
     $pdfx1a = isset($config['pdfx1a']) && $config['pdfx1a'] === true ? true : false;
     /*
      * Validate privileges 
      * If blank and security is true then set privileges to all
      */
     $privileges = isset($config['pdf_privileges']) ? $gfpdf->validate_privileges($config['pdf_privileges']) : $gfpdf->validate_privileges('');
     $pdf_password = isset($config['pdf_password']) ? PDF_Common::do_mergetags($config['pdf_password'], $form_id, $lead_id) : '';
     $master_password = isset($config['pdf_master_password']) ? PDF_Common::do_mergetags($config['pdf_master_password'], $form_id, $lead_id) : '';
     $rtl = isset($config['rtl']) ? $config['rtl'] : false;
     $form = RGFormsModel::get_form_meta($form_id);
     $lead = RGFormsModel::get_lead($lead_id);
     /*
      * Run the options through filters
      */
     $pdf_name = apply_filters('gfpdfe_pdf_name', $pdf_name, $form, $lead);
     $template = apply_filters('gfpdfe_template', $template, $form, $lead);
     $orientation = apply_filters('gfpdf_orientation', $orientation, $form, $lead);
     $security = apply_filters('gfpdf_security', $security, $form, $lead);
     $privileges = apply_filters('gfpdf_privilages', $privileges, $form, $lead);
     $pdf_password = apply_filters('gfpdf_password', $pdf_password, $form, $lead);
     $master_password = apply_filters('gfpdf_master_password', $master_password, $form, $lead);
     $rtl = apply_filters('gfpdf_rtl', $rtl, $form, $lead);
     $pdf_arguments = array('pdfname' => $pdf_name, 'template' => $template, 'pdf_size' => $pdf_size, 'orientation' => $orientation, 'security' => $security, 'pdf_password' => $pdf_password, 'pdf_privileges' => $privileges, 'pdf_master_password' => $master_password, 'rtl' => $rtl, 'premium' => $premium, 'dpi' => $dpi, 'pdfa1b' => $pdfa1b, 'pdfx1a' => $pdfx1a);
     return $pdf_arguments;
 }
開發者ID:Ezyva2015,項目名稱:SMSF-Academy-Wordpress,代碼行數:40,代碼來源:pdf.php

示例2: get_pdf_name

 public function get_pdf_name($id, $form_id = false, $lead_id = false)
 {
     if (isset($this->configuration[$id]['filename'])) {
         return PDF_Common::validate_pdf_name($this->configuration[$id]['filename'], $form_id, $lead_id);
     } else {
         return PDF_Common::validate_pdf_name(PDF_Common::get_pdf_filename($form_id, $lead_id), $form_id, $lead_id);
     }
 }
開發者ID:quinntron,項目名稱:tmad,代碼行數:8,代碼來源:pdf-configuration-indexer.php


注:本文中的PDF_Common::get_pdf_filename方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。