Put in bleedbox on document removes all items

Hi all

The following code works very well for an empty document:

...

UIDRef = docRef: GetUIDRef (doc);

float h = mm2pt (getHeight (refnum) / 1000);

float w = mm2pt (getWidth (refnum) / 1000);

/ * bleed point values: * /.

PMRect bleedBox.

bleedBox.Left (mm2pt(bleedLeft / 1000.f));

bleedBox.Top (mm2pt(bleedTop / 1000.f));

bleedBox.Right (mm2pt(bleedRight / 1000.f));

bleedBox.Bottom (mm2pt(bleedBottom / 1000.f));

Create a SetPageSizeCmd

InterfacePtr < ICommand > pageCmd(CmdUtils::CreateCommand(kSetPageSizeCmdBoss));)<-this interface does not work

InterfacePtr < ICommand > pageCmd(CmdUtils::CreateCommand(kSetPageSetupPrefsCmdBoss));)     <-this was recommended by Community Member

Get an IDocSetupCmdData for the SetPageSizeCmd:

InterfacePtr < IDocSetupCmdData > pageData (pageCmd, IID_IDOCSETUPCMDDATA);

pageData-> SetDocSetupCmdData (docRef, PMPageSize (w, h), 1, 1, w > h, kLeftToRightBinding, kFalse);

pageData-> SetUseUniformBleed (false);

pageData-> SetBleedBox (bleedBox);

CmdUtils::ProcessCommand (pageCmd);

But if if I have an open document, all the elements are blown away by this command. Size and bleeding are very good.

I thought that I have to set up a command and control data, but something is missing. I want to just change him bleeding, nothing else.

What I have to change?


Thanks for all your advice!


kb_alfa

Hi kb_alfa,

I don't see what's happening at my end, no matter what the elements were drawn are not blown. Keep in mind that if you change the size of the page elements which could have been present on the document can move out of it and then found themselves on the pasteboard. How confirm you that the items have been deleted, is because you might not be able to see them on your document. Please check in the layers panel to check if the items have been deleted or moved somewhere outside the document.

In case this does not work for you, I would recommend that you send the InDesign document that put you to the test and values that you call the method to set the purge, I'll take a look and see if I can help further.

-Manan

Tags: InDesign

