2 Replies Latest reply: Apr 17, 2012 8:45 AM by soletti500 RSS

    printing artboard only with vbscript

    soletti500

      Hello,

       

      my script creates an artboard in my pdf file. i need to print this artboard only.

       

      if i go to file/print manually there is an option 'Bereich' (pls see screenshot, my illustrator is in german language), so only the 2nd page is printed. (exactly what i want)

      2012-04-17-121513_722x670_scrot.jpg

      up to now i could not find this option (or something similiar) within vbscript.

       

      code:

      ...

           appRef.ActiveDocument.Artboards.Add(Array(Rminx,Rmaxy,Rmaxx,Rminy)) ' vars are correctly set before

           Set jobOptionsRef = CreateObject("Illustrator.PrintJobOptions")

           Set printOpts = CreateObject("Illustrator.printOptions")

           printOpts.JobOptions = jobOptionsRef

           jobOptionsRef.Designation = 2 'aiAllLayers

           jobOptionsRef.PrintArea=2

           appRef.ActiveDocument.PrintOut printOpts

      ....

       

      these lines prints 2 pages: 1) main document  2) artboard

       

      if i set

           jobOptionsRef.Designation = 1

      only the main document is printed - but not the artboard. i need exactly the other way round, only the artboard but no main image.

       

      pls could somebody help me with this problem?

      thank you very much!

      kind regards

         soletti