1
Mithrandir
Main contents to PDF

I have successfully implemented a hack, which will make it possible to turn any XOOPS page's main contents into a PDF document.

Unfortunately, I am running into a little problem, which can be viewed on My Test Site; All contents is on a single line.

I am using CPDF taken directly from Mambo - and it works in mambo with the exact same procedure and text sanitation.
I also tried a test string with just a little text and some \n's to simulate linebreaks - but it's still on the same line, on top of each other.
I also tried without \n's and that just made the text break the margins of the page and continue out of the viewable area.

Anybody wanna help me get this to work?

2
pdaddict
Re: Main contents to PDF
  • 2004/4/6 11:56

  • pdaddict

  • Friend of XOOPS

  • Posts: 106

  • Since: 2003/4/6 1


Someone has already done something simmilar: xoops news | sourceforge

3
Mithrandir
Re: Main contents to PDF

Thanks, I'll take a look at it - although it seems to be for XOOPS 1.0

4
Mithrandir
Re: Main contents to PDF

Well, this one went a little better - at least the text is readable now.
Unfortunately, I don't think there is a great deal of promise in outputting the entire main contents automatically to a PDF file since the text will just be put there with no regard to table layout etc.

BUT at least now, it is possible to supply a class with some parameters and get a nice PDF document back - this could be useful for use in modules.

5
Mithrandir
Re: Main contents to PDF

OK a little update here.

I am currently working with a PDF class called FPDF. It is working, but has very basic features.

The other PDF class is called CPDF with an CezPDF extension, with loads of other features - so naturally, I would like to work with CPDF, but the aforementioned bug is really.. erhm...bugging me.

Anybody wanna work with me to get this going?

6
Mithrandir
Re: Main contents to PDF

Found the problem - font not loaded properly. It's working now. watch this space

7
Anonymous
Re: Main contents to PDF
  • 2004/4/7 12:58

  • Anonymous

  • Posts: 0

  • Since:


How about this?

http://forge.xoops2.org/modules/news/article.php?storyid=24

Click the PDF Button

8
sunsnapper
Re: Main contents to PDF

Will either of these PDF tools allow one to
apply input from an HTML form to a PDF form document (or any kind of PDF page using x,y coordinates).

The idea being, if someone typed in their contact information in an HTML form, that information could be added to the PDF document for them to print. Positioning each INPUT field to the appropriate area of the PDF form.

That would be very helpful.

9
loom001
Re: Main contents to PDF
  • 2004/4/13 17:38

  • loom001

  • Just popping in

  • Posts: 53

  • Since: 2002/8/17


I would like to implement this on my site. Could anyone tell me how I would go about doing this?

10
Mithrandir
Re: Main contents to PDF

@Sunsnapper: Basically, yes. There are PDF classes, which do exactly that. Then there are subclasses (or methods on the main classes) which will take care of breaking up a string in lines and characters and automatically make line breaks on end of line etc.

Images and stuff can also be added rather easily - but it is a little tricky to get it to look like you want.

@loom101: I'll see if I can find the time to do a more generic solution for this and some guidelines as to how to use it in a module.

Login

Who's Online

178 user(s) are online (111 user(s) are browsing Support Forums)


Members: 0


Guests: 178


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits