JPG > PDF and viceversa

User avatar
Badara Thiam
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France
Contact:

Re: JPG > PDF and viceversa

Post by Badara Thiam »

Stefan,

I come back to see the third possibility, thanks
Badara Thiam
http://www.icim.fr
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

Re: JPG > PDF and viceversa

Post by Gale FORd »

You can use PageScript 32 to create PDF files.
User avatar
Badara Thiam
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France
Contact:

Re: JPG > PDF and viceversa

Post by Badara Thiam »

PageScript is a good product also. I used it in the past when i develop for DOS.
I let it down because i have writted all functions needed under Windows to replace it,
for free space in my install packs and for have more direct acces to the printer (without PageScript Spooler).
Since, the work print is also more quick.
Badara Thiam
http://www.icim.fr
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: JPG > PDF and viceversa

Post by nageswaragunupudi »

Are not others ways to create FWH PDFs without Office, and without this enormous capacity needed for one page, 4 mb ?
Yes, there are many other ways. Many third party print drivers or libraries, some free and some priced, are available, which produce better quality output with very compact size. It is the programmer's decision to use them and that might be a better decision where the project requires it.

Even I use my preferred libraries in the projects I personally develop for commercial purposes.

When a programmer decides to use his preferred method, it is recommended that he may assign his function to the codeblock TPreview():bSaveAsPDF, at the beginning of the Main() function.

Code: Select all

TPreview():bSaveAsPDF := { |oPrev, cPDF, lPreview| CustomFunction( oPrev, cPDF, lPreview ) }
cPdf and lPreview are optional. The function should return the PDF file name created with path. Returning NIL indicates that PDF is not created.

There are cases when some programmers prefer not to use printer drivers or considers that a project does not justify the investment of the required time and/or money to incorporate a 3rd party library. In such cases FWH provides a last fall back option to export to PDF without using any 3rd party drivers or libraries.

FWH prefers not to depend on 3rd party drivers or external libraries for its own function.

There is probably scope for compaction of the output and we shall be working on it in due course. FWH also highly appreciates contribution of any original code for conversion of EMF to PDF, provided the code does not depend on any 3rd party libraries/drivers and not borrowed from any 3rd party source.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Badara Thiam
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France
Contact:

Re: JPG > PDF and viceversa

Post by Badara Thiam »

Rao,

Thank for yours explains. I shall share my work to FWH community, about conversion emf to pdf,
if i can help on this.

Best regards.
Badara Thiam
http://www.icim.fr
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

Re: JPG > PDF and viceversa

Post by Gale FORd »

PageScript32 can output to PDF or EMF. It is DLL based so there is no special installation or .com to register.

Here is help file for setting what type of output.
Syntax

PSSetDevice(nDevice)
TPageScript:SetDevice(nDevice)

Returns

NIL.

Description

Use PSSetDevice() to select the device to use for the next print job. By default, the device is DEV_PRINTER.

Arguments
nDevice Desired device for the next print job.

Devices
Constant Value Description
DEV_PRINTER 1 The output is sent to the selected printer.
DEV_PREVIEW 2 The output is sent to the print preview dialog box
DEV_PDFFILE 3 The output is saved in a .pdf file. The file name is set by calling PSSetFileName() before starting the print job.
Reserved 4 Reserved for future use
DEV_EMFFILE 5 The output is saved in a series of EMF files. The path of the files to be created is set by calling PSSetFileName() before starting the print job. Files are named Page1.emf, Page2.emf, Pagen.emf
User avatar
Badara Thiam
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France
Contact:

Re: JPG > PDF and viceversa

Post by Badara Thiam »

There is no problem to translate this function in Clipper, just STATIC global variable.
Badara Thiam
http://www.icim.fr
User avatar
Badara Thiam
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France
Contact:

Re: JPG > PDF and viceversa

Post by Badara Thiam »

Like this :

Code: Select all

*******************
FUNCTION PSSetDevice( nDevice )
*******************
* Mémorise le type de sortie : Directe, vue avant impression, .pdf
* Si nDevice = 1 : la sortie est envoyée vers l'imprimante (direct printing)
* Si nDevice = 2 : la sortie est envoyée vers la vue avant impression (Preview)
* Si nDevice = 3 : la sortie est enregistrée dans un fichier .pdf. Le fichier doit être défini avec PSSetFileName() avant de démarer le travail d'impression
* Retourne : NIL si nDevice n'est pas NIL, ou la valeur actuelle si nDevice est NIL
STATIC nDev := 1
IF nDevice = NIL
    RETURN nDev
ENDIF
nDev := nDevice
RETURN NIL
Badara Thiam
http://www.icim.fr
User avatar
fp
Posts: 76
Joined: Fri Dec 30, 2005 10:25 am
Location: Germany

Re: JPG > PDF and viceversa

Post by fp »

The end of PageScript: http://www.abeelabs.com/ ?
Frank-Peter
User avatar
Badara Thiam
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France
Contact:

Re: JPG > PDF and viceversa

Post by Badara Thiam »

fp wrote:The end of PageScript: http://www.abeelabs.com/ ?
Not today... this is a great work!
Badara Thiam
http://www.icim.fr
Post Reply