Similar Questions

  • How to remove all items in the download under bookmark folder in the shortest time?

    I understand that all downloads from the internet and yahoo/google mail are stored in the "Download" folder I bookmarked when I want to delete. I think that if the download folder is never empty, then my mac will slow down. So I want to remove these downloads that I've seen. How can I remove all THE items in the shortest time? Deleting items, even in groups, takes a long time. Is there a method I can use so that all the items in the folder are deleted in one fell swoop?
    Thank you.
    Unguja

    Yes, it worked. Thank you very much.
    Unguja

  • [JS] [CS4] Remove all items from the hidden page?

    Hello

    I am trying to remove all the hidden page items regardless of the sublayer how they are buried in. Is this possible? I wrote here a snippet that seems to work only in part. It removes all hidden page items unless two hidden objects exist right after the other in the stacking order. Why this might be happening? Any suggestions?

    for (i=0; i<doc.pageItems.length; i++){
              if (doc.pageItems[i].hidden == true){
                   doc.pageItems[i].remove();
                   }
         }
    

    I'm new to scripting so any help is greatly appreciated.

    Thank you!

    Lindsay

    What happens if you go back to the front? I think that something like that

    #target illustrator
    
    var idoc = app.activeDocument;
    
    for (i = idoc.pageItems.length-1; i>=0; i--){
              if (idoc.pageItems[i].hidden == true){
                   idoc.pageItems[i].remove();
                   }
         }
    

    Worked on a trial

  • Remove all items from a Collection of table

    Small question. What is the code to remove all the elements of a collection of table?

    I have a collection of table {myTilelistAC}, which is referred to as the data provider for my tilelist and I have a button that when clicked will be empty this collection of table, so that the tilelist component will be mainly empty too.

    ArrayCollection.removeAll ();

  • is it OK to remove registry items that say not 'value '?

    I am trying to clean up in the memory register and have found a few programs that I don't recognize the names, and they say in details "undefined value". Would it not prudent to remove all items that say this?

    I wouldn't do anything in the registry unless you really know what the results will be.

    There is no need to clean the registry.

  • When I sent a point (from document file) in the garbage can, it makes a copy of the item and puts it in the document file

    Hello, please help.  When I try to remove an item from the My Documents file, it sends the item to the trash to recycle, BUT ALSO creates a copy and put it in My Documents. It drives me crazy.  Thank you

    go to msconfig (type in the search box in startmenu or run in xp, and then press enter) then prepare your computer to clean boot by disabling all startup items and any of the services of windows, and then restart your computer. See if it makes a difference? If it did then you know who caused the problem.

    Then, make sure your system is clean of viruses and spyware and also

    using the analysis

    http://www.Malwarebytes.org/

    It is recommended to perform a complete analysis using above program anti-malware and a good anti-spyware and antivirus as:
    for viruses:
    http://www.avast.com/en-GB/index
    For spyware:
    http://www.SUPERAntiSpyware.com/

    Try deleting the files in 'Safe' Mode, see if it happens again?

  • A document of several pages and the need to remove all other pages.  Document to wholesale remove each page separately.

    I have a multi page document (1, thousands of pages) and you need to delete all the other pages.  I can't understand how to do this and I know it's doable.  I haven't the time to delete this one page at a time.  Help, please.

    If you have Adobe Acrobat DC Pro, you can create a custom command using the following JavaScript code to remove all pages:

    // process document from the last page to the first page
    for (var i = this.numPages-1; i>=0; i--) {
        if (i % 2) { // this will delete all even numbered pages
            this.deletePages(i);
        }
    }
    

    To find out how you can create a custom command, follow the steps detailed here: create orders customized in Adobe Acrobat DC Pro - KHKonsulting LLC

    If you want to remove all odd numbered pages, simply change the line #3 to this:

    if (!(i % 2)) { // this will delete all odd numbered pages
    

    If you use an earlier version of Acrobat Pro, you can use an Action to accomplish the same thing. If you use Adobe Acrobat Standard, you do not have access to the action Wizard or custom orders, and you have to write a script of folder level to create a new menu item that can remove odd or even numbered pages.

  • Cannot remove all of the items on stage and "delete a scene".

    Hi people!

    I have a problem using the deleteSymbol() Api function. It works only for the... symbols, but not for the element.

    In this example online, the gray rectangle mobile is a symbol and the "text" is a text Div element: http://www.terredainventare.it/delete/MyDeleteSymbols.html

    Here are the project files: http://www.terredainventare.it/delete/DeleteSymbols.zip

    If you click on "Cleare etc" symbol disappears.

    Here is the code I tried to 'click ': event

    sym.getSymbol("Anim").deleteSymbol ("Anim");

    sym.getSymbol("Text").deleteSymbol ("Text");

    SYM.$("text"). Remove();

    Another question: what happens if I want to delete all items that are now on the scene (symbols + elements)?

    I tried:

    sym.getComposition () .getStage () .getChildSymbols () .deleteSymbol ();

    but it does not work.

    And, if I can 'clear the scene' to move to an other 'scene' where I put other animations and text, how can I do this? How practically to create a new "scene"?

    Thank you very much in advance for your valuable help!

    Davide

    Hello Davide,.

    (1) copy the following code will work on your Clear.click:

    sym.getSymbol("Anim").deleteSymbol ();

    SYM.$("text"). Remove();

    Note: Line #2 [sym.getSymbol("Text").deleteSymbol ("Text");] prevented line #3 [sym.$("Text").remove ()] to run.

    (2) now, if you want to clear your scene:

    SYM.$("stage"). Children(). Remove();

    I checked the two codes [1) & (2)] by using your file.

  • How can I remove favorites all items in my Inbox?

    Trying to clean up my Inbox, I wonder how to remove all star emails?

    It is the yellow star, 5 points?

    I could do this:

    1. Press the "Favorites" button in the bar to Quickfilter. This will make show only starred messages.
    2. Use ctrl + a to select all displayed messages.
    3. Press the button Delete.
    4. Disabled the "Favorites" button in the Quickfilter.

    An alternative is to:

    1. Sort column favorite to group all favorite items.
    2. Select the first item in the star.
    3. Scroll down after the last star element and shift-click to select all of the messages between the two.
    4. And then delete will work on the selected messages.

    More on sorting and selection here: http://www.ramsden.org.uk/8_How_to_sort.html

  • I've recently upgraded to El Capitan - biggest problem is timing removed all the entries in my previous ical. Any ideas how I can track down the file containing these essential documents and install in the new program?

    I've recently upgraded to El Capitan - biggest problem is timing removed all the entries in my previous ical. Any ideas how I can track down the file containing these essential documents and install in the new program?

    All calendars are enabled in the sidebar?

  • Remove all documents (3430) iBooks 4.6 &amp; data

    How can I remove all documents and data in iBooks 4.6 (3430)?

    Settings > General > storage & use iCloud > storage: storage management > iBooks shows that 1.4 GB of Documents & data are consumed. My goal is to reduce that less than 100 MB.

    In iBooks, I have selected the two elements in all the books and have exploited the button Delete. The elements now exist with a download of cloud icon

    I also went in iBooks on OS X and hid all foreign purchased iBooks.

    Settings > iBooks has the following settings by default:

    Synchronize bookmarks and Notes: off

    Synchronize Collections: off

    Online content: off

    Settings > iTunes & App Store has books DOWNLOADS AUTOMATIC start.

    I restarted my iPod and iBooks is always consumed 1.4 GB.

    iBooks is now consumed 2.0 GB of storage.

    Apparently he uploaded a certain number of books previously purchased without my permission. Opening iBooks still once, I found a number of books in my collection that I had previously deleted. I chose the books, then selected delete. These books are now gone because I have also chosen to hide these books by using iBooks on OS X in my account settings, but a number of books and collections still appear in my collection of iBooks. By selecting do not have the provision to remove. They are either collections, books that exist in the cloud (with a download icon collection iCloud), or links to an iBooks record entry for the book missing.

    After doing this, iBooks is always consumed 2.0 GB of storage.

    I just want to remove this from my iPod touch, including the alias vestigial book, collections and pointers to iBooks store pages. I would remove the unit iBooks app altogether if I could.

  • Remove all bookmarks in the Document

    Anyone happen to know how to delete all guides in a document? I am aware that I can use Ctrl + Alt + G and then press DELETE to remove the guides on a single page or spread, but in the whole document open (all pages at once)? I did research some and located the following script:

    myDoc var = app.activeDocument;

    If (myDoc.guides.length > 0) {myDoc.guides.everyItem () .remove () ;}

    I am sorry to say that this script has not worked for me. This is the error message I received:

    Error number: 1025

    Error string: due to end of the declaration

    Engine: by default

    File: C:\Users\...etc.

    Line: 1

    Source: var myDoc = app.activeDocument;

    If anyone knows a way around this or knows how to fix this text please let me know and anyone else that might interest you.

    myDoc var = app.activeDocument;

    If (myDoc.guides.length > 0) {}

    myDoc.guides.everyItem () .remove ();

    }

    The same as that found like you. Works for me in CS5 Mac. Removes all the guides, including master pages. Just change one of the exisitng javascripts and do a save as to a new name.jsx.

  • You can remove all the highlights at once instead of one at a time in a PDF document?

    I have 12 PDF each of which is 300 to 600 pages where someone has highlighted large parts of gree, blue and yellow. I want to keep all yellow highlights and remove all green and blue. Is it possible to do without having to remove the strong points of each page? Any help is greatly appreciated!

    Kevin

    This could help you. You will have to do this on a per-document tho basis but should work.

    Click on the comments tab at the bottom left of the page. Choose display choose by type and choose annotations to text editing. Sort and choose the color. This niche all green, red etc inside a comment with an expandable + nest for her. Now, just click the Green and press from the trash, repeat for blue. Hope that helps?

  • Windows Explorer favorite empty and cannot add all items

    I'm on Windows 7 Ultimate 64 and recently restored a backup after a system crash. The restore process required me to change the locations by default of the special folders such as Documents, downloads, video, etc.

    After a reboot, my favorites (at the top of the left pane in Explorer) became unresponsive.
    Favorites is empty and I can't drag all items in the Favorites window ('forbidden access' illustrious red sign).
    Even after reset favorite special folder locations is always insensitive.
    By clicking on "Add current location to Favorites" in the menu context has no effect.

    But increasingly, when I highlight favourites and click on file-> properties from the Explorer menu, nothing happens.

    I also tried to create shortcuts in the folder \Users\me\Favorites, but they do not appear.

    Anyone else have this experience or you know a fix?

    Thanks for your reply Gael.

    I managed to fix it with a different tactic, however.

    I tried to save a worksheet Excel to your Favorites, just to see where it will end up and was told by the dialogue that the file could not be saved to C:\Users\me\Links\Links\file.xlsx because the path does not exist.

    Then I created another folder in \Users\me\Links called links to complete the path C:\Users\me\Links\Links\ and all my favorite shortcuts in there.
    Following the closure of the Explorer window and re - open another, all my favorite shortcuts were again under Favorites at the top of the left pane.
    Problem solved.

    I don't know how I managed to set the location of my favorites to C:\Users\me\Links\Links\ in the first place well but I changed the location of the tip links to C:\Users\me\Links to remove the redundant subdirectory and all seems ok again.

    Thanks again for the support.

  • How to copy/paste the text box anchor to its anchor text and remove all checkpoints empty?

    Hi all

    I have a document of a few pages, but a story. The right column is the area of main text and on many places, anchored text boxes are placed which appears on the left column, as shown below.

    I want the text of each text box anchor to cut of his place and sticking to its point of insertion/anchor and remove all of the empty boxes of anchored.

    I'm trying since this morning but I was able to get the anchor object reference. Any help on how to start with will be useful.

    Marie rosine

    anchor_box.png

    OK, let's say you have a main text (not rooted) box and three text boxes that are anchored to the text it contains. One is anchored with text, the second is not anchored and the third argument is empty (I won't get into the anchor vs custom anchor line given that you mention in your message).

    Scroll us through the items on the page:

    function main(){
      var myDoc = app.activeDocument;
      var myPages = myDoc.pages.everyItem().getElements();
      for (var i = 0; i < myPages.length; i++){
      {
        var myPage = myPages[i];
        //Checks that the page is valid, and that it is not a master page. If either is true, skips to the next page.
        if (myPage.isValid == false) continue;
        if (myPage.parent instanceof MasterSpread) continue;
        var myItems = myPage.allPageItems;
        for (var j = 0; j < myItems.length; j++){
          //Current item.
          var myItem = myItems[j];
          //If myItem doesn't have a Character parent, it is not anchored.
          //The first and third text frames would fail this test.
          if (!(myItem.parent instanceof Character)) continue;
          //We only care about text frames.
          if (!(myItem instanceof TextFrame)) continue;
          //I think the only way this would happen would be if you had an image or
          //something else unexpected within the frame. I check for it so no content
          //is inadvertently lost.
          else if (myItem.texts.length > 1) continue;
          //If we're still in this iteration of the loop, all qualifications are met.
          //Flatten the text frame.
          //I don't use layers that often so, to me, flatten makes sense. You may want
          //to use a different term if there's a chance for confusion.
          flattenItem(myItem);
         }
       }
    }
    
    function flattenItem(funcItem)
    {
         //Hold onto the anchor character.
        var myParent = funcItem.parent;
         //Duplicate the text from within the frame so that it appears right after the anchor.
         //There may be other methods, but this works for me. I try to avoid copy/paste
         //so as not to deal with any clipboard mishaps. I added a check in case of empties.
         if (funcItem.texts.length > 0){funcItem.texts[0].duplicate(LocationOptions.AFTER, myParent.insertionPoints[0]);}
         //Replace the anchor character itself with a space (or whatever) which also
         //deletes the text frame it was anchoring.
        myParent.contents = " ";
    }
    

    I guess the takeaway is perhaps you aren't looking at the main text block and then check if anything it is anchored. You are watching each text block and find out if it is anchored. That's my approach, anyway.

Maybe you are looking for