안녕하세요ㅠㅠ pdf 관련..

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
안녕하세요ㅠㅠ pdf 관련..

QA

안녕하세요ㅠㅠ pdf 관련..

본문

안녕하세요. 여기 개발자 분들이 많으셔서 질문드려봅니다ㅠㅠ

 

워드프레스로 홈페이지 개발중인데요.. 

 

플러그인중에 db를 pdf로 export 시키는 게 있어요

 

근데 이게 한글이 모두 물음표로 출력되어 깨지네요..........ㅠ^ㅠ

 

 

-----------------------------customizing---------------------------------
<?php
/**
 * PDF Included With Form Submission
 *
 * @author Patrick Rauland
 * @version     1.0.0
 */

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="pdf.css" rel="stylesheet" />
</head>
<body>
안녕하세요.
<h1><?php echo $title; ?></h1>
<?php echo $table; ?>
</body>
</html>
----------------------------------------------------------------------

---------------------------export pdf -----------------------------------

<?php

define("NF_PDF_TEMPLATE_URL", apply_filters( 'nf_pdf_template_url', 'ninja-forms-pdf-submissions/' ) );

/**
 * Get other templates passing attributes and including the file.
 *
 * @access public
 * @param mixed $template_name
 * @param array $args (default: array())
 * @param string $template_path (default: '')
 * @param string $default_path (default: '')
 * @return void
 */
function nf_pdf_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {

if ( $args && is_array($args) ) {
extract( $args );
}

$located = nf_pdf_locate_template( $template_name, $template_path, $default_path );

do_action( 'nf_pdf_before_template_part', $template_name, $template_path, $located, $args );

include( $located );

do_action( 'nf_pdf_after_template_part', $template_name, $template_path, $located, $args );
}


/**
 * Locate a template and return the path for inclusion.
 *
 * This is the load order:
 *
 *     yourtheme      /  $template_path  /  $template_name
 *     yourtheme      /  $template_name
 *     $default_path  /  $template_name
 *
 * @access public
 * @param mixed $template_name
 * @param string $template_path (default: '')
 * @param string $default_path (default: '')
 * @return string
 */
function nf_pdf_locate_template( $template_name, $template_path = '', $default_path = '' ) {

// set a default template directory url
if ( ! $template_path ) {
$template_path = NF_PDF_TEMPLATE_URL;
}
if ( ! $default_path ) {
$default_path = NF_PDF_TEMPLATE_URL . '/templates/';
}

// Look within passed path within the theme - this is priority
$template = locate_template(
array(
trailingslashit( $template_path ) . $template_name, $template_name
)
);

// Get default template if we couldn't find anything in the theme
if ( ! $template ) {
$template = $default_path . $template_name;
}

// Return what we found
return apply_filters( 'nf_pdf_locate_template', $template, $template_name, $template_path );

}

--------------------------------------------------------------------

-----------------------css-------------------------------------------



table {
border-collapse: collapse;
font-family: 'Nanum Gothic', sans-serif;
width: 100%;
}

table, th, td {
border: 1px solid black;
padding: .5em;
}

table tr:nth-child(even) {
background-color: #DDD;
}

--------------------------------------------------------------------------------
좀 도와주실 수 있을까요ㅠㅠ

이 질문에 댓글 쓰기 :

답변 2

영문은 정상적으로 나오는지요?

영문은 정상이고 한글만 물음표라면 해당 DB 문자셋을 확인해 보셔야 할거 같으네요. 

네 영문은 정상으로 나오구요. 엑셀로 export 하면 한글 안깨지고 잘 출력됩니다.
pdf에서만 오류가 생기네요.. 제가볼땐 pdf로 저장시 pdf 기본 폰트가 영문이라 깨지는 것 같은데.. ㅠㅠ
pdf저장 시 폰트를 지정해주는 코드 같은건 없을까요? ㅜㅜ

어떤 플러그인인지 알 수 있을까요? 

답변을 작성하시기 전에 로그인 해주세요.
전체 0
QA 내용 검색
  • 개별 목록 구성 제목 답변작성자조회작성일
  • 질문이 없습니다.

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT