printf("Couldn t create PDFlib object (DLL not found?)\n");
return(2);
}
PDF_TRY_DL(PDFlib, p) {
if (PDFlib >PDF_begin_document(p, "hellodl.pdf", 0, "") == 1) {
printf("Error: %s\n", PDFlib >PDF_get_errmsg(p));
return(2);
}
PDFlib >PDF_set_info(p, "Creator", "hello.c");
PDFlib >PDF_set_info(p, "Author", "Thomas Merz");
PDFlib >PDF_set_info(p, "Title", "Hello, world (C DLL)!");
PDFlib >PDF_begin_page_ext(p, a4_width, a4_height, "");
/* host
winansi
! */
font = PDFlib >PDF_load_font(p, "Helvetica Bold", 0, "host", "");
PDFlib >PDF_setfont(p, font, 24);
PDFlib >PDF_set_text_pos(p, 50, 700);
PDFlib >PDF_show(p, "Hello, world!");
PDFlib >PDF_continue_text(p, "(says C DLL)");
PDFlib >PDF_end_page_ext(p, "");
PDFlib >PDF_end_document(p, "");
}
PDF_CATCH_DL(PDFlib, p) {
printf("PDFlib exception occurred in hellodl sample:\n");
printf("[%d] %s: %s\n",
PDFlib >PDF_get_errnum(p), PDFlib >PDF_get_apiname(p),
PDFlib >PDF_get_errmsg(p));
PDF_delete_dl(PDFlib, p);
return(2);
}
/* PDFlib
*/
PDF_delete_dl(PDFlib, p);
return 0;
}
2.4.4 C
PDF_TRY(p)
{
...
PDFlib
...
}
PDF_CATCH(p)
{
printf("PDFlib exception occurred in hello sample:\n");
28
2
: PDFlib
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved