Page 2 of 2
Posted: Sat Apr 19, 2008 2:32 pm
by cuatecatl82
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..
Posted: Sat Apr 19, 2008 5:20 pm
by Alfredo Arteaga
Olvidate de las variables quitalas y listo:
Code: Select all | Expand
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.
Posted: Sat Apr 19, 2008 11:04 pm
by cuatecatl82
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.comMuchas gracias por ayudarme...
Saludos...
HOLA
Posted: Fri May 16, 2008 1:11 am
by AIDA
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
Saluditos
Aida
Posted: Fri May 16, 2008 2:50 pm
by cuatecatl82
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..
HOLA
Posted: Fri May 16, 2008 9:35 pm
by AIDA
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
Posted: Sat May 17, 2008 4:45 pm
by sysctrl2
Lo mortales normalmente hacemos una vaquita.
quien se apunta..
jejej.
saludos..
Posted: Thu Nov 20, 2008 8:59 am
by Loren
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
Posted: Sun Nov 23, 2008 9:20 am
by Carlos Mora
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.
Posted: Mon Nov 24, 2008 2:58 am
by George
Hola,
Pueden tratar este codigo con "Image2PDF.dll". Lo estoy usando desde hace mas de un año y me funciona perfecto.
Code: Select all | Expand
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