[reportlab-users] Issues related to setting parameters of graphs, lines, and rectangles, and they are not printing correctly
Andy Robinson
andy at reportlab.com
Wed Nov 28 15:49:44 EST 2012
Thanks very much for posting up such detailed questions and, even more
importantly, for showing us a picture of what you want to achieve. And
Tim, thanks for kicking off the replies.
I cannot for the life of me think that anything in our code could be
causing a problem on the printer, as (as Tim has explained) we just put
some line width instructions in the PDF file, and Acrobat Reader renders
them. However it should be easy enough for us to whip up a
(non-confidential) script to do this - tomorrow during the UK morning - and
then we can figure out if it's a software issue, and/or share the code.
Can you explain exactly how you are "sending it to the printer"? What is
the operating system, the print driver and the printer?
Andy Robinson
ReportLab
On 28 November 2012 17:30, J. R. Carroll <jrcarroll at jrcresearch.net> wrote:
> (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
>
>
>
>
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at lists2.reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users
>
>
--
Andy Robinson
Managing Director
ReportLab Europe Ltd.
Thornton House, Thornton Road, Wimbledon, London SW19 4NG, UK
Tel +44-20-8405-6420
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20121128/0b3b84db/attachment.html>
More information about the reportlab-users
mailing list