FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour preview to pdf using image2pdf
Posts: 625
Joined: Wed Mar 14, 2007 06:49 PM
preview to pdf using image2pdf
Posted: Sat Apr 19, 2008 02:32 PM
Saludos de Nuevo y perd贸n otra vez por la insistencia..

Ya registra la dll como demo y no da problemas de error de protecci贸n general :-) , hasta ahi bien, pero sigo teniendo problemas con estas variables, en tiempo de ejecuci贸n no son reconocidas y no encuentro por ningun lado donde hace referencia a ellas porque no estan declaradas dentro de la funci贸n SavePDF( ::oDevice ), ni dentro de la Clase TPreview. :-) :-) :-) :-) :-)

oV:arc_dir
ov:work_st
better.
WP_GEST_PDF
oV:nModuloWP
APP_NAME

Ademas de que en esta instrucci贸n no reconoce la variable DOUBLE :-) :-)

DLL32 FUNCTION xI2PDF_BatesLocation( verticalPosition AS LONG, horizontalPosition AS LONG, orientation AS LONG, margin AS DOUBLE) AS LONG;
PASCAL FROM "I2PDF_BatesLocation" LIB "Image2PDF.dll"


Es por eso mi insistencia :-) :-) :-) en que me hechen una manita y en concer todo el c贸digo modificado que sea 100% funcional como lo han probado ustedes, para saber exactamente como trabaja y ver la posibilidad de comprar la licencia para su uso completo, me interesa esta forma de exportar los reportes a PDF, ya que ahora es lo que necesito para poder continuar con mi proyecto...

Saludos y en espera de su valiosa ayuda.. :-) :-)
Soluciones y Dise帽o de Software
Damos Soluciones...

I.S.C. Victor Daniel Cuatecatl Leon
Director y Dise帽ador de Proyectos

http://www.soldisoft.unlugar.com
http://www.sisa.unlugar.com
danyleon82@hotmail.com
www.facebook.com/victordaniel.cuatecatlleon
Posts: 326
Joined: Sun Oct 09, 2005 05:22 PM
preview to pdf using image2pdf
Posted: Sat Apr 19, 2008 05:20 PM
Olvidate de las variables quitalas y listo:

FUNCTION SavePDF(oDevice)
   LOCAL error, hLibImg2PDF
   LOCAL imageFilename:=" "
   LOCAL cPdfFilename
   LOCAL nI, iErr:=0
   LOCAL aFiles:={}, cTemp
   cPdfFileName:=cUTem+"\"+Left(cNSys,2)+"_Temp\Documento.Pdf"
   IF !File("Image2PDF.Dll")
      MsgAlert("No existe DLL para generar PDFs.","Precauci贸n!")
      RETURN (NIL)
   ENDIF
   aFiles:=oDevice:aMeta
   hLibImg2PDF:=LoadLib32("Image2PDF.Dll")
   IF ValType(aFiles)=="A"
      I2PDF_License("DEMO")
      iErr:=IPMeta()              // Flag that his is a meta file
      iErr:=IPSize()              // Reset the size
      iErr:=IPMetaAdjustText()
      iErr:=IPSetDPI(0)           // Set DPI to the default for PDF's.  It works better
      FOR nI:=1 TO Len(aFiles)    // Build the pages using the array of temp files
         CursorWait()
         imageFilename:=aFiles[nI]
         iErr:=IPAddImg(imageFilename)
      NEXT nI
      CursorWait()
      iErr:=IPMakePDF(cPdfFileName,0,error,40)   // Create the PDF.
   ENDIF
   FreeLib32(hLibImg2PDF)
   CursorArrow()
   IF !File(cPdfFileName)
      MsgInfo("No se gener贸 el archivo PDF.","Informaci贸n!")
   ELSE
      ShellExecute(,"Open",cPdfFileName,"",".\",.T.)
   ENDIF
RETURN (NIL)


Ya adquir铆 la licencia y todo bien, si deseas ver como funciona podr谩s descargar RC-extended desde mi sitio a partir de la siguiente semana.
Posts: 625
Joined: Wed Mar 14, 2007 06:49 PM
preview to pdf using image2pdf
Posted: Sat Apr 19, 2008 11:04 PM
Mucha Gracias Alfredo Arteaga :-) :-)

Ahora si ya pude realizar las pruebas y ya exporte en Reporte a PDF, quedo de maravillas, me comentas que ya compraste la licencia de uso, quisiera saber cuanto es su costo en pesos mexicanos y como hago para comprar la licencia ya que no uso tarjeta de credito, si posible el deposito bancario y de ser as铆 de cuanto ser铆a el importe..

Te dejo mi correo privado danyleon82@hotmail.com

Muchas gracias por ayudarme... :-) :-) :-) :-)

