dcsimg
www.webdeveloper.com
Results 1 to 15 of 15

Thread: Generate PDF in ASP

  1. #1
    Join Date
    Dec 2002
    Posts
    54

    Generate PDF in ASP

    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

  2. #2
    Join Date
    Dec 2002
    Posts
    54
    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

  3. #3
    Join Date
    May 2005
    Posts
    2

    Generate PDF files

    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

  4. #4
    Join Date
    Jan 2003
    Location
    USA
    Posts
    688
    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=e...sftngp03#link4

  5. #5
    Join Date
    Aug 2003
    Posts
    17
    Persits software have an application called AspPDF http://www.asppdf.com that will do this.

  6. #6
    Join Date
    Jun 2007
    Posts
    2

    PDF create in ASP (Full version)

    It is Working fine - (Full version). No third party dll . Try this

    All the best
    Attached Files Attached Files

  7. #7
    Join Date
    Mar 2006
    Posts
    591

  8. #8
    Join Date
    Jan 2003
    Location
    USA
    Posts
    688
    Quote Originally Posted by R Muruganandhan
    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!

  9. #9
    Join Date
    Jun 2004
    Location
    Kansas City, MO
    Posts
    1,607
    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/translat...spxnet%2eit%2f

  10. #10
    Join Date
    Jun 2007
    Posts
    2

    Image Link for PDF in ASP

    <%@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

  11. #11
    Join Date
    Aug 2006
    Posts
    46
    Using fpdf.asp, does anyone know how to setup a PDF output in Landscape format ?


    C

  12. #12
    Join Date
    Jan 2003
    Location
    USA
    Posts
    688
    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...age=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.
    Last edited by Bullschmidt; 09-16-2008 at 02:13 AM.

  13. #13
    Join Date
    Aug 2006
    Posts
    46
    Perfect thanks - all sorted

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

    etc.

  14. #14
    Join Date
    Oct 2009
    Posts
    1
    Using fpdf.asp, does anyone know how to draw table with html code in my pdf document?

  15. #15
    Join Date
    Nov 2009
    Posts
    24
    Is there a support for non latin UTF-8 Encoding ?
    (fpdf)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles