Turn the page on the entire document in vbscript

Hello

I know how to do it manually:

in an open PDF file, I press on "Ctrl + A" to select all elements in the document, then I choose Edition/transformation/rotation... 90 degrees.

now, I would do the same thing with a vbscript.

the best thing I have found is:

************************************

Rotate (90)

Void rotate (degree)

Dim appRef, argument, element

Dim changePositions, changeFillPatterns, changeFillGradients, changeStrokePattern, rotateAbout

Set appRef = CreateObject ("Illustrator.Application")

changePositions = true

changeFillPatterns = false

changeFillGradients = false

changeStrokePattern = False

rotateAbout = 1 ' aiTransformDocumentOrigin

For each item in appRef.ActiveDocument.PathItems

element. Rotate the degree, changePositions, changeFillPatterns, changeFillGradients, changeStrokePattern, rotateAbout

Next

appRef.Redraw

End Sub

************************************

not all, but all the elements, by that I am interested rotation - it would be better if you really all the elements would be rotated

the elements are turned around "aiTransformDocumentOrigin"... I would prefer if they rotate around 'document '.

Does anyone have an idea for a better solution?

THX and greetings

Soletti

loop through PageItems instead of PathItems in each layer instead of the entire Document, which would take care of everything.

to rotate around the center of the page, move the origin (0,0) at the center of the page before you turn.

Tags: Illustrator

