EasyPreview ?

Post Reply
Frafive
Posts: 189
Joined: Wed Apr 05, 2006 9:48 pm

EasyPreview ?

Post by Frafive »

Hola


Alguien sabe si el EasyPreview permite exportar a pdf ? me he bajado la demo y no me aparece ese opción por ningun sitio.
Last edited by Frafive on Mon Dec 18, 2006 10:06 pm, edited 1 time in total.
User avatar
Manuel Aranda
Posts: 561
Joined: Wed Oct 19, 2005 8:20 pm
Location: España

Re: EasyPreview ?

Post by Manuel Aranda »

Frafive wrote:Hola


Alguien sabe si el EasyPreview no permite exportar a pdf ? me he bajado la demo y no me aparece ese opción por ningun sitio.
Antiguamente lo permitía en versiones antiguas, pero al parecer daba problemas y eliminaron esa posibilidad.
Un saludo,
Manuel
Frafive
Posts: 189
Joined: Wed Apr 05, 2006 9:48 pm

Post by Frafive »

Por favor alguien que utilize el EasyPreview me puede confirmar si se puede exportar a PDF
Ruben Fernandez
Posts: 366
Joined: Wed Aug 30, 2006 5:25 pm
Location: Uruguay

Post by Ruben Fernandez »

Frafive:

Yo uso EasyPreview, no se puede exportar a PDF
antiguamente lo hacia, pero según sus autores
la DLL que lo hacia era muy cara para seguir incluyendola.

Saludos

Ruben Fernandez.
User avatar
reinaldocrespo
Posts: 918
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Post by reinaldocrespo »

FraFive;

Easypreview NO exporta a PDF. Sin embargo, existe una manera barata y facil de exportar a pdf usando un 3rd party library.

Haz search en el foro en inglés por el tema de PDF y verás un post de Tim Stone donde muestra como hacerlo. Yo simplemente seguí los pasos que el ofrece y me funcionó perfectamente.

el link es:
http://fivetechsoft.com/forums/viewtopic.php?t=4757


Saludos,



Reinaldo.
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

Post by Armando »

Reinaldo:

Te importaría enviarme un pequeño ejemplo de cómo lograr exportar a PDF ?

Lo he intentado pero sin éxito.

Saludos y muchas gracias, Armando
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
reinaldocrespo
Posts: 918
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Post by reinaldocrespo »

Llamas la funcion de abajo enviando como parametro las pagianas que genera treport (ameta) y como segundo parametro envias el nombre que le quieres dar al pdf.

Observa que no hay nada nuevo ni diferente a lo que hace Tim Stone en el link que te envié y que tienes que adquirir Image2pdf.dll. Ese es el truco. Para adquirir el .dll sigue el link donde Tim Stone explica como y donde adquirirlo. Funciona muy bien.

Code: Select all

*-------------------------------------------------------------------------------------------------------------------------------
FUNCTION BuildPDF( aFiles, cPdfFileName )
LOCAL imageFilename := "   "
LOCAL ix
LOCAL iErr := 0
LOCAL errorText := "  "
LOCAL hLib := LoadLib32( "image2PDF.dll" )
TRY
	if ValType( aFiles ) == "A"

		iErr := IPMeta( )		// Flag that his is a meta file
		iErr := IPSize( )		// Reset the size

		FOR ix := 1 TO LEN( aFiles )	// Build the pages using the array of temp files
			imageFilename := aFiles[ix]
			iErr := IPAddImg(imageFilename)
		NEXT

		iErr := IPSetDPI(0)	// Set DPI to the default for PDF's.  It works better.
		iErr := IPMakePDF(cPdfFileName, 0, errorText, 40 )	// Create the PDF.

	Endif
CATCH
	FreeLib32( hLib )
END
RETURN( cPdfFilename )

*-------------------------------------------------------------------------------------------------------------------------------

DLL32 STATIC FUNCTION COPYEMF( hEMF AS LONG, cEMF AS LPSTR ) AS LONG;
   PASCAL FROM "CopyEnhMetaFileA" LIB "gdi32.dll"

DLL32 STATIC FUNCTION WMF2EMF( cWMF AS LPSTR ) AS LONG ;
   PASCAL FROM "Wmf2Emf" LIB "emf.dll"

DLL32 STATIC FUNCTION DELETEEMF( hEMF AS LONG ) AS BOOL ;
   PASCAL FROM "DeleteEMF" LIB "emf.dll"

DLL32 STATIC FUNCTION I2PLic( cLicCode AS LPSTR) AS LONG;
   PASCAL FROM "I2PDF_License" LIB "Image2PDF.dll"

DLL32 STATIC FUNCTION IPMeta( ) AS LONG;
   PASCAL FROM "I2PDF_MetaToNativePDF" LIB "Image2PDF.dll"

DLL32 STATIC FUNCTION IPSize( ) AS LONG;
   PASCAL FROM "I2PDF_UseEMFDeviceSize" LIB "Image2PDF.DLL"

