Code archives/User Libs/BlitzPDF
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
BlitzPDF: libPDF for Blitz v0.0.1.0 ----------------------------------- About ----- Blitz userlib .decls file for libPDF (PDFlib) v4.0.2 The intention is to get some PDF support for blitz programming languages. Licensing --------- The blitz .decls file for libPDF is to consider as Public Domain. libPDF v4.0.2 is licensed under the aladdin license (Open Source, similar to GNU but not equal. Read the aladdin-license.pdf supplied with this package for further information). Features -------- This library makes it possible to create pdf documents on-the-fly with the blitz suite programming languages. It contains 79 functions at the moment, but I had to take out the c/c++ specific functions as they will not work. Functions that take usage of array types is also not implemented because this is unsupported by Blitz userlib. I also removed the deprecated functions. However, opening and modifying existing PDF documents is not possible with this release, due to the fact that the PDI library's (PDFlib Import library) license does not allow me to do so. Included -------- Included is the libpdf documentation in (you guessed it) PDF format, use this if you are unfamiliar with the libPDF functions. Also there's a .bb demo included for demonstrating how to create a PDF. When executed the demo will create a pdf in the project directory named "hello_blitzplus.pdf". Betatesting ----------- This release has not been tested 100% properly. It has been tested in BlitzPlus demo (v1.11) and BlitzPlus v1.41. If you find any bugs or have ANY suggestions or comments, please leave me a mail at blitzpdf@... Contact ------- Contact the author: blitzpdf@... BlitzPDF Official homepage/forum: http://www.pcakutt.no/forum/viewtopic.php?t=214 Also you can check out the showcase at www.codersworkshop.com or www.blitzbasic.com You can download the full package including function references, the "libPDF.dll" file, the "libPDF.decls" file, and .bb example code from here: http://www.codersworkshop.com/viewshowcase.php?id=555 | |||||
;Declarations file for pdflib.dll v0.0.1.0 .lib "pdflib.dll" PDF_add_bookmark%(p%,txt$,p%,o%):PDF_add_bookmark PDF_add_launchlink(p%,llx#,lly#,urx#,ury#,fn$):PDF_add_launchlink PDF_add_locallink(p%,llx#,lly#,urx#,ury#,page%,dest$):PDF_add_locallink PDF_add_note(p%,llx#,lly#,urx#,ury#,c$,t$,i$,o$):PDF_add_note PDF_add_pdflink(p%,llx#,lly#,urx#,ury#,fn$,p%,dest$):PDF_add_pdflink PDF_add_thumbnail(p%,img%):PDF_add_thumbnail PDF_add_weblink(p%,llx#,lly#,urx#,ury#,url$):PDF_add_weblink PDF_arc(p%,x#,y#,r#,a#,b#):PDF_arc PDF_arcn(p%,x#,y#,r#,a#,b#):PDF_arcn PDF_attach_file(p%,llx#,lly#,urx#,ury#,fn$,desc$,auth$,mime$,icon$):PDF_attach_file PDF_begin_page(p%,w#,h#):PDF_begin_page PDF_begin_pattern(p%,w#,h#,xs#,ys#,pt%):PDF_begin_pattern PDF_begin_template%(p%,w#,h#):PDF_begin_template PDF_boot():PDF_boot PDF_circle(p%,x#,y#,r#):PDF_circle PDF_clip(p%):PDF_clip PDF_close(p%):PDF_close PDF_close_image(p%,img%):PDF_close_image PDF_closepath(p%):PDF_closepath PDF_closepath_stroke(p%):PDF_closepath_stroke PDF_closepath_fill_stroke(p%):PDF_closepath_fill_stroke PDF_concat(p%,a#,b#,c#,d#,e#,f#):PDF_concat PDF_continue_text(p%,txt$):PDF_continue_text PDF_continue_text2(p%,txt$,len%):PDF_continue_text2 PDF_curveto(p%,x1#,y1#,x2#,y2#,x3#,y3#):PDF_curveto PDF_delete(p%):PDF_delete PDF_endpath(p%):PDF_endpath PDF_end_page(p%):PDF_end_page PDF_end_pattern(p%):PDF_end_pattern PDF_end_template(p%):PDF_end_template PDF_fill(p%):PDF_fill PDF_fill_stroke(p%):PDF_fill_stroke PDF_findfont%(p%,font$,enc$,opt%):PDF_findfont PDF_get_majorversion%():PDF_get_majorversion PDF_get_minorversion%():PDF_get_minorversion PDF_get_opaque%():PDF_get_opaque PDF_get_parameter$(p%,key$,mod#):PDF_get_parameter PDF_get_value#(p%,key$,mod#):PDF_get_value PDF_initgraphics(p%):PDF_initgraphics PDF_lineto(p%,x#,y#):PDF_lineto PDF_makespotcolor(p%,sn$,len#):PDF_makespotcolor PDF_moveto(p%,x#,y#):PDF_moveto PDF_new%():PDF_new PDF_open_ccitt%(p%,fn$,w%,h%,br%,k%,bl%):PDF_open_ccitt PDF_open_file%(p%,fname$):PDF_open_file PDF_open_image%(p%,t$,s$,d$,len%,w%,h%,comp%,bpc%,p$):PDF_open_image PDF_open_image_file%(p%,t$,f$,sp$,intp%):PDF_open_image_file ;PDF_open_fp%(p%,fh%):PDF_open_fp ; C / C++ only :( PDF_place_image(p%,ih%,x#,y#,s#):PDF_place_image PDF_rect(p%,x#,y#,w#,h#):PDF_rect PDF_restore(p%):PDF_restore PDF_rotate(p%,phi#):PDF_rotate PDF_save(p%):PDF_save PDF_scale(p%,sx#,sy#):PDF_scale PDF_setcolor(p%,t$,cs$,c1#,c2#,c3#,c4#):PDF_setcolor PDF_setdash(p%,b#,w#):PDF_setdash PDF_setflat(p%,fn#):PDF_setflat PDF_setfont(p%,font%,size#):PDF_setfont PDF_setlinecap(p%,lc%):PDF_setlinecap PDF_setlinejoin(p%,lj%):PDF_setlinejoin PDF_setlinewidth(p%,w#):PDF_setlinewidth PDF_setmatrix(p%,a#,b#,c#,d#,e#,f#):PDF_setmatrix PDF_setmiterlimit(p%,m#):PDF_setmiterlimit ;PDF_setpolydash(p%,darray#,len#):PDF_setpolydash ;Arrays not supported :( PDF_set_border_color(p%,r#,g#,b#):PDF_set_border_color PDF_set_border_dash(p%,b#,w#):PDF_set_border_dash PDF_set_border_style(p%,style$,w#):PDF_set_border_style PDF_set_info(p%,key$,str$):PDF_set_info PDF_set_parameter(p%,key$,val$):PDF_set_parameter PDF_set_text_pos(p%,x#,y#):PDF_set_text_pos PDF_set_value(p%,key$,val#):PDF_set_value PDF_show(p%,txt$):PDF_show PDF_show2(p%,txt$,len%):PDF_show2 PDF_show_boxed%(p%,txt%,x#,y#,w#,h#,mode$,feat$):PDF_show_boxed PDF_show_xy(p%,txt$,x#,y#):PDF_show_xy PDF_show_xyz(p%,txt$,len%,x#,y#):PDF_show_xyz PDF_shutdown():PDF_shutdown PDF_skew(p%,a#,b#):PDF_skew PDF_stringwidth#(p%,txt$,font%,size#):PDF_stringwidth PDF_stringwidth2#(p%,txt$,len%,font%,size#):PDF_stringwidth2 PDF_stroke(p%):PDF_stroke PDF_translate(p%,tx#,ty#):PDF_translate |
Comments
| ||
Very useful, thanks! |
| ||
very good!! it works fine!! mongia |
| ||
I just made a blitzmax version of this lovely library. So I want to ask Sub_Zero if its okay to release the code here?? You have done the ground work, so I want to ask you. |
| ||
It's a ok Tiger ;) No problem. Also I'm really glad to see that it could be of use to someone :) |
| ||
Okay, here is the Blitzmax version. You don't need the .decls file, only the libPDF. ' ' BlitzMax version: Tiger ' Date: 2005.11.17 ' Version: v0.0.1.0 BlitzMax ' ' Please Include 'Pdflib.Dll' ' Strict Type tPDF Const LibName:String="Pdflib.Dll" '#Region Global Functions Global PDF_Open_File%(p,fname$z) Global PDF_NEW%() Global PDF_Add_bookmark%(p1%,txt$z,p%,o%) Global PDF_Add_launchlink(p1%,llx#,lly#,urx#,ury#,fn$z) Global PDF_add_locallink(p1%,llx#,lly#,urx#,ury#,page%,dest$z) Global PDF_add_note(p%,llx#,lly#,urx#,ury#,c$z,t$z,i$z,o$z) Global PDF_add_pdflink(p1%,llx#,lly#,urx#,ury#,fn$z,p%,dest$z) Global PDF_add_thumbnail(p%,img%) Global PDF_add_weblink(p%,llx#,lly#,urx#,ury#,url$z) Global PDF_arc(p%,x#,Y#,r#,a#,b#) Global PDF_arcn(p%,x#,Y#,r#,a#,b#) Global PDF_attach_file(p%,llx#,lly#,urx#,ury#,fn$z,desc$z,auth$z,mime$z,icon$z) Global PDF_begin_page(p%,w#,h#) Global PDF_begin_pattern(p%,w#,h#,xs#,ys#,pt%) Global PDF_begin_template%(p%,w#,h#) Global PDF_boot() Global PDF_circle(p%,x#,Y#,r#) Global PDF_clip(p%) Global PDF_close(p%) Global PDF_close_image(p%,img%) Global PDF_closepath(p%) Global PDF_closepath_stroke(p%) Global PDF_closepath_fill_stroke(p%) Global PDF_concat(p%,a#,b#,c#,d#,e#,f#) Global PDF_continue_text(p%,txt$z) Global PDF_continue_text2(p%,txt$z,Len1%) Global PDF_curveto(p%,x1#,y1#,x2#,y2#,x3#,y3#) Global PDF_delete(p%) Global PDF_endpath(p%) Global PDF_end_page(p%) Global PDF_end_pattern(p%) Global PDF_end_template(p%) Global PDF_fill(p%) Global PDF_fill_stroke(p%) Global PDF_findfont%(p%,font$z,enc$z,opt%) Global PDF_get_majorversion%() Global PDF_get_minorversion%() Global PDF_get_opaque%() Global PDF_get_parameter$z(p%,Key$z,mod1#) Global PDF_get_value#(p%,Key$z,mod1#) Global PDF_initgraphics(p%) Global PDF_lineto(p%,x#,Y#) Global PDF_makespotcolor(p%,sn$z,Len1#) Global PDF_moveto(p%,x#,Y#) Global PDF_open_ccitt%(p%,fn$z,w%,h%,br%,k%,bl%) Global PDF_open_image%(p1%,t$z,s$z,d$z,Len1%,w%,h%,comp%,bpc%,p$z) Global PDF_open_image_file%(p1%,t$z,f$z,sp$z,p%) Global PDF_open_fp%(p%,fh%)' C / C++ only :( Global PDF_place_image(p%,x#,Y#,s#) Global PDF_rect(p%,x#,Y#,w#,h#) Global PDF_restore(p%) Global PDF_rotate(p%,Phi#) Global PDF_save(p%) Global PDF_scale(p%,sx#,sy#) Global PDF_setcolor(p%,t$z,cs$z,c1#,c2#,c3#,c4#) Global PDF_setdash(p%,b#,w#) Global PDF_setflat(p%,fn#) Global PDF_setfont(p%,font%,Size#) Global PDF_setlinecap(p%,lc%) Global PDF_setlinejoin(p%,lj%) Global PDF_setlinewidth(p%,w#) Global PDF_setmatrix(p%,a#,b#,c#,d#,e#,f#) Global PDF_setmiterlimit(p%,m#) Global PDF_setpolydash(p%,darray#[],Len1#) Global PDF_set_border_color(p%,r#,g#,b#) Global PDF_set_border_dash(p%,b#,w#) Global PDF_set_border_style(p%,Style$z,w#) Global PDF_set_info(p%,Key$z,str$z) Global PDF_set_parameter(p%,Key$z,val$z) Global PDF_set_text_pos(p%,x#,Y#) Global PDF_set_value(p%,Key$z,val#) Global PDF_show(p%,txt$z) Global PDF_show2(p%,txt$z,Len1%) Global PDF_show_boxed%(p%,txt%,x#,Y#,w#,h#,mode$z,feat$z) Global PDF_show_xy(p%,txt$z,x#,Y#) Global PDF_show_xyz(p%,txt$z,Len1%,x#,Y#) Global PDF_shutdown() Global PDF_skew(p%,a#,b#) Global PDF_stringwidth#(p%,txt$z,font%,Size#) Global PDF_stringwidth2#(p%,txt$z,Len1%,font%,Size#) Global PDF_stroke(p%) Global PDF_translate(p%,tx#,ty#) '#EndRegion Global lib Field Handler Function Create:tPDF(Url:String="") Local Out:tPDF=New tPDF If Url<>"" Then If PDF_Open_File( Out.Handler,Url)=-1 Then Notify("Can't create "+URL);End Return out End Function Method New() If lib=0 Try lib=LoadLibraryA(LibName) PDF_NEW%= GetProcAddress(lib,"PDF_new") PDF_Open_File= GetProcAddress(lib,"PDF_open_file") PDF_Add_bookmark%= GetProcAddress(lib,"PDF_add_bookmark") PDF_add_launchlink= GetProcAddress(lib,"PDF_add_launchlink") PDF_add_locallink= GetProcAddress(lib,"PDF_add_locallink") PDF_add_note= GetProcAddress(lib,"PDF_add_note") PDF_add_pdflink= GetProcAddress(lib,"PDF_add_pdflink") PDF_add_thumbnail= GetProcAddress(lib,"PDF_add_thumbnail") PDF_add_weblink= GetProcAddress(lib,"PDF_add_weblink") PDF_arc= GetProcAddress(lib,"PDF_arc") PDF_arcn= GetProcAddress(lib,"PDF_arcn") PDF_attach_file= GetProcAddress(lib,"PDF_attach_file") PDF_begin_page= GetProcAddress(lib,"PDF_begin_page") PDF_begin_pattern= GetProcAddress(lib,"PDF_begin_pattern") PDF_begin_template= GetProcAddress(lib,"PDF_begin_template") PDF_boot= GetProcAddress(lib,"PDF_boot") PDF_circle= GetProcAddress(lib,"PDF_circle") PDF_clip= GetProcAddress(lib,"PDF_clip") PDF_close= GetProcAddress(lib,"PDF_close") PDF_close_image= GetProcAddress(lib,"PDF_close_image") PDF_closepath= GetProcAddress(lib,"PDF_closepath") PDF_closepath_stroke= GetProcAddress(lib,"PDF_closepath_stroke") PDF_closepath_fill_stroke= GetProcAddress(lib,"PDF_closepath_fill_stroke") PDF_concat= GetProcAddress(lib,"PDF_concat") PDF_continue_text= GetProcAddress(lib,"PDF_continue_text") PDF_continue_text2= GetProcAddress(lib,"PDF_continue_text2") PDF_curveto= GetProcAddress(lib,"PDF_curveto") PDF_delete= GetProcAddress(lib,"PDF_delete") PDF_endpath= GetProcAddress(lib,"PDF_endpath") PDF_end_page= GetProcAddress(lib,"PDF_end_page") PDF_end_pattern= GetProcAddress(lib,"PDF_end_pattern") PDF_end_template= GetProcAddress(lib,"PDF_end_template") PDF_fill= GetProcAddress(lib,"PDF_fill") PDF_fill_stroke= GetProcAddress(lib,"PDF_fill_stroke") PDF_findfont= GetProcAddress(lib,"PDF_findfont") PDF_get_majorversion= GetProcAddress(lib,"PDF_get_majorversion") PDF_get_minorversion= GetProcAddress(lib,"PDF_get_minorversion") PDF_get_opaque= GetProcAddress(lib,"PDF_get_opaque") PDF_get_parameter= GetProcAddress(lib,"PDF_get_parameter") PDF_get_value= GetProcAddress(lib,"PDF_get_value") PDF_initgraphics= GetProcAddress(lib,"PDF_initgraphics") PDF_lineto= GetProcAddress(lib,"PDF_lineto") PDF_makespotcolor= GetProcAddress(lib,"PDF_makespotcolor") PDF_moveto= GetProcAddress(lib,"PDF_moveto") PDF_open_ccitt= GetProcAddress(lib,"PDF_open_ccitt") PDF_open_image= GetProcAddress(lib,"PDF_open_image") PDF_open_image_file%= GetProcAddress(lib,"PDF_open_image_file") PDF_open_fp= GetProcAddress(lib,"PDF_open_fp")' C / C++ only :( PDF_place_image= GetProcAddress(lib,"PDF_place_image") PDF_rect= GetProcAddress(lib,"PDF_rect") PDF_restore= GetProcAddress(lib,"PDF_restore") PDF_rotate= GetProcAddress(lib,"PDF_rotate") PDF_save= GetProcAddress(lib,"PDF_save") PDF_scale= GetProcAddress(lib,"PDF_scale") PDF_setcolor= GetProcAddress(lib,"PDF_setcolor") PDF_setdash= GetProcAddress(lib,"PDF_setdash") PDF_setflat= GetProcAddress(lib,"PDF_setflat") PDF_setfont= GetProcAddress(lib,"PDF_setfont") PDF_setlinecap= GetProcAddress(lib,"PDF_setlinecap") PDF_setlinejoin= GetProcAddress(lib,"PDF_setlinejoin") PDF_setlinewidth= GetProcAddress(lib,"PDF_setlinewidth") PDF_setmatrix= GetProcAddress(lib,"PDF_setmatrix") PDF_setmiterlimit= GetProcAddress(lib,"PDF_setmiterlimit") PDF_setpolydash= GetProcAddress(lib,"PDF_setpolydash")';Arrays not supported :( PDF_set_border_color= GetProcAddress(lib,"PDF_set_border_color") PDF_set_border_dash= GetProcAddress(lib,"PDF_set_border_dash") PDF_set_border_style= GetProcAddress(lib,"PDF_set_border_style") PDF_set_info= GetProcAddress(lib,"PDF_set_info") PDF_set_parameter= GetProcAddress(lib,"PDF_set_parameter") PDF_set_text_pos= GetProcAddress(lib,"PDF_set_text_pos") PDF_set_value= GetProcAddress(lib,"PDF_set_value") PDF_show= GetProcAddress(lib,"PDF_show") PDF_show2= GetProcAddress(lib,"PDF_show2") PDF_show_boxed= GetProcAddress(lib,"PDF_show_boxed") PDF_show_xy= GetProcAddress(lib,"PDF_show_xy") PDF_show_xyz= GetProcAddress(lib,"PDF_show_xyz") PDF_shutdown= GetProcAddress(lib,"PDF_shutdown") PDF_skew= GetProcAddress(lib,"PDF_skew") PDF_stringwidth= GetProcAddress(lib,"PDF_stringwidth") PDF_stringwidth2= GetProcAddress(lib,"PDF_stringwidth2") PDF_stroke= GetProcAddress(lib,"PDF_stroke") PDF_translate= GetProcAddress(lib,"PDF_translate") EndTry EndIf Handler=PDF_NEW() End Method '#Region Methods Method Add_Bookmark(Txt:String,p%,o%) Return PDF_Add_bookmark(Handler,txt,p,o) End Method Method Add_Launchlink(llx#,lly#,urx#,ury#,fn:String) PDF_add_launchlink(Handler,llx,lly,urx,ury,fn) End Method Method Add_LocalLink(llx#,lly#,urx#,ury#,Page%,Dest:String) PDF_add_locallink(Handler,llx,lly,urx,ury,page,dest) End Method Method Add_Note(llx#,lly#,urx#,ury#,c$,t$,i$,o$) PDF_add_note(Handler,llx,lly,urx,ury,c$,t$,i$,o$) End Method Method Add_PdfLink(llx#,lly#,urx#,ury#,fn$,p%,dest$) PDF_add_pdflink(Handler,llx,lly,urx,ury,fn,p,dest) End Method Method Add_thumbnail(img%) PDF_add_thumbnail(Handler,img) End Method Method add_weblink(llx#,lly#,urx#,ury#,url$) PDF_add_weblink(Handler,llx,lly,urx,ury,url) End Method Method arc(x#,Y#,r#,a#,b#) PDF_arc(Handler,x,Y,r,a,b) End Method Method arcn(x#,Y#,r#,a#,b#) PDF_arcn(Handler,x,Y,r,a,b) End Method Method attach_file(llx#,lly#,urx#,ury#,fn$,desc$,auth$,mime$,icon$) PDF_attach_file(Handler,llx,lly,urx,ury,fn,desc,auth,mime,icon) End Method Method begin_page(w#=595.0,H#=842.0) PDF_begin_page(Handler,w,h) End Method Method begin_pattern(w#,h#,xs#,ys#,pt%) PDF_begin_pattern(Handler,w,h,xs,ys,pt) End Method Method begin_template%(w#,h#) Return PDF_begin_template(Handler,w,h) End Method Method boot() PDF_boot() End Method Method circle(x#,Y#,r#) PDF_circle(Handler,x,Y,r) End Method Method clip() PDF_clip(Handler) End Method Method Close() PDF_close(Handler) End Method Method close_image(p%,img%) PDF_close_image(Handler,img) End Method Method closepath() PDF_closepath(Handler) End Method Method closepath_stroke() PDF_closepath_stroke(Handler) End Method Method closepath_fill_stroke() PDF_closepath_fill_stroke(Handler) End Method Method concat(a#,b#,c#,d#,e#,f#) PDF_concat(Handler,a,b,c,d,e,f) End Method Method continue_text(txt$) PDF_continue_text(Handler,txt) End Method Method continue_text2(txt$,Len1%) PDF_continue_text2(Handler,txt,len1) End Method Method curveto(x1#,y1#,x2#,y2#,x3#,y3#) PDF_curveto(Handler,x1,y1,x2,y2,x3,y3) End Method Method endpath() PDF_endpath(Handler) End Method Method end_page() PDF_end_page(Handler) End Method Method end_pattern() PDF_end_pattern(Handler) End Method Method end_template() PDF_end_template(Handler) End Method Method FindFont(Font:String,Url:String="host",Opt:Int=0) Return PDF_findfont(Handler,Font,url,opt) End Method Method fill() PDF_fill(Handler) End Method Method fill_stroke() PDF_fill_stroke(Handler) End Method Method get_majorversion%() Return PDF_get_majorversion() End Method Method get_minorversion%() Return PDF_get_minorversion() End Method Method get_opaque%() Return PDF_get_opaque()End Method Method get_parameter$(Key$,Mod1#) Return PDF_get_parameter(Handler,Key,mod1) End Method Method get_value#(Key$,Mod1#) Return PDF_get_value(Handler,Key,mod1) End Method Method initgraphics() PDF_initgraphics(Handler) End Method Method lineto(x#,Y#) PDF_lineto(Handler,x,Y) End Method Method makespotcolor(sn$,Len1#) PDF_makespotcolor(Handler,sn,Len1) End Method Method moveto(x#,Y#) PDF_moveto(Handler,x,Y) End Method Method open_ccitt%(fn$,w%,h%,br%,k%,bl%) Return PDF_open_ccitt(Handler,fn,w,h,br,k,bl) End Method Method open_image%(t$,s$,d$,Len1%,w%,h%,comp%,bpc%,p$) Return PDF_open_image(Handler,t,s,d,len1,w,h,comp,bpc,p) End Method Method open_image_file%(t$,f$,sp$,p%) Return PDF_open_image_file(Handler,t,f,sp,p) End Method Method Open_File(Filename:String) Return PDF_Open_File(Handler,Filename) End Method Method open_fp%(fh%) Return PDF_open_fp(Handler,fh) End Method ' C / C++ only :( Method place_image(x#,Y#,s#) PDF_place_image(Handler,x,Y,s) End Method Method rect(x#,Y#,w#,h#) PDF_rect(Handler,x,Y,w,h) End Method Method Restore() PDF_restore(Handler) End Method Method rotate(Phi#) PDF_rotate(Handler,Phi) End Method Method Save() PDF_save(Handler) End Method Method Scale(sx#,sy#) PDF_scale(Handler,sx,sy) End Method Method SetColor(t$,cs$,c1#,c2#,c3#,c4#) PDF_setcolor(Handler,t,cs,c1,c2,c3,c4) End Method Method setdash(b#,w#) PDF_setdash(Handler,b,w) End Method Method setflat(fn#) PDF_setflat(Handler,fn) End Method Method SetFont(Font%,Size%) PDF_setfont(Handler,Font,Size) End Method Method setlinecap(lc%) PDF_setlinecap(Handler,lc) End Method Method setlinejoin(lj%) PDF_setlinejoin(Handler,lj) End Method Method SetLineWidth(w#) PDF_setlinewidth(Handler,w) End Method Method setmatrix(a#,b#,c#,d#,e#,f#) PDF_setmatrix(Handler,a,b,c,d,e,f) End Method Method setmiterlimit(m#) PDF_setmiterlimit(Handler,m) End Method Method setpolydash(darray:Float[],Len1#) PDF_setpolydash(Handler,darray,len1) End Method Method set_border_color(r#,g#,b#) PDF_set_border_color(Handler,r,g,b) End Method Method set_border_dash(b#,w#) PDF_set_border_dash(Handler,b,w) End Method Method set_border_style(Style$,w#) PDF_set_border_style(Handler,Style,w) End Method Method set_info(Key$,str$) PDF_set_info(Handler,Key,str) End Method Method set_parameter(Key$,val$) PDF_set_parameter(Handler,Key,val) End Method Method set_text_pos(x#,Y#) PDF_set_text_pos(Handler,x,Y) End Method Method set_value(Key$,val#) PDF_set_value(Handler,Key,val) End Method Method Show(Txt$) PDF_show(Handler,Txt) End Method Method show2(txt$,Len1%) PDF_show2(Handler,txt$,len1) End Method Method show_boxed%(txt%,x#,Y#,w#,h#,mode$,feat$) Return PDF_show_boxed(Handler,txt,x,Y,w,h,mode,feat) End Method Method show_xy(txt$,x#,Y#) PDF_show_xy(Handler,txt,x,Y) End Method Method show_xyz(txt$,Len1%,x#,Y#) PDF_show_xyz(Handler,txt,len1,x,Y) End Method Method ShutDown() PDF_shutdown() End Method Method skew(a#,b#) PDF_skew(Handler,a,b) End Method Method stringwidth#(txt$,font%,Size#) Return PDF_stringwidth(Handler,txt,font,Size) End Method Method stringwidth2#(txt$,Len1%,font%,Size#) Return PDF_stringwidth(Handler,txt,len1,font) End Method Method Stroke() PDF_stroke(Handler) End Method Method Translate(tx#,ty#) PDF_translate(Handler,tx,ty) End Method Method Remove() PDF_delete(Handler) End Method '#EndRegion End Type Local pdf:tPDF= tPDF.Create("Testing.pdf") pdf.set_info("Creator","BlitzPDF v0.0.0.1") pdf.set_info("Author","Kay Arnesen, www.pcakutt.no. Converted to BlitzMax Tiger of voltroncc.") pdf.set_info("Title","Hello World (Blitz)") pdf.begin_page() Local Font=pdf.FindFont("Helvetica-Bold") pdf.SetFont(Font,24) pdf.set_text_pos(200.0,450.0) pdf.Show("Hello World!") pdf.continue_text("(Says Blitz!)") pdf.SetLineWidth(10) pdf.circle(270.0,425.0,100) pdf.stroke() pdf.end_page() pdf.Close() pdf.Remove() |
| ||
Very nice Tiger :) |
| ||
nice, thanks :) |
| ||
oooo, nice work indeed. Many thanks. I reckon this will come in very handy one day. |
| ||
cool ! thx |
| ||
It's really a lovely library!!! Has anyone tried to extend this to the latest version of PDFlib from Thomas Merz (version 6). It offers complete new functionality with PDI: You can edit existing PDF-files and write on top. Wonderful. The only problem I could not get it work and just don't know what I am doing wrong. If anyone is interested please try and let me know! |
| ||
That is SUB ZERO! |
| ||
Looks great but all the links are broken. :( Darkheart |
| ||
Yeah all the link don't work. |
| ||
I know, that domain is long gone... Right now I'm searching through my harddrives for the archive with the bundled pdflib v4. If I reckon Correctly, there was a reason I chose version 4 instead of version 6. The Difference back then was the license of pdflib, which differs from v4 to v5 and up. Now if I'm not mistaken, you can distribute pdflib v4 with your binaries legally, but with v5/v6 you cannot. I might be wrong though. I found the zip archive of v0.0.1.0, it doesn't include the blitzmax decls, so for blitzmax just use tiger's code in the above post. Download: http://servere.no/forum/images/adminbilder/blitz/blitzpdf0010.zip |
| ||
How do you make userlibs with Blitz? |
Code Archives Forum