Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#148 pdf export is garbled

closed-fixed
Julian Lamb
None
5
2011-03-07
2011-03-02
Simon Bichler
No

I tried to export example/orcad/rs232_cm.asb to a pdf file.

Unfortunately the pdf file generated is unusable:
1. When just exporting the layer without any modifications, the labels "D1" and "R1" are missing. (see rs232_cm.unrotated.pdf in attachment)
2. When exporting the layer after rotating it 90 deg CCW the labels "D1" and "R1" are there, but garbled. Furthermore the outlines of the board are not meeting each other at the ends, and the pads are not centered in the surrounding boxes. (see rs232_cm.rotated.pdf in attachment)

Discussion

  • Simon Bichler
    Simon Bichler
    2011-03-02

     
    Attachments
  • The problem here seems to be, that the resolution is set to 72dpi in
    gerbv_render_info_t gerbv_export_autoscale_project (gerbv_project_t *gerbvProject)
    in exportimage.c
    72dpi is definitely not enough for pdf export.

     
  • Julian Lamb
    Julian Lamb
    2011-03-05

    Simon,
    Yes, I'm finding that the Cairo library we use for the graphics is causing problems with recent versions. It is basically forcing all output to be 72dpi for printing and exporting features. I'm still trying to find a workaround to get this fixed. I'll keep you posted.

    Cheers,
    Julian

     
  • Julian Lamb
    Julian Lamb
    2011-03-05

    • assigned_to: nobody --> thepurlieu
     
  • Simon Bichler
    Simon Bichler
    2011-03-07

    Hi Julian,

    I've attached a fix for this problem, that works at least for me.

    In short: This problem is caused by doing optimization based on the pixel size, that works well for drawing to pixel based formats, but not for vector based outputs, when "pixels" are almost 14mil wide.

    I hope this helps.

    Simon

     
  • Julian Lamb
    Julian Lamb
    2011-03-07

    Simon,
    You're awesome! Sorry for the delay, but I never got an email notice from Sourceforge on your latest comment.
    It looks like you are very correct, in that the pixel optimizations I did several months ago are the culprit. This also seems to fix a similar problem in the print output as well. I'm applying to git as I write. Please let me know if you find anything else.
    Many, many thanks for tracking this down and supplying a patch. I simply didn't think to correlate the pixel optimization work with this problem.

    Cheers!!
    Julian

     
  • Julian Lamb
    Julian Lamb
    2011-03-07

    • status: open --> closed-fixed