//  static unsigned int I2PDF_AddImage(char *image);
DLL32 STATIC FUNCTION IPAddImg( cImage AS LPSTR ) AS LONG;
   PASCAL FROM "I2PDF_AddImage" LIB "Image2PDF.dll"

//  static unsigned int I2PDF_SetDPI(unsigned int dpi);
DLL32 STATIC FUNCTION IPSetDpi( nDpi AS LONG ) AS LONG;
   PASCAL FROM "I2PDF_SetDPI" LIB "Image2PDF.dll"

//   static unsigned int I2PDF_MakePDF(char *output, int options, char *errorText, unsigned int maxErrorTextSize);
DLL32 STATIC FUNCTION IPMakePDF( cOutFile AS LPSTR, nOptions AS LONG, cErrTxt AS LPSTR, nMaxESize AS LONG ) AS LONG;
   PASCAL FROM "I2PDF_MakePDF" LIB "Image2PDF.dll"


User avatar
wmormar
Posts: 1050
Joined: Fri Oct 07, 2005 10:41 pm
Location: México
Contact:

Post by wmormar »

reinaldocrespo wrote:Llamas la funcion de abajo enviando como parametro las pagianas que genera treport (ameta) y como segundo parametro envias el nombre que le quieres dar al pdf.

Observa que no hay nada nuevo ni diferente a lo que hace Tim Stone en el link que te envié y que tienes que adquirir Image2pdf.dll. Ese es el truco. Para adquirir el .dll sigue el link donde Tim Stone explica como y donde adquirirlo. Funciona muy bien.

Code: Select all

*-------------------------------------------------------------------------------------------------------------------------------
FUNCTION BuildPDF( aFiles, cPdfFileName )
LOCAL imageFilename := "   "
LOCAL ix
LOCAL iErr := 0
LOCAL errorText := "  "
LOCAL hLib := LoadLib32( "image2PDF.dll" )
TRY
	if ValType( aFiles ) == "A"

		iErr := IPMeta( )		// Flag that his is a meta file
		iErr := IPSize( )		// Reset the size

		FOR ix := 1 TO LEN( aFiles )	// Build the pages using the array of temp files
			imageFilename := aFiles[ix]
			iErr := IPAddImg(imageFilename)
		NEXT

		iErr := IPSetDPI(0)	// Set DPI to the default for PDF's.  It works better.
		iErr := IPMakePDF(cPdfFileName, 0, errorText, 40 )	// Create the PDF.

	Endif
CATCH
	FreeLib32( hLib )
END
RETURN( cPdfFilename )

*-------------------------------------------------------------------------------------------------------------------------------

DLL32 STATIC FUNCTION COPYEMF( hEMF AS LONG, cEMF AS LPSTR ) AS LONG;
   PASCAL FROM "CopyEnhMetaFileA" LIB "gdi32.dll"

DLL32 STATIC FUNCTION WMF2EMF( cWMF AS LPSTR ) AS LONG ;
   PASCAL FROM "Wmf2Emf" LIB "emf.dll"

DLL32 STATIC FUNCTION DELETEEMF( hEMF AS LONG ) AS BOOL ;
   PASCAL FROM "DeleteEMF" LIB "emf.dll"

DLL32 STATIC FUNCTION I2PLic( cLicCode AS LPSTR) AS LONG;
   PASCAL FROM "I2PDF_License" LIB "Image2PDF.dll"

DLL32 STATIC FUNCTION IPMeta( ) AS LONG;
   PASCAL FROM "I2PDF_MetaToNativePDF" LIB "Image2PDF.dll"

DLL32 STATIC FUNCTION IPSize( ) AS LONG;
   PASCAL FROM "I2PDF_UseEMFDeviceSize" LIB "Image2PDF.DLL"

//  static unsigned int I2PDF_AddImage(char *image);
DLL32 STATIC FUNCTION IPAddImg( cImage AS LPSTR ) AS LONG;
   PASCAL FROM "I2PDF_AddImage" LIB "Image2PDF.dll"

//  static unsigned int I2PDF_SetDPI(unsigned int dpi);
DLL32 STATIC FUNCTION IPSetDpi( nDpi AS LONG ) AS LONG;
   PASCAL FROM "I2PDF_SetDPI" LIB "Image2PDF.dll"

//   static unsigned int I2PDF_MakePDF(char *output, int options, char *errorText, unsigned int maxErrorTextSize);
DLL32 STATIC FUNCTION IPMakePDF( cOutFile AS LPSTR, nOptions AS LONG, cErrTxt AS LPSTR, nMaxESize AS LONG ) AS LONG;
   PASCAL FROM "I2PDF_MakePDF" LIB "Image2PDF.dll"


Reinaldo,

Así lo uso y me sale un mensaje de:

MODO EVALUATION

a ti, te sale igual el mensaje?

william morales
William, Morales
Saludos

méxico.sureste
Post Reply