2,586
社区成员
发帖
与我相关
我的任务
分享
void CpdftestDlg::OnBnClickedButton1()
{
// TODO: 在此添加控件通知处理程序代码
PDF *p=NULL;
CString str,type_page;
int i;
str="PDFFH1.PDF";
type_page = "B5";
int Font_E = 0,Font_CS = 0;
if((p=PDF_new())==(PDF *)0)
i=0;
PDF_TRY(p)
{
CString e;
if(PDF_begin_document(p,"pdflib_cs1.pdf",0,"") == -1)
{
i=1;
}
PDF_set_info(p, "Creator", "pdflib_cs1.c");
PDF_set_info(p, "Author", "bowriver2001@yahoo.ca");
PDF_set_info(p, "Title", "Output Chinese Simplify with PDFlib builtin font");
PDF_set_parameter(p,"FontOutline","a=C:\\WINDOWS\\Fonts\\SIMKAI.TTF");
//Font_E = PDF_load_font(p, "Helvetica-Bold", 0, "winansi", "");
PDF_begin_page_ext(p,a4_width,a4_height,"");
//PDF_setfont(p,Font_E,10);
//Font_CS=PDF_load_font(p,"STSongStd-Light-Acro",0,"UniGB-UCS2-H","");
int Font_song=PDF_load_font(p,"a:0",0,"unicode","");
PDF_setfont(p,Font_song,24);
//PDF_setcolor(p,"fill","gray",1,0,0,0);
PDF_set_text_pos(p,200,700);
PDF_show(p,"fgfdgd急哦二姐夫都是");
PDF_end_page_ext(p,"");
PDF_end_document(p,"");
}
PDF_CATCH(p)
{
PDF_delete(p);
}
}