Click to See Complete Forum and Search --> : Generate PDF in ASP


vishu_gupt
12-26-2002, 08:13 AM
Hi,
My problem is not directly related to the ASP but still writing it to this forum. My requirement is as follow:
I have to generate a report in PDF and that report can have tables, images, hyperlinks. I need a program which can generate the PDF from HTML string (may be from file). In this PDF, hyperlinks should be clickable. I tried many options and only problem is Hyperlinks. These are coming as plain text on PDF.
Help me

Vishal

vishu_gupt
12-26-2002, 11:55 PM
Hi,
I am not using PDF generator from Adobe. If it is available then inform me. I know that we can generate the PDF from acrobat but i have to do it from asp file on the fly. If this API is available from Adobe Acrobat then please give me a more details.
I tried WebGrabber from Active PDF, Doc Converter Pro from Neevia.com but in every tool I am not getting the Hyperlinks as clickable links.

Help me
Vishal

lek
05-05-2005, 06:46 PM
Hi, I don't know if it will help you but U can find a french website with others PDF solution here : http://dypso.free.fr

Hope this will help :)

Bullschmidt
05-10-2005, 06:02 PM
And some related links:

How do I generate PDF files from ASP? - 11/1/2001
http://www.aspfaq.com/show.asp?id=2207

http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&newwindow=1&frame=right&th=b6c31819a87a14f&seekm=eJlv60AqBHA.2052%40tkmsftngp03#link4

lfirth
05-11-2005, 07:42 PM
Persits software have an application called AspPDF http://www.asppdf.com that will do this.

R Muruganandhan
06-26-2007, 06:56 AM
It is Working fine - (Full version). No third party dll . Try this

All the best

Terrorke
06-26-2007, 08:43 AM
Maybe this link is usefull :
http://classicasp.aspfaq.com/components/how-do-i-generate-pdf-files-from-asp.html

Bullschmidt
06-26-2007, 10:46 PM
It is Working fine - (Full version). No third party dll . Try this

All the best

Yes I agree with R Muruganandhan that http://www.fpdf.org is incredible in that an ASP page can create a .pdf file without using a component!

lmf232s
06-27-2007, 10:23 AM
This is the same things as fpdf but its a port with asp. While the fpdf works fine in PHP, working in asp might be more helpful.

I have run this page through google translate because it was in a different language.

http://translate.google.com/translate?sourceid=navclient&hl=en&u=http%3a%2f%2fwww%2easpxnet%2eit%2f

R Muruganandhan
11-21-2007, 01:10 AM
<%@language=vbscript%>

<!--#include file="fpdf.asp"-->
<%
' Import class JScript in file VBScript
Set pdf=CreateJsObject("FPDF")

'Call Class file
pdf.CreatePDF()

'Set Path
pdf.SetPath("fpdf/")

'Set Font
pdf.SetFont "Arial","I",16

'Open PDF
pdf.Open()

' Add document PDF
pdf.AddPage()

'pdf.Cell 80,10,"R Muruganandhan!"


pdf.Image "Bharathi.jpg", 10, 10, 10, 10
pdf.Link 10,10,10,10,"www.Google.com"
'pdf.Image "News1.jpg", 10, 10, 10, 10
'pdf.SetCreator "HIC-Prevalence-IDU.PDF"
'pdf.LoadModels "Microsoft Word - EmailId.PDF"

'pdf.write 100,"123"
'pdf.Cell 40,10, "Name: " &amp; rs("Name")<br>
'pdf.Ln(8)
'pdf.Cell 40,10, "Age: " &amp; rs("Age")
'pdf.MultiCell 80,110,"R Muruganandhan!"

pdf.Cell 80,100,"R Muruganandhan!"
pdf.Text 80,100,"Google!"
pdf.Link 10,10,10,10,"www.Google.com"
'Close
pdf.Close()

'output
pdf.Output()

pdf.Output server.mappath("list.pdf"),"T"
%>


Note : Download fpdf.Zip and modify in Main.asp

championc
09-10-2008, 05:49 PM
Using fpdf.asp, does anyone know how to setup a PDF output in Landscape format ?


C

Bullschmidt
09-16-2008, 02:03 AM
This is a page from the manual that explains how to set the orientation in PHP.

http://www.fpdf.org | Click on Manual | Click on FPDF - constructor:
<<
FPDF
FPDF([string orientation [, string unit [, mixed format]]])
Description
This is the class constructor. It allows to set up the page format, the orientation and the unit of measure used in all methods (except for font sizes).
Parameters
orientation
Default page orientation. Possible values are (case insensitive):
P or Portrait
L or Landscape
Default value is P.

unit
User unit. Possible values are:
pt: point
mm: millimeter
cm: centimeter
in: inch
A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit.

Default value is mm.
format
The format used for pages. It can be either one of the following values (case insensitive):
A3
A4
A5
Letter
Legal
or an array containing the width and the height (expressed in the unit given by unit).

Default value is A4.
Example
Example with a custom 100x150 mm page format:
$pdf = new FPDF('P', 'mm', array(100,150));
>>

And here's the page for ASP but it's in Spanish:
http://www.aspxnet.it/public/Default.asp?page=175&idp=51

And here's a line of ASP code in my style of coding:
objPdf.CreatePDF "L", "mm", "Letter" ' Landscape, inch, letter size.

championc
09-18-2008, 06:23 PM
Perfect thanks - all sorted

Set pdf=CreateJsObject("FPDF")
Pdf.CreatePDF "L", "mm", "A4"
pdf.SetPath("fpdf/")

etc.

zokanzi
10-31-2009, 07:10 AM
Using fpdf.asp, does anyone know how to draw table with html code in my pdf document?

verikal
11-07-2009, 08:56 PM
Is there a support for non latin UTF-8 Encoding ?
(fpdf)