PDF *p=NULL;
int i;
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_cs2.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");
PDF_begin_page_ext(p,a4_width,a4_height,"");
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,"我是中文,我要进入PDF.");
PDF_end_page_ext(p,"");
PDF_end_document(p,"");
}
PDF_CATCH(p)
{
PDF_delete(p);
}
int i;
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_cs2.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");
PDF_begin_page_ext(p,a4_width,a4_height,"");
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,"我是中文,我要进入PDF.");
PDF_end_page_ext(p,"");
PDF_end_document(p,"");
}
PDF_CATCH(p)
{
PDF_delete(p);
}