FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Jpeg to PDF
Posts: 332
Joined: Thu Nov 17, 2005 09:11 PM
Jpeg to PDF
Posted: Fri Mar 06, 2009 04:27 PM

Hi all,

I use Tscan32 class and works fantastic, but i want to transform a .jpeg picture saved by tscan32 to pdf document.
Any idea? I search in google about command line image converter but dont found any free solution.
Thanks in advance.
Wanderson.

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Jpeg to PDF
Posted: Fri Mar 06, 2009 06:45 PM
Hello,

You can use NCONVERT inside Your application in Command-line-mode
NCONVERT is free of charge

A sample :
same name with new format and resize ( TIFF to JPG ) :

cSCRIPT := "NCONVERT -out jpeg -resize 100 100 d:\T_VIEWER\IMAGE\A_LOGO1.TIFF"
WINEXEC ( "&cSCRIPT", 0 )

Download
http://www.brothersoft.com/nconvert-108781.html

Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Re: Jpeg to PDF
Posted: Fri Mar 06, 2009 08:23 PM
Wanderson wrote:I use Tscan32 class and works fantastic, but i want to transform a .jpeg picture saved by tscan32 to pdf document.
Any idea? I search in google about command line image converter but dont found any free solution.
Thanks in advance.
Hi Wanderson:

You can do it directly from your FWH app usig TPdf class.

Here you can download TPdf class with a working xHarbour sample program: http://www.box.net/shared/qfbeha7cb7

Regards.

Manuel Mercado
manuelmercado at prodigy dot net dot mx
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: Jpeg to PDF
Posted: Fri Mar 06, 2009 09:54 PM

Manuel;

While you are on-line, would you mind helping with class tsbutton?

Recently one of my users discovered that by rightclicking on tsbar he can reproduce this error:

Error description: Error BASE/1004 Message not found: TSAY:LGROUP

Stack Calls

Called from: => TSAY:ERROR(179)
Called from: tobject.prg => (b)HBOBJECT:HBOBJECT(105)
Called from: => TSAY:MSGNOTFOUND(0)
Called from: SAY.PRG => TSAY:LGROUP(167)
Called from: tsbar.PRG => TSBAR:BTNADJUST(284)
Called from: tsbar.PRG => TSBAR:GOLEFT(574)
Called from: tsbar.PRG => (b)TSBAR:RBUTTONDOWN(494)
Called from: MENU.PRG => TMENU:ACTIVATE(0)
Called from: tsbar.PRG => TSBAR:RBUTTONDOWN(507)
Called from: window.prg => TWINDOW:HANDLEEVENT(0)
Called from: CONTROL.PRG => TSBAR:HANDLEEVENT(0)
Called from: window.prg => _FWH(3160)
Called from: => WINRUN(0)
Called from: window.prg => TMDIFRAME:ACTIVATE(883)
Called from: main.prg => START(82)

I tried to copile the latest tsbutton but bpaint.c yields 17 errors.

Can you help?

Thank you,

reinaldo.crespo@gmail.com

Posts: 332
Joined: Thu Nov 17, 2005 09:11 PM
Re: Jpeg to PDF
Posted: Fri Mar 06, 2009 10:09 PM
mmercado wrote:
Wanderson wrote:I use Tscan32 class and works fantastic, but i want to transform a .jpeg picture saved by tscan32 to pdf document.
Any idea? I search in google about command line image converter but dont found any free solution.
Thanks in advance.
Hi Wanderson:

You can do it directly from your FWH app usig TPdf class.

Here you can download TPdf class with a working xHarbour sample program: http://www.box.net/shared/qfbeha7cb7

Regards.

Manuel Mercado


Thanks Manuel but i receive this erros:

Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external '_compress' referenced from E:\LANG\FWH0805\XH1.1.0\LIB\RTL.LIB|hbcomprs
Error: Unresolved external '_uncompress' referenced from E:\LANG\FWH0805\XH1.1.0\LIB\RTL.LIB|hbcomprs
Error: Unresolved external '_zError' referenced from E:\LANG\FWH0805\XH1.1.0\LIB\RTL.LIB|hbcomprs
Posts: 332
Joined: Thu Nov 17, 2005 09:11 PM
Re: Jpeg to PDF
Posted: Fri Mar 06, 2009 10:15 PM
ukoenig wrote:Hello,