Saludos...
Soluciones y Dise帽o de Software
Damos Soluciones...

I.S.C. Victor Daniel Cuatecatl Leon
Director y Dise帽ador de Proyectos

http://www.soldisoft.unlugar.com
http://www.sisa.unlugar.com
danyleon82@hotmail.com
www.facebook.com/victordaniel.cuatecatlleon
Posts: 880
Joined: Fri Jan 12, 2007 08:35 PM
HOLA
Posted: Fri May 16, 2008 01:11 AM

Que interesante

donde se compra la libreria? es cara ??

si no es cara a la mejor yo la pago ya que donde toy trabajando son algo taca帽itos, coditos :x

Saluditos

Aida

Que es mejor que programar? creo que nada :)
Atropellada pero aqui ando :P

I love Fivewin

s茅蕦菨晒 谉蓯 蓯蕠s菨 opun莎 菨蕠s菨
Posts: 625
Joined: Wed Mar 14, 2007 06:49 PM
preview to pdf using image2pdf
Posted: Fri May 16, 2008 02:50 PM

Hola Aida buenos dias:

Para comprar la libreria ingresa en esta direcci贸n, haz click en el enlaze Buy y te pedira tus datos.

http://www.utilitywarrior.com/Image-to- ... ibrary.htm

El precio por la libreria es de $108.98 USD, yo no la he podido comprar porque no uso tarjeta de credito..

Saludos.. :lol:

Soluciones y Dise帽o de Software
Damos Soluciones...

I.S.C. Victor Daniel Cuatecatl Leon
Director y Dise帽ador de Proyectos

http://www.soldisoft.unlugar.com
http://www.sisa.unlugar.com
danyleon82@hotmail.com
www.facebook.com/victordaniel.cuatecatlleon
Posts: 880
Joined: Fri Jan 12, 2007 08:35 PM
HOLA
Posted: Fri May 16, 2008 09:35 PM

HOLA

$108.98 USD EJEM EJEM PUES CREO QUE LOS JUNTARE ANDO APRETADITA EN DINERITO A UN TENGO TERAPIA Y NO ES GRATIS

PERO MUCHAS GRACIAS YA ANOTE EL DATO

QUE TENGAS UNA BONITO FIN DE SEMANA

AIDA :wink:

Que es mejor que programar? creo que nada :)
Atropellada pero aqui ando :P

I love Fivewin

s茅蕦菨晒 谉蓯 蓯蕠s菨 opun莎 菨蕠s菨
Posts: 1144
Joined: Mon Feb 05, 2007 07:15 PM
preview to pdf using image2pdf
Posted: Sat May 17, 2008 04:45 PM

Lo mortales normalmente hacemos una vaquita.

quien se apunta..

jejej.

saludos..

Cesar Cortes Cruz

SysCtrl Software

Mexico



' Sin +- FWH es mejor "
Posts: 479
Joined: Fri Feb 16, 2007 10:29 AM
preview to pdf using image2pdf
Posted: Thu Nov 20, 2008 08:59 AM
Compa帽eros:

Segu铆 el hilo de las indicaciones, hice todas las modificaciones en mis PRG, a帽ad铆 las Lib y PRGs... Aparentemente todo ok, me compila bien y sin errores, pero al correr el EXE y visualizar el Preview no me genera el PDF y por consiguiente no me lo muestra.

IF !File(cPdfFileName)
MsgInfo("No se gener贸 el archivo porque no lo encuentro","Informaci贸n!")
endif

El buscador de Windows no me localiza el PDF. Tengo el c贸digo para crear el PDF tal y como se muestra en este hilo.
驴 Alguien sabe que puede pasar ?
Mil gracias
Loren
Posts: 989
Joined: Thu Nov 24, 2005 03:01 PM
preview to pdf using image2pdf
Posted: Sun Nov 23, 2008 09:20 AM

Lorenzo,

porque no subes el c贸digo as铆 se puede opinar al respecto? Es dificil adivinar. Si realmente hubieses copiado el c贸digo tal cual no tendr铆as ese problema.

Por cierto, en la oficina usamos Image2PDF y funciona bastante bien. En la ultima semana he estado en contacto con el desarrollador y muy amablemente ha accedido a hacer algunos ajustes para mejorar la calidad de la conversi贸n. A煤n est谩 en beta y no est谩 disponible para la descarga, pero funciona de maravillas y muy r谩pido.

Un saludo,
Carlos.

Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
鈥淚f you think education is expensive, try ignorance"
Posts: 729
Joined: Tue Oct 18, 2005 06:49 PM
preview to pdf using image2pdf
Posted: Mon Nov 24, 2008 02:58 AM
Hola,

