Crear archivo PDF en ASP

Inma
20 de Marzo del 2006
Hola a todos,

¿Alguien sabe cómo crear un archivo PDF en ASP sin necesidad de comprar ninguna componente? Sé que en PHP se puede hacer con la función FPDF(), pero no sé si existe algo parecido en ASP.

Gracias.

To?
20 de Marzo del 2006
How to generate PDF from ASP: "Hello, PDF!" example

<%
\' create pdf library object
Set PDF = CreateObject("PDFCreatorPilot.piPDFDocument")
\' initialize PDF Engine
PDF.StartEngine "demo@demo", "demo"
\' set GenerateInMemoryFile flag to TRUE so keep PDF only in the memory
PDF.GenerateInMemoryFile = TRUE
\' start document generation
PDF.BeginDoc
\' draw "HELLO, PDF" message on the current PDF page
PDF.PDFPAGE_BeginText
PDF.PDFPAGE_SetActiveFont "Verdana", True, False, False, False, 14, 0
PDF.PDFPAGE_TextOut 10, 20, 0, "HELLO, PDF!"
PDF.PDFPAGE_EndText
\' finalize document generation
PDF.EndDoc
\' get generated PDF as binary image
PdfImage = PDF.BinaryImage
\' clear the output stream
response.Clear
\' set the content type to PDF
response.ContentType = "application/pdf"
\' add content type header
response.AddHeader "Content-Type", "application/pdf"
\' set the content disposition
response.AddHeader "Content-Disposition", "inline;filename=form.pdf"
\' write the PDF binary image to the Response output stream
response.BinaryWrite PdfImage
response.End
\' disconnect from library
Set PDF = Nothing

%>


Tendrás que bajarte está librería.
PDFCreatorPilot.DLL

Espero q te sirva de ayuda.
Yo he conseguido generar el pdf, pero no se como insertar imágenes en él desde asp.

Samuel Guzm?
20 de Marzo del 2006
Muy interesante... y tan difícil que es conseguir un código de esta naturaleza.. espero ver si es posible generar desde una consulta de una base de datos y enviar a un documento con formato pdf.

Carol
20 de Marzo del 2006
Alguien ha descubierto como meter un archivo de imagen en un pdf?? Usando o sin usar la libreria PDFCreatorPilot?

Jefe Negro
20 de Marzo del 2006
Prueba con mi libreria

www.opdf.tk