You can use NCONVERT inside Your application in Command-line-mode
NCONVERT is free of charge

A sample :
same name with new format and resize ( TIFF to JPG ) :

cSCRIPT := "NCONVERT -out jpeg -resize 100 100 d:\T_VIEWER\IMAGE\A_LOGO1.TIFF"
WINEXEC ( "&cSCRIPT", 0 )

Download
http://www.brothersoft.com/nconvert-108781.html

Regards
Uwe :-)


Thanks ukoening but nconvert dont makes pdf.
:-)
Posts: 332
Joined: Thu Nov 17, 2005 09:11 PM
Re: Jpeg to PDF
Posted: Fri Mar 06, 2009 10:32 PM
Wanderson wrote:
mmercado wrote:
Wanderson wrote:I use Tscan32 class and works fantastic, but i want to transform a .jpeg picture saved by tscan32 to pdf document.
Any idea? I search in google about command line image converter but dont found any free solution.
Thanks in advance.
Hi Wanderson:

You can do it directly from your FWH app usig TPdf class.

Here you can download TPdf class with a working xHarbour sample program: http://www.box.net/shared/qfbeha7cb7

Regards.

Manuel Mercado


Thanks Manuel but i receive this erros:

Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external '_compress' referenced from E:\LANG\FWH0805\XH1.1.0\LIB\RTL.LIB|hbcomprs
Error: Unresolved external '_uncompress' referenced from E:\LANG\FWH0805\XH1.1.0\LIB\RTL.LIB|hbcomprs
Error: Unresolved external '_zError' referenced from E:\LANG\FWH0805\XH1.1.0\LIB\RTL.LIB|hbcomprs


In link file i put the hbzip.lib and links well but i change nomina1.jpg in test program to myimage.jpg and not work, display a blank pdf page.

Thanks.
Posts: 332
Joined: Thu Nov 17, 2005 09:11 PM
Re: Jpeg to PDF
Posted: Fri Mar 06, 2009 10:44 PM
Wanderson wrote:
ukoenig wrote:Hello,

You can use NCONVERT inside Your application in Command-line-mode
NCONVERT is free of charge

A sample :
same name with new format and resize ( TIFF to JPG ) :

cSCRIPT := "NCONVERT -out jpeg -resize 100 100 d:\T_VIEWER\IMAGE\A_LOGO1.TIFF"
WINEXEC ( "&cSCRIPT", 0 )

Download
http://www.brothersoft.com/nconvert-108781.html

Regards
Uwe :-)


Thanks ukoening but nconvert dont makes pdf.
:-)


Sorry, i tried: nconvert -out pdf myjpg.jpg and works well but the size of pdf is the same of jpg. My intention to save jpg to pdf is decrese the size.
Thanks.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Jpeg to PDF
Posted: Fri Mar 06, 2009 11:46 PM

Hello Wanderson,

NCONVERT includes a very powerful Batch-language.
The line above is just a small sample what is possible.
You can visit the forum, to find a solution, if You need something special.

The brandnew version 5.5 You can download from here :

http://xnview.com/en/index.html

The forum ( You can ask for solutions there )

http://newsgroup.xnview.com/viewforum.p ... 5e88024987

Regards
Uwe :lol:

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 332
Joined: Thu Nov 17, 2005 09:11 PM
Re: Jpeg to PDF
Posted: Fri Mar 06, 2009 11:53 PM
ukoenig wrote:Hello Wanderson,

NCONVERTS includes a very powerful scripting-language.
The line above is just a small sample what is possible.
You can visit the forum, to find a solution, if You need something special.

Regards
Uwe :-)


Thanks ukoening i tried: Nconvert -out pdf -c 4 myimage.jpg and works great, reduce about 50%.
Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Re: Jpeg to PDF
Posted: Sat Mar 07, 2009 06:25 AM
reinaldocrespo wrote:I tried to copile the latest tsbutton but bpaint.c yields 17 errors.
Hi Reynaldo:

I can't reproduce the error you mention. Here you are SButtonx.rmk to build last version of SButtonx.lib with RMake.

Code (fw): Select all Collapse
// defining some preprocessor directives for bcc32
Def ="__HARBOUR__"

// defining paths
BC ="c:\bcc55"
FW ="c:\FWH"
HB ="c:\xHarbour"
makepath[.prg] ="..\source\classes"
makepath[.c] =".\;..\source\function"

.prg.c:
   $(HB)\bin\harbour $< /n  /i..\include;$(FW)\include;$(HB)\include > comp.log

.c.obj:
   $(BC)\bin\bcc32 -D$(Def) -O2 -c -I$(HB)\include;$(FW)\include $<  >> comp.log

TSButton.c     : TSButton.prg
TSBar.c        : TSBar.prg
TSLines.c      : TSLines.prg
TSRadio.c      : TSRadio.prg
TSTSay.c       : TSTSay.prg
TSGradie.c     : TSGradie.prg
TSButton.obj   : TSButton.c
TSBar.obj      : TSBar.c
TSLines.obj    : TSLines.c
TSRadio.obj    : TSRadio.c
TSTSay.obj     : TSTSay.c
TSGradie.obj   : TSGradie.c
BPaint.obj     : BPaint.c
TSButton.exe   : BPaint.obj TSButton.obj TSBar.obj TSLines.obj TSRadio.obj TSTSay.obj TSGradie.obj
                 Del SButtonX.lib
                 $(BC)\bin\Tlib SButtonX +TSButton  > Lib.log
                 $(BC)\bin\Tlib SButtonX +BPaint   >> Lib.log
                 $(BC)\bin\Tlib SButtonX +TSBar    >> Lib.log
                 $(BC)\bin\Tlib SButtonX +TSLines  >> Lib.log
                 $(BC)\bin\Tlib SButtonX +TSRadio  >> Lib.log
                 $(BC)\bin\Tlib SButtonX +TSTSay   >> Lib.log
                 $(BC)\bin\Tlib SButtonX +TSGradie >> Lib.log
                 Del *.c
                 Del *.obj
                 Del *.log
                 Del *.bak

Please let me know the result.

Best regards.

Manuel Mercado
manuelmercado at prodigy dot net dot mx
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: Jpeg to PDF
Posted: Sat Mar 07, 2009 01:57 PM

Manuel;

Gracias por la respuesta. Parece que has cambiado TsButton bastante. Yo no tengo Tsgradient. Seguramente es uno de los cambios. Me puedes enviar todo o decirme de donde lo puedo tomar? Si me la vas a enviar, por favor envia a reinaldo.crespo@gmail.com.

Gracias.

Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Jpeg to PDF
Posted: Tue Mar 10, 2009 04:00 AM
ukoenig wrote:Hello,
NCONVERT is free of charge


I think possibility exist that it's only free for non-commercial use as hinted here http://xnview.com/en/nconvert.html
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Jpeg to PDF
Posted: Sun May 24, 2009 04:13 PM
Mr Manuel Mercado
You can do it directly from your FWH app usig TPdf class.

Here you can download TPdf class with a working xHarbour sample program: http://www.box.net/shared/qfbeha7cb7

Regards.

Manuel Mercado

The TPdf class is able to covert jpg, tiff and png files only into pdf. Are you aware of any utility that can convert emf files into pdf ? Nconvert can do it, but I am looking for a library that I can link to my application.

Actually my requirement is to save print preview as pdf file.
Regards



G. N. Rao.

Hyderabad, India
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: Jpeg to PDF
Posted: Sun May 24, 2009 10:32 PM
nageswaragunupudi;

Look no further. Nothing is better than Image2Pdf. A .dll with a .prg that you can compile and link with you app royalty free. ...And the support is incredibly good.

http://www.utilitywarrior.com/Image-to-PDF-Dynamic-Link-Library-Versions.htm

Extremely good library. I recommend it without any reservations.


Reinaldo.