Pueden tratar este codigo con "Image2PDF.dll". Lo estoy usando desde hace mas de un a帽o y me funciona perfecto.
FUNCTION SaveAsPDF(cRepName)
LOCAL result, hLib
LOCAL cBuffer:=space(300)
	
    hLib = LOADLIBRARY( "Image2PDF.dll" )
	
	 I2PDF_UseEMFDeviceSize()

	 I2PDF_License("YOUR LICENSE")

	 I2PDF_Log(".\log.txt", 3)
	
	 I2PDF_MetaTextFitBoundingRect()

	 I2PDF_UseEMFDeviceSize()

	 I2PDF_MetaToNativePDF()

	 I2PDF_SetDPI(0)   //- or to whatever value you require


   DECLARE aEmf := {}
	aEmf := directory("*.emf")

	FOR nX := 1 TO  len(aEmf)
		nRc := I2PDF_AddImage(alltrim(aEmf[nX, F_NAME]))
	 
	NEXT

		nResult := I2PDF_MakePDF(cRepName, 0, @cBuffer ,300)

	   FreeLibrary(hLib)

RETURN (.T.)


DLL32 Function I2PDF_AddImage(image as LPSTR);
AS LONG PASCAL FROM "I2PDF_AddImage" LIB "IMAGE2PDF.DLL"
//Public Shared Function I2PDF_AddImage(ByVal image As String) As Integer
  
DLL32 Function I2PDF_SetProducer(producer as LPSTR);
AS LONG PASCAL FROM "I2PDF_SetProducer" LIB "IMAGE2PDF.DLL"
//Public Shared Function I2PDF_SetProducer(ByVal producer As String) As Integer

DLL32 Function I2PDF_GetDLLVersion();
AS LONG PASCAL FROM "I2PDF_GetDLLVersion" LIB "IMAGE2PDF.DLL"
//Public Shared Function I2PDF_GetDLLVersion() As Integer

DLL32 Function I2PDF_License(code As LPSTR);
AS LPSTR PASCAL FROM "I2PDF_License" LIB "IMAGE2PDF.DLL"
// Public Shared Sub I2PDF_License(ByVal code As String)

DLL32 Function I2PDF_MetaImageMaxMP(maxmp as LONG);
AS LONG PASCAL FROM "I2PDF_MetaImageMaxMP" LIB "IMAGE2PDF.DLL"
//Public Shared Function I2PDF_MetaImageMaxMP(ByVal maxmp As Double) As Integer

DLL32 Function I2PDF_DeleteImagesOnConvert();
AS VOID PASCAL FROM "I2PDF_DeleteImagesOnConvert" LIB "IMAGE2PDF.DLL"
//Public Shared Sub I2PDF_DeleteImagesOnConvert()


DLL32 Function I2PDF_SetDPI(dpi as LONG);
AS LONG PASCAL FROM "I2PDF_SetDPI" LIB "IMAGE2PDF.DLL"
//Public Shared Function I2PDF_SetDPI(ByVal dpi As Integer) As Integer

DLL32 Function I2PDF_MakePDF(output As LPSTR, options as LONG, @cBuffer As LPSTR, ;
	maxErrorTextSize As LONG);
AS LONG PASCAL FROM "I2PDF_MakePDF" LIB "IMAGE2PDF.DLL"
 //Public Shared Function I2PDF_MakePDF(ByVal output As String, ByVal int options,;
 
DLL32 Function I2PDF_SetPermissionPrint();
AS VOID PASCAL FROM "I2PDF_SetPermissionPrint" LIB "IMAGE2PDF.DLL"
//Public Shared Sub I2PDF_SetPermissionPrint()


DLL32 Function I2PDF_MetaImageMaxMP_Int(maxmp as LONG);
AS LONG PASCAL FROM "I2PDF_MetaImageMaxMP_Int" LIB "IMAGE2PDF.DLL"
//Public Shared Function I2PDF_MetaImageMaxMP_Int(ByVal maxmp As Integer) As Integer

DLL32 Function I2PDF_UseEMFDeviceSize();
AS VOID PASCAL FROM "I2PDF_UseEMFDeviceSize" LIB "IMAGE2PDF.DLL"
//Public Shared Sub I2PDF_UseEMFDeviceSize()

DLL32 Function I2PDF_MetaToNativePDF();
AS VOID PASCAL FROM "I2PDF_MetaToNativePDF" LIB "IMAGE2PDF.DLL"
//Public Shared Sub I2PDF_MetaToNativePDF()

DLL32 Function I2PDF_Log(logFilename As LPSTR, logLevel as LONG);
AS LONG PASCAL FROM "I2PDF_Log" LIB "IMAGE2PDF.DLL"

DLL32 Function I2PDF_MetaTextFitBoundingRect();
AS VOID PASCAL FROM "I2PDF_MetaTextFitBoundingRect" LIB "IMAGE2PDF.DLL"


Saludos,

George

Continue the discussion