items
1) aaaa
2) bbbb
4) dddd
etc etc if you are having trouble describing exactly what you need to ask.
--
Robin Becker
_______________________________________________
reportlab-users mailing list
reportl...@lists2.reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users
On 19/01/2014 18:11, PB wrote:
Hi,...
I'm new here. My case is that i don't want the 5) item. The same problem
is in example: www.reportlab.com/docs/reportlab-userguide.pdf page 86.
Can i fix it? Any idea where i should do that?
BR
sorry, but I don't understand what you are asking. Please try again if necessary you can use ascii to indicate what you want eg
items
1) aaaa
2) bbbb
4) dddd
etc etc if you are having trouble describing exactly what you need to ask.
from reportlab.platypus import ListFlowable, ListItem
from reportlab.lib.styles import
getSampleStyleSheet
styles = getSampleStyleSheet()
style = styles["Normal"]
t = ListFlowable(
[
Paragraph("Item no.1", style),
ListItem(Paragraph("Item no. 2",
style),bulletColor="green",value=7),
ListFlowable(
[
Paragraph("sublist item 1", style),
ListItem(Paragraph('sublist item
2', style),bulletColor='red',value='square')
],
bulletType='bullet',
start='square',
),
Paragraph("Item no.4", style),
],
bulletType='i'
)
This is output:
ListFlowable with sublist
)
can
not be numbered.<ul>
<li>List item one</li>
<li>List item two with subitems:
<ul>
<li>Subitem 1</li>
<li>Subitem 2</li>
</ul>
</li>
<li>Final list item</li>
</ul>
t = ListFlowable( [ Paragraph("Item no.1", styleN), [ Paragraph("Item no. 2", styleN), ListFlowable( [ Paragraph("sublist item 1", styleN), ListItem(Paragraph('sublist item 2', styleN), bulletColor='red', value='square')
], bulletType='bullet', start='square', )
], Paragraph("Item no.4", styleN), ], bulletType='i')
from reportlab.platypus import ListFlowable, ListItem, Paragraphfrom reportlab.lib.styles import getSampleStyleSheetfrom reportlab.pdfgen.canvas import Canvasfrom reportlab.platypus import Paragraph, SimpleDocTemplate
styles = getSampleStyleSheet()styleN = styles['Normal']styleH = styles['Heading1']
t = ListFlowable( [ Paragraph("Item no.1", styleN), [ Paragraph("Item no. 2", styleN), ListFlowable( [ Paragraph("sublist item 1", styleN), ListItem(Paragraph('sublist item 2', styleN), bulletColor='red', value='square') ], bulletType='bullet', start='square', ) ], Paragraph("Item no.4", styleN), ], bulletType='i')
#add some flowablesstory = []story.append(Paragraph("Look at this list:", styleH))story.append(t)
doc = SimpleDocTemplate('mydoc.pdf')doc.build(story)