[EDEN] Generating Custom PDF

18 views
Skip to first unread message

Biplov Bhandari

unread,
Jul 19, 2016, 10:45:17 AM7/19/16
to Sahana-Eden
Hi All,

I want to output a pdf as [1]. Been able to do this [2]


[2] Warning Bulletin_2016-07-19 20-50-44.pdf (attached filename)

My code looks like this: http://pastebin.com/WDeHwvsq

Questions:

1. How can I format the logo and the header like in the pdf
2. How can I style each of the element in the pdf. I tried to use _style but it does not work.
3. Insert horizontal line.  <br/> does not work

Many Thanks,
Biplov


Warning Bulletin_2016-07-19 20-50-44.pdf

Fran Boon

unread,
Jul 20, 2016, 4:39:08 AM7/20/16
to sahan...@googlegroups.com
The class we use to convert HTML to PDFis here:
https://github.com/sahana/eden/blob/master/modules/s3/s3codecs/pdf.py#L1247

Styles are applied here:
https://github.com/sahana/eden/blob/master/modules/s3/s3codecs/pdf.py#L1643

This requires you top pass the styles that you want into the class.
Since you go in vias the S3Exporter class, you need to add them there:
https://github.com/sahana/eden/blob/master/modules/s3/s3codecs/pdf.py#L235

F
> --
> You received this message because you are subscribed to the Google Groups
> "Sahana-Eden" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sahana-eden...@googlegroups.com.
> To post to this group, send email to sahan...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sahana-eden/4824c54a-bdb7-48a0-a488-a95c04388f06%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Fran Boon

unread,
Jul 20, 2016, 4:41:01 AM7/20/16
to sahan...@googlegroups.com
On 20 July 2016 at 09:39, Fran Boon <fr...@sahanafoundation.org> wrote:
> This requires you to pass the styles that you want into the class.
> Since you go in via the S3Exporter class, you need to add them there:
> https://github.com/sahana/eden/blob/master/modules/s3/s3codecs/pdf.py#L235

Example:
https://github.com/sahana/eden/blob/master/modules/s3/s3grouped.py#L626

F
Reply all
Reply to author
Forward
0 new messages