Python Forum

Full Version: pdf sms alternating conversation style
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I started this project on my own.  a way to learn python...
The goal:
To develop a script in python that will intake mbox file, parse it, sort it and then store it in a databse or csv. From there, produce pdf output that has a conversation sms style ..

what is done:
The first segment is accomplished, I wrote a code that deals with mbox file, the database and the csv..

Where I am stuck!
I am stuck at the pdf part, I want the pdf output to be something like a conversation. each message with its sender and date alternating left and right (same as your sms app). Any recommendations how to proceed? packages, libraries etc?
I am not looking for code help, I am looking for a direction. As of now, I am not sure what libraries will able to do that. I tried pydf, but it does not support my own bubble designs etc.
I would post a picture if I can, but the rule does not allow me to link imgur in my first post :P


my code here
sms style???? you mean chopping each message to no more than 140 characters?
(Apr-20-2017, 02:57 AM)Skaperen Wrote: [ -> ]sms style???? you mean chopping each message to no more than 140 characters?

no chopping. What I mean, I have the emails from mbox, that I have already stored in database and already sorted by time and date.
I want to take each message (iterate through) and place each message in a bubble alternating left and right inside a pdf. No character limit

somethgin like this

[Image: j3tkM.jpg]
so you want a graphical result.

do you want PNG or GIF or JPG output?

you want really big images if there is a lot of text?

would you like to limit the width to a specified number of pixels? (maybe the default being what an iPhone has? ... which model?)
(Apr-20-2017, 04:55 AM)Skaperen Wrote: [ -> ]so you want a graphical result.

do you want PNG or GIF or JPG output?

you want really big images if there is a lot of text?

would you like to limit the width to a specified number of pixels? (maybe the default being what an iPhone has? ... which model?)

just normal pdf, not images, the words parsed into pdf using the above style. I think a pdf sample will get my point across. here is a pdf sample ... they are words, than can be highlighted, not images.
I have done this previously with android sms app, but with java.
I am trying to do the same thing, but with emails and python. the only part that giving me trouble, putting texts into pdf with such style