Similar Questions

  • How to lift a picture in a document to print it without printing the entire document, and when I ask to print at 400%, how to tell me how many pages there are, and what's on them

    I have a pix of a quilt in a document. I would like to print the page of the document to 400% to allow me to see the quilt better. When I put in my percent effects, it prints the entire document and will not allow me to move to other pages. He says his p1 1. I take a class to make this quilt. I need this pix for the class.

    Have you tried to open the image in a new tab via the context menu and a middle - click on the Image of the view and the zoom of the image (Ctrl +)?

  • How can I pay the guides span the entire document?

    I hope I'm missing something - but when I put in place of guides in Pages they do not carry the next page or the section of the document (ie. they are individual-specific page). Does anyone know how to set the guides for the entire document?

    They simply failed. You must set up on each page.

    Peter

  • Why Read Out Loud feature can not read the entire document?

    I'm doing a few accessible PDF documents and I'm stuck to the Read Out Loud feature to read the entire document. Right now it only reads and headers in some parts of the second page. What should I do?

    Help, please!

    Hi redflashg4818899,

    Please see the following links that deal with the issue as follows:

    Function Read Out Loud from Adobe does not

    Read-Out-Loud problem

    I downloaded the latest player, but I can't read the PDF file. Help, please!

    Let us know if it worked.

    Thank you

    Shivam

  • Sending a part of a pdf document, not the entire document

    Client wish users can select and send the different sections of a pdf document without sending the entire document. Is this possible?

    Use Acrobat to extract the pages of interest, save this new PDF and attach it to an e-mail.

    This is impossible with the free Adobe Reader software.

    Be well...

  • HP Photosmart Series 4500: HP Photosmart 4500 printer does not print the entire document

    Printer does not print the entire document.

    @trish45,

    If you are able to print from other programs without any problems. Then we can reduce it down to the site you are using.

    Are you able to download and save the document or statement on your computer and then try and print it?

    I suggest to check on the website of the Bank and see if they have a troubleshooting section that might offer assistance.

    Thanks again,

  • I have a Dell A940 priner and when I print a documdent the entire document is covered with blue lines

    I have a Dell A940 priner and when I print a documdent the entire document is covered with blue lines. How can I get rid of these blue lines?

    Doodle of the clown,

    Do you use ink cartridges Dell series 2?

    Rick

  • How can I put bleeds for individual images (not for the entire document)?

    Hello everyone,

    I have a ready brochure for printing and now I had information on some images ago 3 mm lack of bleed. How can I fix this? The entire document should be set to this purge, but they always tell me that, in some places (images), he is still missing.

    Thank you much in advance.

    You must bring your images for objects that purge leave the allocation of purge and make sure that the image is big enough to fill this area.

  • Can I add page numbers to the entire document once I have the combine in pdf format?

    Can I add page numbers to the entire pdf document when combined?

    Hi gjanowiec,

    You can add page numbers to PDF using Acrobat. See https://acrobatusers.com/tutorials/how-do-i-add-page-numbers-at-the-bottom-of-my-pages for more information. If you do not have Acrobat, we invite you to try free for 30 days (www.adobe.com/products/acrobat.html).

    Please let us know if you have any additional questions.

    Best,

    Sara

  • Remove the overpint on the entire document using select all

    Is there a way to remove overprinting of attribute on an entire document? The problem is when somehitng else is in the selkection in addition to a vector path, and I want to do a select all.

    Tried, but does not work

    1. In the links palette, highlight all the links
    2. Click to access the link
    3. CMD 3 to hide
    4. Select all

    Must be something else in addition to related images that cause the atrributes boxes to be gray.

    Here is an example below of something which would have badly separated, without lifting with the overprint Preview on.

    Screen shot 2011-11-09 at 1.23.26 PM.png

    Maybe you can try this, Mike:

    Select one of the images [raster]. In the menu select choose same > appearance, and then choose the command selection > Inverse and that I hope will work so that you can erase the overprint with one (or two) click (s).

  • How to change the font of the entire document when you edit a pdf file?

    I have a font I want to use on this pdf. I open it and click on EDIT of PDF. It picks up all the recognizable words with windows around them ready for editing. How can I change all the words on the doc for some fonts I use rather than the program by choosing a font "similar"?

    can someone pls help

    Change the original document and create a new PDF document.

  • How do I Change the Date on an individual Page, but not the entire Document?

    I'm a student using pages to take notes for my classes. I want to change the date on the individual pages so I can see what topics we have learned to date, without changing the date of the document in the header. How can I do?

    No reason why you could not just choose Insert menu: Date time & in pages individual body of the document? In the Pages of v5, this date will not update when the document is reopened.

  • When I try to print PDF documents, I forst get a little screen that says that the document cannot be printed, then a small screenthat says no pages have been selected.  I can't even print the entire document.

    When I try to print two important documents, I first get a little screen that says that the document cannot be printed, then a second small screen that says no pages have been selected.

    Hi oldrealist,

    Try the following: open Adobe Reader | Change | Preferences

    • under Documents, change "Show the documents in PDF/A mode" Never.
    • under (enhanced) protection, clear the Safe_mode at startup.

    Let me know how it goes.

    Kind regards

    Nicos

  • Search for page elements in a specific layer, and not in the entire document

    Hello

    could you please help me to modify this script, then it can look only to the elements of the page ("Date", "Time", "Version", 'Code of component Ops') in a single specific layer named "Legend" instead of all the layers?

    /**********************************************************
    
    
    ADOBE SYSTEMS INCORPORATED 
    Copyright 2005-2006 Adobe Systems Incorporated 
    All Rights Reserved 
    
    
    NOTICE:  Adobe permits you to use, modify, and 
    distribute this file in accordance with the terms
    of the Adobe license agreement accompanying it.  
    If you have received this file from a source 
    other than Adobe, then your use, modification,
    or distribution of it requires the prior 
    written permission of Adobe. 
    
    
    *********************************************************/
    
    
    /** Saves every document open in Illustrator
      as a PDF file in a user specified folder.
    */
    
    
    // Main Code [Execution of script begins here]
    try {
      // uncomment to suppress Illustrator warning dialogs
      // app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
    
    
      if (app.documents.length > 0 ) 
      {
      var options, i, sourceDoc, targetFile,;
    
      // Get the PDF options to be used
      options = this.getOptions();
      if (options != null) 
      {
      sourceDoc = app.activeDocument; // returns the document object
      var fullName = sourceDoc.fullName;
      fullName = fullName.toString();
    
      var destFolder = fullName.slice(0,fullName.lastIndexOf("/"))
      var dateFound = false;
      var versionFromName = fullName.slice(fullName.lastIndexOf("-")+1, fullName.lastIndexOf("_"));
      var opsFromName = fullName.slice(fullName.lastIndexOf("/")+1, fullName.lastIndexOf("-"));
      var theVersionNumber = null;
      var dateField = null;
      var timeField = null;
      var opsVersionCode = null;
      for(i=0; i<sourceDoc.pageItems.length;i++)
      {
      if (sourceDoc.pageItems[i].note == "Date") 
      {
      dateField = sourceDoc.pageItems[i];
      }
      if (sourceDoc.pageItems[i].note == "Time") 
      {
      timeField = sourceDoc.pageItems[i];
      }
      if (sourceDoc.pageItems[i].note == "Version") 
      {
      theVersionNumber = sourceDoc.pageItems[i].contents;
      }
      if (sourceDoc.pageItems[i].note == "Ops Component Code")
      {
      opsVersionCode = sourceDoc.pageItems[i].contents;
      }
    
      }
      if (theVersionNumber == versionFromName)
      {
      if (opsVersionCode == opsFromName)
      {
      if (dateField == null)
      {
      alert('No tagged date field found. Tag field and try again.')
      }
      else
      {
      dateField.contents = TodayDate()
      timeField.contents = TodayTime()
      OLtargetFile = this.getTargetFile(sourceDoc.name, '.pdf', destFolder);
      sourceDoc.saveAs( OLtargetFile, options)
      // alert( 'Documents saved as PDF' );
      }
      }
      else
      {
      alert('Ops component code in boiler does not match file name or is not tagged. Please correct and try again.')
      }
      }
      else
      {
                    
      alert('Version number in boiler does not match file name or is not tagged. Please correct and try again.')
      }
      }
      else 
      {
      alert('User aborted')
      }
    
      }
      else
      {
      throw new Error('There are no document open!');
      }
    }
    catch(e) {
      alert( e.message, "Script Alert", true);
    }
    
    
    /** Returns the options to be used for the generated files.
      @return PDFSaveOptions object
    */
    function getOptions()
    {
    
    
    
    
    
      // Create the required options object
      var options = new PDFSaveOptions();
      // See PDFSaveOptions in the JavaScript Reference for available options
      options.pDFPreset = "AZ"
    
    
      // For example, uncomment to set the compatibility of the generated pdf to Acrobat 7 (PDF 1.6)
      // options.compatibility = PDFCompatibility.ACROBAT7;
    
      // For example, uncomment to view the pdfs in Acrobat after conversion
      // options.viewAfterSaving = true;
    
      return options;
    }
    
    
    function abortFunction(){
    
      modUI = null;
      dlg.hide();
      return null;
      }
    /** Returns the file to save or export the document into.
      @param docName the name of the document
      @param ext the extension the file extension to be applied
      @param destFolder the output folder
      @return File object
    */
    function getTargetFile(docName, ext, destFolder) {
      var newName = "";
    
    
      // if name has no dot (and hence no extension),
      // just append the extension
      if (docName.indexOf('.') < 0) {
      newName = docName + ext;
      } else {
      var dot = docName.lastIndexOf('.');
      newName += docName.substring(0, dot);
      newName += ext;
      }
    
      // Create the file object to save to
      var myFile = new File( destFolder + '/' + newName );
    
      // Preflight access rights
      if (myFile.open("w")) {
      myFile.close();
      }
      else {
      throw new Error('Access is denied');
      }
      return myFile;
    }
    
    
    function TodayDate(){
      var Dateformat = "dd mm yyyy";
      nameMonths = true;
    
    
       var monthNames = ["January","February","March","April","May","June","July","August","September","October","November","December"];
       var Today = new Date();
       var Day = Today.getDate();
       if(nameMonths == true){
       var Month = monthNames[Today.getMonth()];
       } else {
       var Month = Today.getMonth() + 1;}
    
       var Year = Today.getYear();
       var PreMon = ((Month < 10) ? "0" : "");
       var PreDay = ((Day < 10) ? "0" : "");
       var Hour = Today.getHours();
       var Min = Today.getMinutes();
       var Sec = Today.getSeconds();
       if(Year < 999) Year += 1900;
       var theDate = Dateformat.replace(/dd/,PreDay+Day);
       theDate = theDate.replace(/mm/,PreMon+Month);
       theDate = theDate.replace(/d/,Day);
       //theDate = theDate.replace(/m/,Month);
       theDate = theDate.replace(/yyyy/,Year);
       theDate = theDate.replace(/yy/,Year.toString().substr(2,2));
       if(Hour==0){
      Hour = "12";
      theDate = theDate.replace(/XX/,"AM");
       }else if(Hour>12){
       Hour = (Hour-12);
       theDate = theDate.replace(/XX/,"PM");
       }else{
       theDate = theDate.replace(/XX/,"AM");
       }
       var preSec = ((Sec < 10) ? "0" : "");
       var preHour = ((Hour < 10) ? "0" : "");
       var preMin = ((Min < 10) ? "0" : "");
       theDate = theDate.replace(/hr/,preHour+Hour);
       theDate = theDate.replace(/Mn/,preMin+Min);
       theDate = theDate.replace(/sc/,preSec+Sec);
       return theDate;
    }
    
    
    function TodayTime(){
      var Dateformat = "hr:Mn";
      nameMonths = false;
    
    
       var monthNames = ["January","February","March","April","May","June","July","August","September","October","November","December"];
       var Today = new Date();
       var Day = Today.getDate();
       if(nameMonths == true){
       var Month = monthNames[Today.getMonth()];
       } else {
       var Month = Today.getMonth() + 1;}
    
       var Year = Today.getYear();
       var PreMon = "";//((Month < 10) ? "0" : "");
       var PreDay = ((Day < 10) ? "0" : "");
       var Hour = Today.getHours();
       var Min = Today.getMinutes();
       var Sec = Today.getSeconds();
       if(Year < 999) Year += 1900;
       var theDate = Dateformat.replace(/dd/,PreDay+Day);
       theDate = theDate.replace(/mm/,PreMon+Month);
       theDate = theDate.replace(/d/,Day);
       theDate = theDate.replace(/m/,Month);
       theDate = theDate.replace(/yyyy/,Year);
       theDate = theDate.replace(/yy/,Year.toString().substr(2,2));
       if(Hour==0){
      Hour = "12";
      theDate = theDate.replace(/XX/);
       }else{
       theDate = theDate.replace(/XX/);
       }
       var preSec = ((Sec < 10) ? "0" : "");
       var preHour = ((Hour < 10) ? "0" : "");
       var preMin = ((Min < 10) ? "0" : "");
       theDate = theDate.replace(/hr/,preHour+Hour);
       theDate = theDate.replace(/Mn/,preMin+Min);
       theDate = theDate.replace(/sc/,preSec+Sec);
       return theDate;
    }
    

    You can target the layer to search, add a line before you right pageitems loop, and then change the new target in your loop

      var targetLayer = sourceDoc.layers['Legend']; // ** added
    
      for(i=0; i		   
  • How to reset the settings for spell check in word - it will not check the entire document and ignores the parts of it

    When press comes out to check for a new document, it is not highlight any misspellings or grammar and reading - 'Spelling and grammar verification.»  Has been ignored, text marked with "do not check spelling or grammar"".»  Actually, it checks the document and I don't know how to cancel it?

    Please repost on MS Office Word forum:
    http://answers.Microsoft.com/en-us/Office/Forum/word?page=1&tab=no

Maybe you are looking for

  • After the last update on Wnidows 7 Firefox opens just a blank screen (black).

    After the last update Firefox on a machine Wnidows 7, Firefox opens just a blank screen (black). It worked fine until the latest update. It does not open in "safe" mode I tried several facilities clean and using various other compatibility settings.

  • Satellite M30X: battery load stop

    HelloI have a satellite M30X laptop. It is two years old and the battery stopped charging but it works very well through the AC adapter.I bought a new battery, but it doesn't charge either. Can anyone throw any light on this for me please?The orange

  • What happens if you forget your password restriction and reset iPhone via iTunes

    Ive forgot my restriction password and want to reset my phone. If I reset it via iTunes he would still seek completion restriction code the restart procedure.

  • Where slot - VI nisync?

    Hello I'm using Labview 8.6 on a PXI-1045 chassis, a synchronization PXI-6653 module, and a PXI-6552 HSDIO module. I want to use the CLOCK out of the 6553, but I can't find the Subvi PXI - 6553 NISYNC. Where are the Subvi NISYNC? I did a search for O

  • How to change the label of the plot

    Easy question. I have a table of 2 x 2's graphical waveform. How can I change the labels on each of these plots the text I want? I look in the property nodes, but couldn't find it. Thank you!