+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Junior Member
    Computer Details
    aggie_moose's Computer Details
    Computer:
    Windows 7 x64
    Discipline
    Mechanical
    Using
    AutoCAD 2014
    Join Date
    Jun 2014
    Location
    Houston, TX
    Posts
    16

    Default print to pdf inconsistency

    Registered forum members do not see this ad.

    Hello all,

    I have been working on printing to text-searchable PDFs, and ran into a little problem. When I regen a drawing and print to PDF, the output is not consistent - it changes just a little bit from plot to plot. This is unacceptable to the client, who is very picky about their drawing packages.

    Can anyone reproduce this problem? I attached a script and a drawing that shows what I mean. I put both in C:\test\, then opened the drawing and loaded the script.

    The result is 10 pdfs saved in that folder, each one a little bit different. The right most line is sometimes outside the print area, sometimes inside. It seems completely random. The only code that runs between plots is

    Code:
    (command "undo" "mark" "-purge" "all" "*" "no" "-overkill" "all" "" "done" "-purge" "all" "*" "no" "regen" "undo" "back")


    But how on earth could that change the drawing?! Furthermore, why does it change the drawing in a way that's inconsistent? If it was shifting things around, that's one thing, but to sometimes change things and sometimes leave them alone? I feel like my computer is non-deterministic
    Attached Files

  2. #2
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    4,008

    Default

    As I can see in your code you were using Extents to indicate the area to plot and Fit as scale. Please pay attention that this will be influenced by anything you may have located outside drawing's frame!
    Code:
    (command "-plot" "y" "model" "DWG To PDF.pc3" "ANSI expand B (11.00 x 17.00 Inches)" "i" "l" "n" "e" "f" "1.1,0" "y" "monochrome.ctb" "n" "w" "C:\\test\\test0.pdf" "n" "y")
    I suggest you to look using instead Window (since you were printing from Model Space), respectively a ratio (i.e. 1:1); this will produce consistent results. For sure it requires also consistent designed drawings - drawing frame always in the same spot.
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  3. #3
    Forum Deity
    Using
    AutoCAD 2002
    Join Date
    Sep 2006
    Location
    East Sussex, U.K.
    Posts
    4,045

    Default

    Might this be a case where setting and plotting to Limits could lead to a consistent output.

  4. #4
    Junior Member
    Computer Details
    aggie_moose's Computer Details
    Computer:
    Windows 7 x64
    Discipline
    Mechanical
    Using
    AutoCAD 2014
    Join Date
    Jun 2014
    Location
    Houston, TX
    Posts
    16

    Default

    I did try setting limits and printing to limits instead, using this code before each print

    Code:
    (mapcar 'setvar '(LIMMIN LIMMAX)
        (mapcar '(lambda ( x ) (reverse (cdr (reverse x))))
          (mapcar 'getvar '(EXTMIN EXTMAX))
        )
      )
    But the print output still varied from plot to plot.

    MSasu, unfortunately when this drawing package was made, the border block was not dropped in the same place. Sometimes it was exploded, sometimes it was scaled differently, sometimes it's the A3 ratio and sometimes it's the 11x17 ratio. On some drawings, all the font was set to a huge font using mtext tags and the view was scaled to 1/8 size so that it looked right. (Some of the drawings were done entirely in comic sans, but that's another issue). I could not imagine how a drawing package could be LESS consistent. So using the window is not really an option, unless you know of a way to set it reliably.

  5. #5
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    4,008

    Default

    Setting the limits to EXTMIN / EXTMAX system variables then using Limits as print area is just equivalent with using Extents. I think that Eldon was considering setting the limits manually in each drawing, thus evaluating their content.

    But, to stop us guessing, it would be very useful to actually post an example on what you mean by aforementioned variations. Since you were printing to PDF make screen-shots of two outputs and mark the trouble-maker differences.
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  6. #6
    Junior Member
    Computer Details
    aggie_moose's Computer Details
    Computer:
    Windows 7 x64
    Discipline
    Mechanical
    Using
    AutoCAD 2014
    Join Date
    Jun 2014
    Location
    Houston, TX
    Posts
    16

    Default

    Ah ok, yes I believe that would work. There's around 7000 drawings in the project, though, and setting the limits for each manually would be very time-consuming. Additionally, though it pains me to say this, setting the limits is a bit too advanced for some of our CAD users. I've even gotten complaints that typing a single command to run a script was too confusing (they wanted a button on the ribbon).

    Here's a gif showing the 10 pdfs that were made with the lisp I provided. each one was plotted using exactly the same settings. The problem is when it wanders too far to the right and part of the border is outside the print area.

    http://i.imgur.com/b4Tax0Y.gif

  7. #7
    Junior Member
    Computer Details
    aggie_moose's Computer Details
    Computer:
    Windows 7 x64
    Discipline
    Mechanical
    Using
    AutoCAD 2014
    Join Date
    Jun 2014
    Location
    Houston, TX
    Posts
    16

    Default

    Registered forum members do not see this ad.

    Here's another example. It's not just the border that moves around, it's everything in the drawing. It's as if the print coordinates change a bit whenever you undo a purge and a regen. It's not the regen command that makes it change, it's the purge, regen, undo. This leads me to believe that somehow "undo" isn't actually undoing everything... something is different from plot to plot.

    http://i.imgur.com/ztf1ZOx.gif

    Of course, this is only speculation. I have no clue what's going on

Similar Threads

  1. AutoCAD DWG-2-PDF print driver vs. BlueBeam print driver
    By randomBullets in forum AutoCAD Drawing Management & Output
    Replies: 8
    Last Post: 8th Oct 2013, 09:42 pm
  2. AC2012 layout print & Designjet T2300. D size incorrect print rotation.
    By CalypsoArt in forum AutoCAD Drawing Management & Output
    Replies: 1
    Last Post: 14th Jun 2012, 03:34 am
  3. Cannot Print Colour, Crunched up Text, Restricted Print Field
    By D1-Xen in forum AutoCAD Drawing Management & Output
    Replies: 6
    Last Post: 14th May 2012, 06:46 am
  4. Print Preview and Print does not equal Drawing
    By reggy in forum AutoCAD General
    Replies: 4
    Last Post: 19th Aug 2008, 03:53 am
  5. can not print in b&w only
    By sparkyuk in forum AutoCAD General
    Replies: 6
    Last Post: 17th Dec 2007, 01:44 pm

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts