Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Impresión
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 07-06-2018
bazsar bazsar is offline
Registrado
NULL
 
Registrado: jun 2018
Posts: 2
Poder: 0
bazsar Va por buen camino
Cita:
Empezado por JuanPa Ver Mensaje
Finalmente parece que encontramos la solucion al problema de exportar el reporte a pdf en windows 10. Vale indicar que el problema se produce por el tipo de letra que en el caso de mi reporte utilizaba "Arial" y lo he cambiado por otro tipo de letra y ha funcionado correctamente. Tambien hay que corregir la siguiente linea en el archivo QRPDFFilt.pas del QuickReport.

En esta sentencia ntabs:=cvtInt(Buff, 4); es donde se cae por lo cual hay que cambiarlo por lo siguiente:
Código Delphi [-]
if (FontName='Arial') then
  ntabs:=0
else
  ntabs:=cvtInt(Buff, 4);
Espero que puedan resolverlo con lo indicado.
Saludos.
This is not the correct solution. The problem is that the cvtInt and the cvtDWord functions don't get font data buffer as reference. Use this instead:
Código Delphi [-]
function cvtDWord(const Buf: array of byte; P: Integer): DWORD;

...

function cvtInt(const Buf: array of byte; P: Integer): Integer;
Responder Con Cita
  #2  
Antiguo 07-06-2018
Avatar de juanelo
juanelo juanelo is offline
Miembro
 
Registrado: sep 2007
Posts: 1.083
Poder: 18
juanelo Va por buen camino
Cita:
Empezado por bazsar Ver Mensaje
This is not the correct solution. The problem is that the cvtInt and the cvtDWord functions don't get font data buffer as reference. Use this instead:
Código Delphi [-]function cvtDWord(const Buf: array of byte; P: Integer): DWORD; ... function cvtInt(const Buf: array of byte; P: Integer): Integer;
Esto funciona a la perfeccion y no hay que cambiar ningun font.
Muchas gracias !!
__________________
Ya tengo Firma!
Responder Con Cita
  #3  
Antiguo 07-06-2018
gguerrini gguerrini is offline
Miembro
 
Registrado: feb 2006
Ubicación: Cordoba , Argentina
Posts: 14
Poder: 0
gguerrini Va por buen camino
Felicitaciones !!!!

Muchas Gracias!!!! Funciona Perfecto !!!!!!!!!!
Responder Con Cita
  #4  
Antiguo 07-06-2018
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.044
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Cita:
Empezado por bazsar Ver Mensaje
This is not the correct solution. The problem is that the cvtInt and the cvtDWord functions don't get font data buffer as reference. Use this instead:
Código Delphi [-]function cvtDWord(const Buf: array of byte; P: Integer): DWORD; ... function cvtInt(const Buf: array of byte; P: Integer): Integer;
Responder Con Cita
  #5  
Antiguo 12-06-2018
ginobili20 ginobili20 is offline
Miembro
 
Registrado: abr 2010
Posts: 11
Poder: 0
ginobili20 Va por buen camino
me pasaron la solucion

En QRPDFFilt.pas reemplazar las llamadas a las funciones cvtInt y cvtDword

x := cvtInt(Buff, y);

se convierte en estas dos lineas:

P := y;
x := (256*byte(Buff[P]))+(byte(Buff[P+1]));

Y

x := cvtDword(Buff, y); becomes

P := y;
x :=(256*256*256*byte(Buff[P]))+(256*256*byte(Buff[P+1]))+(256*byte(Buff[P+2]))+byte(Buff[P+3]);

Funciona perfecto...
Responder Con Cita
  #6  
Antiguo 12-06-2018
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.044
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
No olvides poner las etiquetas para el código:


Responder Con Cita
  #7  
Antiguo 12-06-2018
ginobili20 ginobili20 is offline
Miembro
 
Registrado: abr 2010
Posts: 11
Poder: 0
ginobili20 Va por buen camino
In QRPDFFilt.pas replace calls to functions cvtInt and cvtDword with inline code

Código Delphi [-]
x := cvtInt(Buff, y);

becomes 2 lines

Código Delphi [-]
P := y;
x := (256*byte(Buff[P]))+(byte(Buff[P+1]));

and

Código Delphi [-]

x := cvtDword(Buff, y);

se convierte en

Código Delphi [-]
P := y;
x :=(256*256*256*byte(Buff[P]))+(256*256*byte(Buff[P+1]))+(256*byte(Buff[P+2]))+byte(Buff[P+3]);
Responder Con Cita
  #8  
Antiguo 30-09-2018
REPUSOFT REPUSOFT is offline
Miembro
NULL
 
Registrado: sep 2018
Posts: 3
Poder: 0
REPUSOFT Va por buen camino
Hola Ginobili20 y gracias por tu respuesta, la cual me ha ayudado mucho para encontrar la verdadera causa del problema.
Aunque el código que das aparentemente funciona no es la solución correcta porque el desbordamiento del buffer
se produce ya cuando vuelves de SetLength(). Tu código funciona porque pones el cuerpo de las funciones 'inline'
y por tanto no hace falta utilizar el stack para pasar el buffer desbordado a las funciones pero el
desbordamiento ya está latente.
Saludos y gracias de nuevo a tí y a todos los miembros del foro
Responder Con Cita
  #9  
Antiguo 30-09-2018
REPUSOFT REPUSOFT is offline
Miembro
NULL
 
Registrado: sep 2018
Posts: 3
Poder: 0
REPUSOFT Va por buen camino
Rectificación del título

El título del mensaje debería decir "Solución al problema de de desbordamiento de QReports al general PDF´s" Perdonad!
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
QReport con Win10 inetplus Impresión 3 13-08-2018 20:37:25
desbordamiento de pila danielmj Varios 4 30-10-2016 20:27:48
Como saber si un problema esta SOLUCIONADO cloayza La Taberna 16 24-02-2010 16:30:10
Desbordamiento de pila ecfisa OOP 2 06-12-2007 16:08:35
Desbordamiento de Pila Durbed Conexión con bases de datos 5 21-06-2006 20:05:31


La franja horaria es GMT +2. Ahora son las 04:33:10.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi