Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 09-09-2010
JXJ JXJ is offline
Miembro
 
Registrado: abr 2005
Posts: 2.475
Poder: 22
JXJ Va por buen camino
Question ¿como Generar pdf en delphi 2010 sin componentes de Terceros?

esta es mi duda.

estoy con delphi 2010 y quiero generar un archio pdf
con informacion que saco de una bse de datos.
¿como puedo Generar un pdf en delphi 2010 sin componentes de Terceros?

me falto decir que el archivo pdf sera un reporte.
y aparte de los datos obtenido de la base de datos, le voy a poner otros datos a mano.
com quien dice usar una plantilla con datos variables a rellenar y
poder usar imagenes..

Última edición por JXJ fecha: 09-09-2010 a las 17:24:37.
Responder Con Cita
  #2  
Antiguo 09-09-2010
[FGarcia] FGarcia is offline
Miembro Premium
 
Registrado: sep 2005
Ubicación: Cordoba, Veracruz, México
Posts: 1.123
Poder: 20
FGarcia Va por buen camino
Indiscutiblemente debera ser con componentes de terceros, Delphi cuenta con Rave Reports que te permite exportar a diversos formatos entre ellos pdf.

Se que se puede hacer por codigo desde delphi pero no tengo a la mano el documento donde lo explica.

Te recomiendo una lectura a Delphi 2006 de Ivan Hladni (Anaya)
__________________
ESTO ES UN FORO ... NO UN MÓVIL
¿Por qué no escribir de una manera comprensible para que los humanos lo podamos entender?
Responder Con Cita
  #3  
Antiguo 09-09-2010
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.275
Poder: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Otra opción, sin componentes de terceros, sería utilizar una impresora virtual. No se si has contemplado esa opción y si te sería posible.
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita
  #4  
Antiguo 09-09-2010
JXJ JXJ is offline
Miembro
 
Registrado: abr 2005
Posts: 2.475
Poder: 22
JXJ Va por buen camino
yo he estado pensando en usar un archivo HTML.
que sera mi plantilla. ahi acomodar los graficos las descripcion y marcadores
de la informacion que se jala desde la base de datos.
una ve creado el html. procesarlo y que se convierta en un archivo pdf.

con impresoras virtuales es necesario instalarlas.
he visto software de pago. nada freeware o opensource.
no lo veo como opcion.
Responder Con Cita
  #5  
Antiguo 09-09-2010
[FGarcia] FGarcia is offline
Miembro Premium
 
Registrado: sep 2005
Ubicación: Cordoba, Veracruz, México
Posts: 1.123
Poder: 20
FGarcia Va por buen camino
Ah Caray!

PDFCreator es una impresora virtual y es gratis (Free) e instalarla es de risa.

No entiendo cual es la dificultad.
__________________
ESTO ES UN FORO ... NO UN MÓVIL
¿Por qué no escribir de una manera comprensible para que los humanos lo podamos entender?
Responder Con Cita
  #6  
Antiguo 09-09-2010
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.275
Poder: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Cita:
Empezado por JXJ Ver Mensaje
con impresoras virtuales es necesario instalarlas.
he visto software de pago. nada freeware o opensource.
no lo veo como opcion.
Sí es cierto que hay que instalarlas; En cuando a que son de pago, me suena haber leído sobre más de una Free; FGarcía comenta una, pero hay algunas más; doPDF, BullZIP, CutePDF, PrimoPDF,...
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita
  #7  
Antiguo 10-09-2010
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.040
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Yo llevo años usando pdfcreator en los windows de los clientes y va perfecta.
Responder Con Cita
  #8  
Antiguo 10-09-2010
JXJ JXJ is offline
Miembro
 
Registrado: abr 2005
Posts: 2.475
Poder: 22
JXJ Va por buen camino
que bien.. yo busque y todas eran de pago..

que raro. ?:S
Responder Con Cita
  #9  
Antiguo 10-09-2010
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Poder: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola JXJ.

Hay una que nombró Neftali que yo uso: doPDF.

No sé si es la mejor, pero dado el uso que le doy , digamos que me queda grande...

La podés descargar gratis de ACA .


Saludos.
Responder Con Cita
  #10  
Antiguo 10-09-2010
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.040
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
pdfCreator, libre, gratis y funciona de maravilla
Responder Con Cita
  #11  
Antiguo 10-09-2010
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.275
Poder: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Una pregunta; En el trabajo usan FinePrinter+pdfFactory que son de pago; Son muy asequible y funcionan muy bien.

Tiene características para poder utilizarla y generar los ficheros de forma transparente al usuario; Es decir, que desde programa puedes generar un PDF sin que el usuario intervenga, pero el sistema que posee no es muy ágil, pues funciona a través del registro de Windows.

