Re: [fpc-pascal] wkhtmltopdf - trying use h2pas...

2011-02-07 Thread ik
On Sun, Feb 6, 2011 at 19:29, Marcos Douglas  wrote:

> On Sat, Feb 5, 2011 at 8:59 AM, ik  wrote:
> >
> > Webkit already translated to Pascal, and you use the API, and the amount
> of
> > time to use the API is shorter then the amount of time to translate the
> > header files imho.
>
> Well... I didn't know that...
>
> > You need to load the page to the browser and use the printer api to print
> it
> > to pdf (you can also control how exactly it is done), and tell it where
> to
> > store the pdf.
>
> Not. My program receive a HTML file and convert to PDF file. Just it.
> This program will be used from a site coded in (old) ASP, via an
> (wrapper) ActiveX.


> My first option is use the wkhtmltopdf lib (dll) in my ActiveX. The
> second option is use the wkhtmltopdf binary together at my program
> (easy way).
>

Does the html contain all of the style that requires including images (if
existed) ?
Please note that the CSS need to be set for printing that is a bit different
then viewing.


>
> I got the the lib to Win
>
> http://users.telenet.be/Jan.Van.hijfte/qtforfpc/win_bin-qt4pas-V2.1_Qt4.5.3.zip
> There are many functions in qt4.pas... Could you tell me what
> functions I can use to do the convertion above?
>

It contain examples on how to use webkit (please look at them, they does all
you require), but you do not require to use the whole API, only small parts
of it of  webkit and the printing
API .


>
> There is a SVN from sources? Who works in this project?
>

There are few people who work on this some are on this and Lazarus malling
lists.




>
>
> Marcos Douglas
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>


Ido
LINESIP - Opening the source for communication
http://www.linesip.com
http://www.linesip.co.il
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: Correct use of var in function calls?

2011-02-07 Thread michael . vancanneyt



On Sun, 6 Feb 2011, Florian Klämpfl wrote:


Am 06.02.2011 18:53, schrieb Bo Berglund:


So in summary:
If the called method changes the length of teh dynamic array it must
be passed as a var, otherwise the length change will be lost when
exiting the method.


I'd even propose that one uses var as soon as he plans to change the
array. It makes the code easier to understand.


Indeed. It indicates that you expect the array to be changed.

Michael.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] wkhtmltopdf - trying use h2pas...

2011-02-07 Thread Marcos Douglas
On Mon, Feb 7, 2011 at 5:18 AM, ik  wrote:
>
> Does the html contain all of the style that requires including images (if
> existed) ?
> Please note that the CSS need to be set for printing that is a bit different
> then viewing.

The CSS files are in .css extension files.
I don't have concern about this if I use th wkhtmltopdf lib. In my
tests everything works fine.

>> I got the the lib to Win
>>
>> http://users.telenet.be/Jan.Van.hijfte/qtforfpc/win_bin-qt4pas-V2.1_Qt4.5.3.zip
>> There are many functions in qt4.pas... Could you tell me what
>> functions I can use to do the convertion above?
>
> It contain examples on how to use webkit (please look at them, they does all
> you require), but you do not require to use the whole API, only small parts
> of it of webkit and the printing API.

Printing API... sorry, are you sure? The Printing API can convert
files at another types?
Could you send (in private) a little example for this, please?

>> There is a SVN from sources? Who works in this project?
> There are few people who work on this some are on this and Lazarus malling
> lists.

I registered me on the qt-list http://lists.lazarus.freepascal.org/pipermail/qt


Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Javascript in Desktop Applications

2011-02-07 Thread Anthony Walter
Over at stackoverflow someone
asked,
"Is it possible to utilize javascript in the making of windows desktop
applications". I wrote up a pascal based solution to add javascript access
to your desktop programs. If you have any interest in my solution you can
view it here (source code included):

http://www.codebot.org/delphi/?doc=9573
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Javascript in Desktop Applications

2011-02-07 Thread michael . vancanneyt



On Mon, 7 Feb 2011, Anthony Walter wrote:


Over at stackoverflow someone
asked,
"Is it possible to utilize javascript in the making of windows desktop
applications". I wrote up a pascal based solution to add javascript access
to your desktop programs. If you have any interest in my solution you can
view it here (source code included):

http://www.codebot.org/delphi/?doc=9573



A cross-platform solution is to use one of libsee or BESEN.

The latter is implemented in 100% native Object Pascal.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Javascript in Desktop Applications

2011-02-07 Thread Andrew Brunner
On Mon, Feb 7, 2011 at 7:35 AM,   wrote:
> A cross-platform solution is to use one of libsee or BESEN.
>
> The latter is implemented in 100% native Object Pascal.
>
> Michael.

BESEN is very, very, very  well written but I can't seem to get any
indication how to use it in my project.  I would love FPC to include a
JIT system for JS or Pascal.  IMO, FPC absolutely needs a scripting
FCL going forward.  BESEN seems like the right guy for the job, but I
suspect he's burned out :-(  I think he had memory concerns too.

Does anyone have any BESEN examples that integrated actual FPC units?
It seems like all the samle js units are self contained with no
interface to system or GUI units.

