Page 5 of 9
Posted: Tue Dec 19, 2006 3:54 pm
by Flype
RMChart Include Update to make it more PB4.02 friendly.
Please look at the examples because some changes have been done.
Download it on the first post near RMCHART.DLL / Lastest Release
Regarding PurePDF
Posted: Wed Dec 20, 2006 8:30 am
by Yogi Yang
Hello Flype,
Regarding PurePDF.
The lib is impressive. But is it possible to create Fillable PDF Forms using your library.
I want to create PDF Forms which users and load in Acrobat Reader and fill them and save them as PDF again. Can such a feature be implemented using your PDF Lib?
TIA
Posted: Wed Dec 20, 2006 8:54 am
by Flype
hello yogi yang,
first i want to say that PurePDF is not mine.some month ago,
i have made my own release (as it is opensource) to make it compatible with PB4.0. This lib is written first by LuckyLuke and then by ABBKlaus. Since some weeks an official release is available for PB4. So my own version is no more useful.
Anyway, it is a good idea but i have no idea how to implement forms in PDF.
But yes it would be very useful. I might use it at work if such a functionality exists. One day perhaps if documentation is available.......
Posted: Wed Dec 20, 2006 11:06 am
by Yogi Yang
Flype wrote:hello yogi yang,
first i want to say that PurePDF is not mine.some month ago,
i have made my own release (as it is opensource) to make it compatible with PB4.0. This lib is written first by LuckyLuke and then by ABBKlaus. Since some weeks an official release is available for PB4. So my own version is no more useful.
Anyway, it is a good idea but i have no idea how to implement forms in PDF.
But yes it would be very useful. I might use it at work if such a functionality exists. One day perhaps if documentation is available.......
Sorry to bother you.
You see I have developed a set of software for a client where a user will use FormDesigner and load a scanned pre printed form, place various controls on it at locations where data needs to be entered.
This layout is saved into an XML file and there is another software - Reader which will read the XML and present the user with the saved layout and allow to type in necessary text, select required options, check (tick) various items, etc. etc. and finally save the form in XML format with entered data.
This Reader also allows one to export the form without/without data to various bitmap formats and to PDF.
Now the client requires that the layout should be exportable to PDF in fillable forms.
I think I will have to purchase Foxit PDF SDK for this.... Any ideas would be appreciated.
Thanks,
Posted: Sun Jan 14, 2007 11:44 pm
by Flype
UserLibrary
PureXML2 for PureBasic 4.02.
PureXML_V2_BETA 105Ko.
Complete Rewrite of PureXML.
There's NO more need for a XML DLL.
This lib is totally freeware of course,
but it is still in Beta test until it's done.
Posted: Mon Jan 15, 2007 12:04 am
by ts-soft

thx, is there a change for a unicode and/or threadsafe version?
Posted: Mon Jan 15, 2007 12:13 am
by Flype
yes it could ! i just need to compile them.
but at the moment,
i'm first concentrating on the ascii version to eliminate all bugs / expands functionalities.
Posted: Mon Jan 15, 2007 12:19 am
by ts-soft
No problem, i can wait
There is a bug with the helpfile: false name and index incorrect.
Posted: Mon Jan 15, 2007 12:23 am
by Kiffi
Flype wrote:UserLibrary PureXML2 for PureBasic 4.02.
Thank you for your lib!
Here are my first bug-report:
The following XMLs are wellformed, but your lib parse neither of them:
Code: Select all
<test>
<test2><![CDATA[this is a cdata-section]]></test2>
</test>
Greetings ... Kiffi
// Edit: Removed broken image-link
Posted: Mon Jan 15, 2007 12:52 am
by Flype
ts-soft wrote:No problem, i can wait
There is a bug with the helpfile: false name and index incorrect.
yes, at the moment, the helpfile is the (very) old one (purexml v1) which is not good.
better read the PureXML2.txt during beta stage.
Posted: Mon Jan 15, 2007 1:40 am
by JCV
the libs are very useful. Thanks.

