Thanks Randy
Ferdinando
Il 18/09/2017 15:21, Randy Jaynes ha scritto:
I use ImageMagick with Ghostscript.
I have utility method that I do this, and actually run it on the
server so I only have to install it there rather than on every single
client machine:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
$srcPict:=$1
$width:=$2
$height:=$3
$fileExtension:=$4
//--------------------- save the picture to a temporary file
---------------------
$srcFile:=Temporary folder+"tempPictFile."+$fileExtension
$dstFile:=Temporary folder+"tempPictFile_thumb.png"
WRITE PICTURE FILE($srcFile;$srcPict)
//--------------------- convert it using ImageMagick
---------------------
$convertPath:=System folder(Applications or Program
Files)+"ImageMagick\\" //user must install 32bit static version of IM
and be sure to change the path at installation time (default path
includes the version number)
If (Test path name($convertpath)=Is a folder) //make sure user has it
installed
$srcFileCmd:=$srcFile+"[0]" //add [0] because we only want page 1
of the document
$cmd:="convert -thumbnail
"+String($width)+"x"+String($height)+Char(Space)+Char(Double
quote)+$srcFileCmd+Char(Double quote)+Char(Space)+Char(Double
quote)+$dstFile+Char(Double quote)+Char(Carriage return)+Char(Line feed)
SET ENVIRONMENT VARIABLE("_4D_OPTION_HIDE_CONSOLE";"true")
SET ENVIRONMENT VARIABLE("_4D_OPTION_CURRENT_DIRECTORY";$convertPath)
LAUNCH EXTERNAL PROCESS("cmd.exe";$cmd;$output;$errorTxt)
End if
$0:=$dstPict
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I make sure that ImageMagick is installed into a folder in Program
Files called ‘ImageMagick’ so that I can hard code the path to the
‘convert' function above.
HTH,
Randy
----------------------------------------------------------------------
Randy Jaynes
Senior Programmer and Customer Support
http://printpoint.com • 845.687.3741 • PrintPoint, Inc • 57 Ludlow
Lane • Palisades, NY 10964
On Sep 16, 2017, at 2:18 PM, stardata.info <http://stardata.info> via
4D_Tech <[email protected] <mailto:[email protected]>> wrote:
Hi,
What use on windows?
Thanks
/Ferdinando/
Il 16/09/2017 19:43, Christian Sakowski ha scritto:
Using 4D i need to convert one PDF documento to jpeg document.
CONVERT PICTURE on Mac only, and first page only. Other pages with
hmFree.
--
Grüße/Regards,
[heubach-media] | Christian Sakowski
[email protected]
<mailto:[email protected]>
iChat/AIM: SakowskiF
Tel: +49/(0)40/52 10 59-23
Am 16.09.2017 um 12:14 schrieb stardata.info <http://stardata.info>
via 4D_Tech <[email protected] <mailto:[email protected]>>:
Hi All,
Using 4D i need to convert one PDF documento to jpeg document.
Someone know how i can do?
Thanks
Ferdinando
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************
--
heubach media
Osterfeldstr. 12-14 | Haus 1 | Eingang Nord
22529 Hamburg
tel: 040 / 52 10 59 - 10 | fax: -99
mail: [email protected] <mailto:[email protected]>
home: www.heubach-media.de <http://www.heubach-media.de>
Geschäftsführer|CEO: Matthias Heubach
Mieten Sie Ihre Computer, iPads & Drucker für Ihre Events bei:
http://www.milo-rental.com
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtümlich erhalten haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail
ist nicht gestattet.
This e-mail may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this e-mail
in error)
please notify the sender immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the
material in this e-mail is strictly forbidden.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************