[reportlab-users] Issues related to setting parameters of graphs, lines, and rectangles, and they are not printing correctly
J. R. Carroll
jrcarroll at jrcresearch.net
Wed Nov 28 12:30:56 EST 2012
(sorry if you got this twice, I sent it with the wrong email first time).
///
Hi,
New to the list, and new to reportlab (love reportlab and the work you all
have done so far!).
I have been working with reportlab now for about 2 weeks, and I have hit
some walls that I can't climb over myself (Google, StackExchange, ReportLab
Manual, archives from this list, etc). I apologize if the
problems/questions have obvious answers, but my head hurts from banging it
against the desk...
*First problem:*
...is summarized in a StackExchange question I posted, I know it's annoying
to go to another website to read, but it has pictures (which do a better
job explaining my issue) - to see photos of what I am talking about (and a
code snippet click
here<http://stackoverflow.com/questions/13591887/python-pdf-creation-using-reportlab-self-made-grid-prints-with-a-pattern-but-l>).
*In short:* I have opted to make my own grid for a chart (because grid()
didn't give me the functionality I needed - maybe it can, but I am not sure
how to implement it). But my grid works only on the screen, not at the
printer.
*My problem:* On the screen, it looks great! When I send it to a printer
(600 dpi, "standard" settings) it prints a pattern of lines (some lines are
printed, and others are not) - some have suggested that this is the printer
trying to "anti-alias" my lines because I have set my line widths to be .1
to .8 which is some small fraction of 1/72dpi (a line width of 1 is too
thick for what I am doing). How can I fix this problem? My goal is to get
minor grid lines spaced at 1 mm apart, and every 5 mm a major grid line,
with a heavier weight (thickness? alpha?) is drawn. I currently have the
solution scripted but again it only works on the screen, not at the printer.
*Second problem:*
I have drawn rectangles (as borders to my graphs), but the stroke-width is
too thick of the rectangle. I didn't see anything in the documentation
that allows me to set the stroke-width of a rect - any advice here? Did I
miss it in the manual? (using canvas.Rect())
*Third problem (question):*
*
*
I found canvas.setDash() for setting dashed lines, but I am using a
Drawing() and adding shapes.Lines() to the Drawing, then renderingPDF to my
canvas - maybe it is the way I have wrapped everything (wrapped in terms of
loops, classes, and functions), but I cannot get shapes.Lines to be dashed
(or dotted or any other style other than a Line - which makes sense -
kinda); FYI, I went the route of Drawing and "stamping" my grid (made of
the lines I mention that won't print correctly) because I have 13 of these
grids drawn to a single page, 12 of the grids are the same size, 1 is
different, but I was able to reduce the file size and rendering time of the
reports significantly by using Drawing.add(shapes.Lines) and then render
only once per graph, versus canvas.Lines and rendering every single
minor/major lines.
If you need additional information or context, I'll do my best to provide
but like all corporate projects in R&D it's pretty hush-hush (so I
apologize if you feel I have omitted some valuable information). What I
can say is that the graph I am trying to make is for ECG strip charts (the
link above in problem#1 has examples of what I am talking about).
I apologize for the long email - lots of sleepless nights thus far.
Thank you for ANY help, if only just one of these problems receives an
answer or guidance.
-J
----
J. R. Carroll
Independent Researcher through Hurtz Labs
Research Methods, Test Development, and Statistics
www.jrcresearch.net
Cell: (650) 776-6613
Email: jrcarroll at jrcresearch.net
jrcarroll at hurtzlab.com
jrc.csus at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20121128/daf7a3d2/attachment.html>
More information about the reportlab-users
mailing list