Posted: Mon Jan 15, 2007 1:48 am
by Flype
Kiffi wrote:Flype wrote:UserLibrary PureXML2 for PureBasic 4.02.
Thank you for your lib!
Here are my first bug-report:
The following XMLs are wellformed, but your lib parse neither of them:
Code: Select all
<test>
<test2><![CDATA[this is a cdata-section]]></test2>
</test>
Greetings ... Kiffi
updated - beta2.
all should works.
i included this 2 new examples.
Posted: Mon Jan 15, 2007 10:18 am
by davenull
Title: PureXML2 BETA
Version: 2.0 Beta2 (15-Jan-2007 01:36)
License: Free to use, greetings are welcome.
Author: Written by Flype, flype44(at)gmail.com.
Target: This UserLibrary is intended to be used with PureBasic 4.02
OS: Microsoft Windows (Only tested on XP).
Descript: PureXML is a event-based XML parser, based on Expat 2.0.0.
No DLL required - Small footprint (about 100Kb) !
Thanks! Greatly appreciated. I will test this out as soon as possible.
-davenull-
Posted: Mon Jan 15, 2007 1:04 pm
by Flype
Updated - Beta3
UserLib_PB402_PureXML_V2_BETA.zip (207 Ko)
Please read the README.txt.
Many changes (syntax modified and functions added).
No Multithreaded/Unicode support at the moment.
It's the next step... The last one will be the CHM.
Code: Select all
_______________________________________________________________________________________________________________
Title: PureXML2 BETA
Version: 2.0 Beta3 (15-Jan-2007 01:36)
License: Free to use, greetings are welcome.
Author: Written by Flype, flype44(at)gmail.com.
Target: UserLibrary designed for PureBasic 4.02
OS: Microsoft Windows (Only tested on Windows XP SP2).
Descript: PureXML is a event-based XML parser, based on Expat 2.0.0.
No more DLL required - Small footprint (about 100Kb) !
Download: http://purebasic.myftp.org/?filename=files/44/PB4_UserLibs/UserLib_PB402_PureXML_V2_BETA.zip
_______________________________________________________________________________________________________________
List of functions :
PureXML_GetEngine() ; Retrieves the version of the internal XML engine.
PureXML_GetVersion() ; Retrieves the version of the PureXML UserLibrary.
PureXML_GetErrorString() ; Returns the error that has occurred as string.
PureXML_GetErrorCode() ; Returns the error that has occurred as errorcode.
PureXML_GetAttr(name.s) ; Returns the attribute value (by name).
PureXML_GetAttrCount() ; Returns the number of attributes.
PureXML_GetAttrName(index.l) ; Returns the attribute name (by index).
PureXML_GetAttrValue(index.l) ; Returns the attribute value (by index).
PureXML_GetBuffer() ; Returns the internal buffer string of the current parsing.
PureXML_GetColumn() ; Returns the column number of the current parsing position.
PureXML_GetDepth() ; Returns the tag's depth of the current parsing position.
PureXML_GetLine() ; Returns the line number of the current parsing position.
PureXML_GetPosition() ; Returns the byte-offset of the current parsing position.
PureXML_GetBase() ; Returns the base for resolving relative URLs.
PureXML_GetCDATA() ; Returns the CDATA Section of the current element.
PureXML_GetCharData() ; Returns the characters data of the current element.
PureXML_GetName() ; Returns the name of the current element.
PureXML_GetPath() ; Retrieves the path of the current element.
PureXML_GetStatus() ; Returns the parsing status between 0, 1, 2, 3.
PureXML_SetBase(base.s) ; Specify the base to be used for resolving relative URLs.
PureXML_SetEncoding(encoding.s) ; Specify the encoding type between US-ASCII, UTF-8, UTF-16, ISO-8859-1.
PureXML_ParseFile(fileName.s) ; Parse a XML document.
PureXML_ParseString(xmlString.s) ; Parse a XML string.
PureXML_ParseUrl(url.s) ; Parse a XML url.
PureXML_ParseResume() ; Resumes the current parsing, if suspended with PureXML_Stop(#True).
PureXML_ParseStop([resumable.l]) ; Stops the current parsing.
_______________________________________________________________________________________________________________
List of PureXML Handlers :
PureXML_SetAttributeHandler(*hProcedure) ; PureXML Handler: Attribute (name, value) of an element.
PureXML_SetCDataSectionHandler(*hProcedure1, *hProcedure2) ; PureXML Handler: Start and End of a CDATA Section.
PureXML_SetCharacterDataHandler(*hProcedure) ; PureXML Handler: Characters data between two elements.
PureXML_SetCloseHandler(*hProcedure) ; PureXML Handler: End of an element.
PureXML_SetCommentHandler(*hProcedure) ; PureXML Handler: Comments.
PureXML_SetDefaultHandler(*hProcedure) ; PureXML Handler: Default.
PureXML_SetElementHandler(*hProcedure1, *hProcedure2) ; PureXML Handler: Start and End of an element.
PureXML_SetEndCDataSectionHandler(*hProcedure) ; PureXML Handler: End of a CDATA Section.
PureXML_SetOpenHandler(*hProcedure) ; PureXML Handler: Start of an element.
PureXML_SetStartCDataSectionHandler(*hProcedure) ; PureXML Handler: Start of a CDATA Section.
PureXML_SetXmlHandler(*hProcedure) ; PureXML Handler: Xml Declaration.
_______________________________________________________________________________________________________________
PureXML Handlers syntax :
Procedure myAttribute(name.s, attrName.s, attrValue.s)
EndProcedure
Procedure myCharacterData(name.s, string.s, length.l)
EndProcedure
Procedure myComment(name.s, string.s, length.l)
EndProcedure
Procedure myDefault(name.s, string.s, length.l)
EndProcedure
Procedure myEndElement(name.s, depth.l)
EndProcedure
Procedure myEndCDataSection(name.s, string.s, length.l, position.l)
EndProcedure
Procedure myStartCDataSection(name.s, position.l)
EndProcedure
Procedure myStartElement(name.s, depth.l)
EndProcedure
Procedure myXml(xml_version.s, xml_encoding.s)
EndProcedure
_______________________________________________________________________________________________________________
Best Regards, flype 2007.
Posted: Mon Jan 15, 2007 1:52 pm
by Flype
Here is a small example to introduce PureXML2.
This shows how to very easily retrieves partial informations
from a distant XML document using ParseUrl() and the CharacterData handler.
Code: Select all
Global result$
Procedure.l Extract_From_IpPages(name.s, string.s, length.l)
Select name ; tag name
Case "ip": result$ + "IP V4: " + #TAB$ + string + #CRLF$
Case "ip_long": result$ + "IP: " + #TAB$ + string + #CRLF$
Case "ipv6": result$ + "IP V6: " + #TAB$ + string + #CRLF$
Case "host": result$ + "HOST: " + #TAB$ + string + #CRLF$
Case "isp": result$ + "ISP: " + #TAB$ + string + #CRLF$
Case "country": result$ + "CTRY: " + #TAB$ + string + #CRLF$
EndSelect
EndProcedure
If MessageRequester("Question", "Resolves your IP Address from `ippages.com` ?", #MB_OKCANCEL|#MB_ICONQUESTION) = #IDOK
PureXML_SetCharacterDataHandler(@Extract_From_IpPages())
If PureXML_ParseUrl("http://www.ippages.com/xml/")
If MessageRequester("Copy the result to the clipboard ?", result$, #MB_OKCANCEL|#MB_ICONINFORMATION) = #IDOK
SetClipboardText(result$)
EndIf
Else
MessageRequester("Error", PureXML_GetErrorString(), #MB_ICONERROR)
EndIf
EndIf