Including JS support on my project would enable people to leverage
exiting "proven" technologies which would make for easier/allowable
for adoption in working groups / houses where selection of language is
restricted to language of the day :-)  Taking this statment and
applying this across the board, it would be an easier sell for
adoption of FPC/Lazarus with JIT support.  Personally, I'm thinking
along the lines of Web RAD down the road...
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Javascript in Desktop Applications

2011-02-07 Thread michael . vancanneyt



On Mon, 7 Feb 2011, Andrew Brunner wrote:


On Mon, Feb 7, 2011 at 7:35 AM,   wrote:

A cross-platform solution is to use one of libsee or BESEN.

The latter is implemented in 100% native Object Pascal.

Michael.


BESEN is very, very, very  well written but I can't seem to get any
indication how to use it in my project.  I would love FPC to include a
JIT system for JS or Pascal.  IMO, FPC absolutely needs a scripting
FCL going forward.  BESEN seems like the right guy for the job, but I
suspect he's burned out :-(  I think he had memory concerns too.


Does anyone have any BESEN examples that integrated actual FPC units?
It seems like all the samle js units are self contained with no
interface to system or GUI units.


Including JS support on my project would enable people to leverage
exiting "proven" technologies which would make for easier/allowable
for adoption in working groups / houses where selection of language is
restricted to language of the day :-)  Taking this statment and
applying this across the board, it would be an easier sell for
adoption of FPC/Lazarus with JIT support.  Personally, I'm thinking
along the lines of Web RAD down the road...


Well, if you can't get BESEN to work, libsee definitely does.
I even have an article on how to do it.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Javascript in Desktop Applications

2011-02-07 Thread Brian Winfrey
On Mon, Feb 7, 2011 at 6:27 AM,   wrote:
>
>
> On Mon, 7 Feb 2011, Andrew Brunner wrote:
>
>> On Mon, Feb 7, 2011 at 7:35 AM,   wrote:
>>>
>>> A cross-platform solution is to use one of libsee or BESEN.
>>>
>>> The latter is implemented in 100% native Object Pascal.
>>>
>>> Michael.
>>
>> BESEN is very, very, very  well written but I can't seem to get any
>> indication how to use it in my project.  I would love FPC to include a
>> JIT system for JS or Pascal.  IMO, FPC absolutely needs a scripting
>> FCL going forward.  BESEN seems like the right guy for the job, but I
>> suspect he's burned out :-(  I think he had memory concerns too.
>>
>>
>> Does anyone have any BESEN examples that integrated actual FPC units?
>> It seems like all the samle js units are self contained with no
>> interface to system or GUI units.
>>
>>
>> Including JS support on my project would enable people to leverage
>> exiting "proven" technologies which would make for easier/allowable
>> for adoption in working groups / houses where selection of language is
>> restricted to language of the day :-)  Taking this statment and
>> applying this across the board, it would be an easier sell for
>> adoption of FPC/Lazarus with JIT support.  Personally, I'm thinking
>> along the lines of Web RAD down the road...
>
> Well, if you can't get BESEN to work, libsee definitely does.
> I even have an article on how to do it.
>
> Michael.
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>

I have some interest in exploring javascript implementations for fpc.
http://code.google.com/p/fpcjs/  -- Is this comparable to what you have noted?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Javascript in Desktop Applications

2011-02-07 Thread Michael Van Canneyt



On Mon, 7 Feb 2011, Brian Winfrey wrote:



Well, if you can't get BESEN to work, libsee definitely does.
I even have an article on how to do it.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



I have some interest in exploring javascript implementations for fpc.
http://code.google.com/p/fpcjs/  -- Is this comparable to what you have noted?


No, that project embeds mozilla in FPC.

Michael.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Javascript in Desktop Applications

2011-02-07 Thread Andrew Brunner
On Mon, Feb 7, 2011 at 10:39 AM, Brian Winfrey  wrote:
>
> I have some interest in exploring javascript implementations for fpc.
> http://code.google.com/p/fpcjs/  -- Is this comparable to what you have noted?

Actually fpcjs is the first project that I, (myself), have seen that
addresses the gateway issue of accessing application level methods.
Granted fcpjs (currently) only supports one type of callback(variant
array):variant.  The only issue I see is having a quasi fpc/js design
restriction in developing apps with no OOP - coding low-level linear
methods(for register) with maps to JS object counterparts.  The other
MAJOR issue is that callbacks via Register are not working on Linux
!?!.   Docs said they needed something about native registration.  But
this project looks lightweight enough on its face.

I'm at a point in my project where I think I am needing something like
this.  In an ideal world, any application level scripting engine
should know how to interface with FPC objects @ runtime w/o variants.

Currently, my largest problem is  because without things like scripting :
  * Admins must rebuild the service exe every time back-end objects
are modified.
  * Production environments where each binary is installed on a
different device across the network cluster(s)/node(s) will have
different versions.
  * Auto-build or auto-updates via distribution system will most
likely lead to problems for either us or for Admins during deployment.

The use of a scripting engine would resolve these problems.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Javascript in Desktop Applications

2011-02-07 Thread Andrew Brunner
Hmmm...  Mozilla is open source... :-)  We are free to port the
Scripting Engine to Pascal as long as we have the source? no?

On Mon, Feb 7, 2011 at 11:31 AM, Michael Van Canneyt
 wrote:
> No, that project embeds mozilla in FPC.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal