Groups
Groups
Sign in
Groups
Groups
Sahana Eden-Legacy
Conversations
About
Send feedback
Help
[EDEN] Generating Custom PDF
18 views
Skip to first unread message
Biplov Bhandari
unread,
Jul 19, 2016, 10:45:17 AM
7/19/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Sahana-Eden
Hi All,
I want to output a pdf as [1]. Been able to do this [2]
[1]
http://www.ndrrmc.gov.ph/attachments/article/1355/NDRRMC_Update_Severe_Weather_Bulletin_25_(FINAL)_TS_Ruby_10Dec2014_2230H.pdf
[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 AM
7/20/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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 AM
7/20/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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