Hace tiempo miré si las que había gratuitas (que por aquella época eran pocas -1 o 2-) poseían esta característica, pero ninguna la tenía.
Ahora hay bastantes más opciones, como se ha visto en este hilo.

¿Alguna de las que utilizáis posee esta caractrística y que sea fácil de utilizar?
¿Que se pueda generar el PDF y abrirlo desde Delphi sin tener que pedirle al usuario el nombre del fichero (por ejemplo)?
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita
  #12  
Antiguo 10-09-2010
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.040
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
El pdfcreator puede ser usado por línea de comandos con parámetros, creo que se puede hacer lo que comentas, aquí van:

Cita:
Empezado por pdfCreator
Setup Command Line Parameters
Edito: me equivoqué en el copia->pega, el bueno es el del post de abajo. Disculpas.

Última edición por Casimiro Notevi fecha: 10-09-2010 a las 11:47:04.
Responder Con Cita
  #13  
Antiguo 10-09-2010
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.275
Poder: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Cita:
Empezado por Casimiro Notevi Ver Mensaje
El pdfcreator puede ser usado por línea de comandos con parámetros, creo que se puede hacer lo que comentas, aquí van:
Estos son parámetros parece de Instalación. Yo me refiero a parametrizar la impresión desde programa. Cuando desde un programa mandas imprimir.

Imagina que el usuario le da a un botón para <Generar PDF>, eso provoca que en tu programa Delphi lances la impresión a la impresora PDF (que puede ser la que hay por defecto o no), para que se genere.

En ese momento lo normal es que al usuario le aparezca un ventana solicitándole el "Nombre del fichero" (y otras opciones); Eso es lo que me gustaría poder parametrizar de forma sencilla (y que no apareciera).
En el caso de pdfFactory, puedes (antes de lanzar la impresión) generar unos valores en el registro de Windows, y si la impresora al generar la impresión detecta que están (y si son correctos) los coge y no le pregunta al usuario.
de esta forma has generado un fichero PDF sin intervención del usuario utilizando la impresora virtual.
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita
  #14  
Antiguo 10-09-2010
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.040
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Me equivoqué de fichero al hacer el copia->pega, perdón, el que quería poner es este:

Cita:
Command Line Parameters
PDFCreator enables you to create documents via the command line interface. Here are the different commands that PDFCreator supports:
/AddWindowsExplorerIntegration
Whith this switch PDFCreator integrates itself with the Windows shell. When you right-click on selected documents in Windows Explorer a new menu item will appear called "Create PDF with PDFCreator". This enables the user to quickly convert documents to PDF without having to open the document. Note that this functionality requires PDFCreator to be temporarily assigned the default printer status.
Example: PDFCreator.exe /AddWindowsExplorerIntegration
/CheckInstance
If you use this switch PDFCreaor shows a message box with the information about running instances of PDFCreator, PDFSpooler and Transtool. You can combine this parameter with the switch /NoStart. If you see the property "Local" there exists a local instance. Please check the desktop, Systray or the Task Manager to find the local instance. If you see only the property "Global" than there exists at least one instance in one of your terminal server sessions. This switch is usefull for debugging and for administrators to check if there is a running instance of PDFCreator on a terminal server.
Example: PDFCreator.exe /CheckInstance
/ClearCache
Clears all PDFCreator temporary files. This is useful if PDFCreator will not start because of a corrupt temp file.
Example: pdfcreator.exe /ClearCache
/DeleteIF
Delete the input file after converting. This parameter can only be used in conjunction with the /IF parameter.
Example: pdfcreator.exe /IF"C:\description.ps" /OF"C:\description.pdf" /DeleteIF
/IF<input-filename> /OF<output-filename>
Convert a postscript file or a bitmap file (JPEG, BM) to a PDF or bitmap. The /OF parameter must be used in conjunction with the /IF parameter. To set the output file format, include the file extension in the output file name. There is NO space between the parameters and the file names. The parameter /OutputSubFormat defines the subformat. Currently "PDF/A-1b" and ""PDF/X" can be used for the PDF format.
Examples:
pdfcreator.exe /IF"C:\description.ps" /OF"C:\description.pdf" /OutputSubFormat"PDF/A-1b"
pdfcreator.exe /IF"C:\description.ps" /OF"C:\description.tif"
pdfcreator.exe /IF"C:\image1.jpg" /OF"C:\image1.pdf"
pdfcreator.exe /IF"C:\image1.bmp" /OF"C:\image1.png"
/NoAbortIfRunning
Opens a new instance of PDFCreator without checking if the program is already running. It is useful to combine this parameter with the /NoProcessing parameter.
Example: pdfcreator.exe /NoAbortIfRunning
/NoProcessing
When PDFCreator is opened with the /NoProcessing option, all documents that are sent to PDFCreator are not processed immediately. They are stored in the print queue until PDFCreator is opened without the /NoProcessing option.
Example: pdfcreator.exe /NoProcessing
/NoProcessingAtStartup: When you use this parameter, PDFCreator will start without processing any documents. You can manually start processing by going to the Document menu and selecting Print or by unchecking the Printer Stop option in the Printer menu. The setting is useful if you want collect some files first, then combine the files into one and create a pdf.
Properties:
0 - Off (Default)
1 - On
/NoStart
When you use the /PF parameter, PDFCreator stays open after it's done its task. The /NoStart parameter automatically closes PDFCreator after it is done.
Example: pdfcreator.exe /NOSTART /PF"C:\help.doc"
/OpenOF
Open the output file after converting. This parameter can only be used in conjunction with the /IF and the /OF parameter.
Example: pdfcreator.exe /IF"C:\description.ps" /OF"C:\description.pdf" /OpenOF
/OptionsFile<option-filename>
Specifies the particular options file PDFCreator should use.
Examples: pdfcreator.exe /OptionsFile"C:\MyPDFCreator.ini"
(Hint: With this parameter (and a work around) you can use more than one printer on a machine.)
/PF<filename>
Print a file with the standard program linking with the extension of the file. In general, this option is useful in connection with Auto-Save mode. It is not possible to use this parameter in conjunction with the /OF parameter. There is NO space between the parameter and the file name.
Example: pdfcreator.exe /PF"C:\help.doc"
You can also use wildcards to create PDF's of all documents in a specified folder.
Example: pdfcreator.exe /PF"C:\*.doc"
/RemoveWindowsExplorerIntegration
Whith this switch you remove the PDFCreator Windows shell integration.
Example: PDFCreator.exe /RemoveWindowsExplorerIntegration
/ShowOnlyLogfile
Opens PDFCreator in the log file. No other windows are opened.
Example: pdfcreator.exe /ShowOnlyLogfile
/ShowOnlyOptions
Opens PDFCreator in the Options Panel. No other windows are opened.
Example: pdfcreator.exe /ShowOnlyOptions
Además:

Cita:
Features

* Create PDF's from just about any program that prints using Windows printers.
* Create documents in the following formats: Portable Document Format (PDF, PDF/A, PDF/X), PNG, JPEG, BMP, PCX, TIFF, Postscript (PS), Encapsulated Postscript (EPS), Text, Adobe Photoshop (PSD), PCL, RAW and SVG (experimental).
* Combine multiple documents into one PDF.
* Password protect and apply up to 128 bit encryption to your PDF documents.
* Automatically save PDF documents with current settings without being prompted for information
* And much more!

Última edición por Casimiro Notevi fecha: 10-09-2010 a las 11:49:29.
Responder Con Cita
  #15  
Antiguo 10-09-2010
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.275
Poder: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Cita:
Empezado por Casimiro Notevi Ver Mensaje
El que quería poner es este:
Este sí.

Gracias Casimiro.
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita
  #16  
Antiguo 10-09-2010
Avatar de yapt
yapt yapt is offline
Miembro
 
Registrado: sep 2006
Ubicación: España
Posts: 258
Poder: 18
yapt Va por buen camino
PDFCreator usa GhostScript para generar el .ps que luego genera el .pdf.

Puedes usar GhostScript (es una DLL) para conseguir esto. Que conste que yo no lo he hecho nunca así que solo es una idea. Una busqueda en San Google por: delphi GhostScript te dará unos cuantos resultados.

Y si consigues hacerlo funcionar, estaría bien poner aquí un ejemplo para el futuro.

Salu2.
Responder Con Cita
  #17  
Antiguo 10-09-2010
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.275
Poder: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Bueno, aquí hay un ejemplo en Delphi (mirrors) con la susodicha DLL; El problema es que yo no poseo la versión correcta para probarlo.
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita
  #18  
Antiguo 31-01-2013
[Waldo] Waldo is offline
Miembro Premium
 
Registrado: sep 2003
Posts: 101
Poder: 21
Waldo Va por buen camino
Cita:
Empezado por Casimiro Notevi Ver Mensaje
Me equivoqué de fichero al hacer el copia->pega, perdón, el que quería poner es este:



Además:
como ejecuto esos comandos, =) en delphi.
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
Firebird a pelo-o sin componentes de Terceros JXJ Firebird e Interbase 22 24-03-2012 04:21:41
DataSnap sin Componentes delphi 2010 megarocko Conexión con bases de datos 1 06-08-2010 03:54:18
Generar Informes a Excel en delphi 2010 HELBERT GARCIA MS SQL Server 19 28-04-2010 05:21:19
Agregar componentes desde codigo delphi 2010 iktwo Varios 2 04-01-2010 15:42:10
recomendacion de componentes de terceros petete2008 Gráficos 1 31-01-2009 01:01:54


La franja horaria es GMT +2. Ahora son las 08:21:55.


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