-2

I'm not so experienced a programmer ... only in C # not PHP or HTML.

I want to create a URL link to a pdf file, I will do a certificate when they have passed a quiz and for this quiz, I would create a URL link.

This needs to be in PHP or HTML.

[Later edits from comments:- emphasis is mine. KJ]

I want to generate a link to the pdf file. so the user can show that it passed the quiz and is certified – BeGeek Apr 4, 2011 at 8:04

The user has a certificate on the web site where they can download it to the computer.. but my boss want to have so you can put it on a CV... by a url/link... he want me to write a module for this... and I have no idea how to do it... – BeGeek Apr 4, 2011 at 8:09

when I took the link road so it was only in download format .. I want it to view the certificate when you click on the link. – BeGeek Apr 4, 2011 at 8:22

I wrote the direct link to that pdf file ... and then it became a download ... I want generea allowing the user to click on a URL / link and then display pdf file in the browser ... – BeGeek Apr 4, 2011 at 10:25

K J
  • 8,045
  • 3
  • 14
  • 36
BeGeek
  • 5
  • 1
  • 3
  • 2
    http://stackoverflow.com/questions/3454407/generate-pdf-file-from-html-page-while-on-shared-hosting will head you in the right direction, always remember to use the search feature, 99.999% of the time its already been answered :) – Lawrence Cherone Apr 04 '11 at 07:40
  • 1
    Can you explain a bit more? Is this certificate to do with some scores which comes from DB.. If yes - you can create a page which takes the id as querystring and based on that you can generate the URL.. Just a guess as still not sure about the question – sajoshi Apr 04 '11 at 07:40
  • 2
    Uhhhh... do you want to generate the PDF, or are you just linking to it? – Rafe Kettler Apr 04 '11 at 07:41
  • 1
    I want to generate a link to the pdf file. så de user can show that it passed the quiz and certifyied – BeGeek Apr 04 '11 at 08:04
  • 1
    The user has a certificate on the webb site where they can download it to the computer.. but my boss want to have so you can put it on a CV... by a url/link... he want me to write a module for this... and I have no ide how to do it... – BeGeek Apr 04 '11 at 08:09
  • Possible duplicate of [Convert HTML + CSS to PDF with PHP?](https://stackoverflow.com/questions/391005/convert-html-css-to-pdf-with-php) – Earlee Sep 26 '17 at 07:53

2 Answers2

1

Have a look at PrinceXML.

It's definitely the best HTML/CSS to PDF converter out there, although it's not free (But hey, your programming is not free either, so if it saves you 10 hours of work, you're home free.)

Oh yeah, did I mention that this is the first (and probably only) HTML2PDF solution that does full ACID2!?

http://princexml.com/samples/

from Convert HTML + CSS to PDF with PHP?

Community
  • 1
  • 1
Mohammad Efazati
  • 4,812
  • 2
  • 35
  • 50
-1

There are 2 cases:

If you want to show the result after the quiz as HTML, there's no need to mention about PDF.

But if you want to show the result as PDF and let the quiz taker download this PDF result, you will need to create a PDF file by your own code, kind of PDF library:

For PHP, you may use this standard PDF library:
http://php.net/manual/en/book.pdf.php

Example for using PDF library of PHP:
http://www.php.net/manual/en/pdf.examples-basic.php

After creating the PDF file, you can easily create an URL (a string starts with http) to that PDF file, depends on your domain, and the directory route to the just created PDF file.

halfer
  • 19,824
  • 17
  • 99
  • 186
nicola
  • 2,141
  • 1
  • 19
  • 19
  • when I took the link road so it was only in download format .. I want it to view the certificate when you click on the link. – BeGeek Apr 04 '11 at 08:22
  • 1
    @BeGeek: i guess that you used the example from the link above to create pdf file? yes, if your web browser doesn't support showing PDF directly, it will force you to download the PDF. As what I know, you can see PDF directly in browser for the case of Google Chrome – nicola Apr 04 '11 at 08:57
  • I wrote the direct link to that pdf file ... and then became the downloaded ... I want generea allowing the user to click on a URL / link and then display pdf file in the browser ... – BeGeek Apr 04 '11 at 10:25
  • 1
    @BeGeek: as i said, the browser must support direct PDF display. Try another browser like Google Chrome. – nicola Apr 04 '11 at 10:38