1
This commit is contained in:
@@ -1089,7 +1089,19 @@ class Production extends Controller
|
||||
$maidata['content'] = $tt;
|
||||
$maidata['tmail'] = $journal_info['email'];
|
||||
$maidata['tpassword'] = $journal_info['epassword'];
|
||||
$file = ROOT_PATH . 'public' . DS.'proofPDF'.DS.$p_info['article_id'].'.pdf';
|
||||
if($p_info['file_sub']!=''){
|
||||
$file = [];
|
||||
$file[] = ROOT_PATH . 'public' . DS.'proofPDF'.DS.$p_info['article_id'].'.pdf';
|
||||
if(substr($p_info['file_sub'],strripos($p_info['file_sub'],'.')+1)=='pdf'){
|
||||
$file[] = ROOT_PATH . 'public' . DS.'proofPDF'.DS.$p_info['article_id'].'SUB.pdf';
|
||||
}else{
|
||||
$file[] = ROOT_PATH . 'public' . DS.'articleSUB'.DS.$p_info['file_sub'];
|
||||
}
|
||||
|
||||
}else{
|
||||
$file = ROOT_PATH . 'public' . DS.'proofPDF'.DS.$p_info['article_id'].'.pdf';
|
||||
}
|
||||
|
||||
sendEmail($maidata['email'],$maidata['title'],$journal_info['title'],$maidata['content'],$maidata['tmail'],$maidata['tpassword'],$file);
|
||||
|
||||
//更改数据库
|
||||
@@ -1175,6 +1187,33 @@ class Production extends Controller
|
||||
// $pdf->Write(7, date('Y-m-d'));
|
||||
}
|
||||
$pdf->Output(ROOT_PATH . 'public' . DS.'proofPDF'.DS.$article_id.'.pdf');
|
||||
if($p_info['file_sub']!=''&&substr($p_info['file_sub'],strripos($p_info['file_sub'],'.')+1)=='pdf'){
|
||||
$pdf1 = new \FPDI();
|
||||
$pageCount1 = $pdf1->setSourceFile(ROOT_PATH . 'public' . DS."articleSUB".DS.$p_info['file_sub']);
|
||||
for ($pageNo = 1; $pageNo <= $pageCount1; $pageNo++) {
|
||||
// import a page
|
||||
$templateId = $pdf1->importPage($pageNo);
|
||||
|
||||
// get the size of the imported page
|
||||
$size = $pdf1->getTemplateSize($templateId);
|
||||
|
||||
// create a page (landscape or portrait depending on the imported page size)
|
||||
if ($size['w'] > $size['h']) $pdf->AddPage('L', array($size['w'], $size['h']));
|
||||
else $pdf1->AddPage('P', array($size['w'], $size['h']));
|
||||
|
||||
// use the imported page
|
||||
// $pdf->useTemplate($templateId);
|
||||
|
||||
$pdf1->image(ROOT_PATH . 'public' . DS.'pdf'.DS.'bg2.png',55, 25, 80);
|
||||
$pdf1->image(ROOT_PATH . 'public' . DS.'pdf'.DS.'bg2.png',55, 155, 80);
|
||||
$pdf1->useTemplate($templateId);
|
||||
// $pdf->SetFont('Arial', 'B', '12');
|
||||
// // sign with current date
|
||||
// $pdf->SetXY(0, 0); // you should keep testing untill you find out correct x,y values
|
||||
// $pdf->Write(7, date('Y-m-d'));
|
||||
}
|
||||
$pdf1->Output(ROOT_PATH . 'public' . DS.'proofPDF'.DS.$article_id.'SUB.pdf');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user