Javascript for setting the CropBox Units in Millimetres

Hi
I am looking for a Javascript for setting the CropBox Units in Millimetres.
I have a pdf mag that needs the CropBox settings of all the units to be 7.408 mm.
Any help pretty please?
Thanks

Hi,
here is a sample script that put boxes size in Millimetres into custom properties metadatas fields.
It can run from an Action, from the console, or from any form field (button…).
Feel free to re-use/customize it.
var mbox = this.getPageBox("Media");
var Mzeroz = Math.round(mbox[0] * 0.3527);
var Munz = Math.round(mbox[1] * 0.3527);
var Mdeuz = Math.round(mbox[2] * 0.3527);
var Mtroiz = Math.round(mbox[3] * 0.3527);
var cbox = this.getPageBox("Crop");
var Czeroz = Math.round(cbox[0] * 0.3527);
var Cunz = Math.round(cbox[1] * 0.3527);
var Cdeuz = Math.round(cbox[2] * 0.3527);
var Ctroiz = Math.round(cbox[3] * 0.3527);
var tbox = this.getPageBox("Trim");
var Tzeroz = Math.round(tbox[0] * 0.3527);
var Tunz = Math.round(tbox[1] * 0.3527);
var Tdeuz = Math.round(tbox[2] * 0.3527);
var Ttroiz = Math.round(tbox[3] * 0.3527);
var bbox = this.getPageBox("Bleed");
var Bzeroz = Math.round(bbox[0] * 0.3527);
var Bunz = Math.round(bbox[1] * 0.3527);
var Bdeuz = Math.round(bbox[2] * 0.3527);
var Btroiz = Math.round(bbox[3] * 0.3527);
var abox = this.getPageBox("Art");
var Azeroz = Math.round(abox[0] * 0.3527);
var Aunz = Math.round(abox[1] * 0.3527);
var Adeuz = Math.round(abox[2] * 0.3527);
var Atroiz = Math.round(abox[3] * 0.3527);
if (app.language == "FRA")
this.info.Zone_de_media_en_mm = Mzeroz + ", " + Mdeuz + ", " + Munz + ", " + Mtroiz;
this.info.Zone_de_recadrage_en_mm = Czeroz + ", " + Cdeuz + ", " + Cunz + ", " + Ctroiz;
this.info.Zone_de_rognage_en_mm = Tzeroz + ", " + Tdeuz + ", " + Tunz + ", " + Ttroiz;
this.info.Zone_de_fond_perdu_en_mm = Bzeroz + ", " + Bdeuz + ", " + Bunz + ", " + Btroiz;
this.info.Zone_graphique_en_mm = Azeroz + ", " + Adeuz + ", " + Aunz + ", " + Atroiz;
else
this.info.MediaBox_in_mm = Mzeroz + ", " + Mdeuz + ", " + Munz + ", " + Mtroiz;
this.info.CropBox_in_mm = Czeroz + ", " + Cdeuz + ", " + Cunz + ", " + Ctroiz;
this.info.TrimBox_in_mm = Tzeroz + ", " + Tdeuz + ", " + Tunz + ", " + Ttroiz;
this.info.BleedBox_in_mm = Bzeroz + ", " + Bdeuz + ", " + Bunz + ", " + Btroiz;
this.info.ArtBox_in_mm = Azeroz + ", " + Adeuz + ", " + Aunz + ", " + Atroiz;

Similar Messages

  • Settings for Mark for deletion for setting the exchange Rates

    Hi all,
    Can you tell me where is the settings for Mark for deletion for setting the exchange Rates.
    User has deleted all the MEND rates in 'OB08'.
    and he cannot input them again, gets error message "an entry with this key is marked for deletion"
    Rg
    vk

    Hi
    Try as said in help - Message number is SV010
    You can:
    enter another key
    delete the entries before entering the new entry
    The entries flagged for deletion can then no longer be reactivated.
    End the error dialog with Cancel. Choose Save and repeat your new entry.
    reactivate the entry marked for deletion to change it :
    and return to the overview screen with Back.
    Choose Display deleted entries in menu Choose to select all the deleted entries.
    Mark the entries that you want to reactivate.
    Choose Retrieve.
    VVR

  • Host-target application for setting the PC(host) time to cRIO(target)

    if there is any host-target application for setting the PC(host) time to cRIO(target)? if probably a sample program provided? 

    Hi Charles,
    There's a function called RT Set Date and Time that you can make use of.
    We don't have a sample program but this is a very simple VI to use. Read off the current date time in Windows, then enter the corresponding info into this VI and run it. The cRIO controller will then have its date time updated accordingly.
    Regards,
    Boon Chen 

  • Pre-populate adapter for setting the Active Directory OU for a user

    Hi All
    I created a pre-populate adapter that set the Active Directory OU for a user...
    In the end the status of the resource is still showing "provisioning"..
    It must be "Provsioned"..did I miss something ?
    The logs speak as below :-
    08:01:12,678 INFO [STDOUT] Running Create User
    08:01:12,678 INFO [STDOUT] Before appending Root Context:OU=Human Resources,
    08:01:12,678 INFO [STDOUT] tcUtilLDAPController.java : hierString : OU=Human Resources,dc=mydomain,dc=com
    08:01:13,553 ERROR [ACTIVEDIRECTORYCONTROLLER] Problem creating object: javax.naming.OperationNotSupportedException: [LD
    AP: error code 53 - 0000001F: SvcErr: DSID-031A0FC0, problem 5003 (WILL_NOT_PERFORM), data 0
    ]; remaining name 'cn=ASYMONDS'
    08:03:18,756 INFO [[xlWebApp]] action: LogonAction: User 'XELSYSADM' logged on in session 8116CBC0FA1481D06A207A1941B9
    E096
    08:22:31,256 ERROR [WEBAPP] Class/Method: ProvisionedResourcesForUserAction/confirmEnableSelection encounter some proble
    ms: No checkbox was checked.

    Just verify the OU value is correctly populated , first try doing the provisioning by manually giving OU and everything .
    Is it successful ?
    Then we can check if something wrong going with pre pop.
    Thanks
    Suren

  • Application server 8.1 alternative for Setting the Document Preferences

    hi All,
    I used to do the following under application server 7 to set the Document preferences:
    To use the Administration interface to set the document preferences, follow these steps:
    1. In the left pane, for the application server instance, open HTTP Server.
    2. Open Virtual Servers.
    3. Click the name of the virtual server you want to edit.
    4. Click the Doc Handling tab.
    5. Click Doc Preferences.
    6. Choose the appropriate field values, as discussed in the following sections.
    7. Click OK.
    I need to do the same thing in application server 8.1 how can i do that?
    What is the alternative procedure?
    I want to have multiple indexes under the same instance which hosts multiple applications
    Thanks,
    Scotty

    hi,
    Can anyone please guide me to the correct solution?
    I have a project and i dont know whether i am stepping right?
    I read in the docs about "welcome-file-list" that is found in the default-web.xml file and it pointed that i can design my application's web.xml to include "welcome-file-list" to point to my customized index.html
    If this is the case, then how can i point my browser to the server is it by the context root only?
    Your quick reply is really appreciated.
    Thanks,
    Scotty

  • A small wrapper script for setting the lib32-gtk environment.

    Hi all,
    i've created a small script [1], which sets the gtk2 environment for
    lib32 applications.
    Thanks to buttons and alexwizard...
    just put run_bin32_gtk before the app command.
    I use this script for QT4 apps mostly, for instance:
    run_bin32_gtk opera
    or
    run_bin32_gtk skype --disable-cleanlooks
    so it fits best in my gnome environment...
    best wishes
    [1] http://aur.archlinux.org/packages.php?ID=27419

    I did something similar a couple of months ago, but instead of attempting to be clever and guessing what the background image is supposed to be, I just write it in the filename. Since some pictures just end up being too bright (or whatever) when used as a background to a urxvt terminal, I added some extra parameters for setting gamma, brightness, tint and the direction the image should be rendered. It relies on hsetroot for actually rendering the picture.
    #!/usr/bin/python
    # set-background
    import sys, os, string, re
    patterns = [ (re.compile("t-([a-f\d]+)"), lambda x: "-tint \#" + x)
    , (re.compile("b-([\d]+)"), lambda x: "-brightness -0." + x)
    , (re.compile("g-([\d]+)"), lambda x: "-gamma "+ x)
    , (re.compile("f-(v|h|d)"), lambda x: "-flip" + x)
    def buildCommand(file):
    output = ["hsetroot"]
    output.append("-" + (string.split(file,".")[-2]))
    output.append(file)
    for token in string.split(file,".")[1:-2]:
    for (pat,f) in patterns:
    if pat.match(token):
    output.append( f(pat.findall(token)[0]))
    return string.join(output)
    print buildCommand(img)
    os.system(buildCommand(img))
    # vim:set et:
    So for instance, an image with the name background.t-704214.f-v.full.jpg would be rendered as a stretched image, flipped vertically with a sepia tint. The files are required to be in the following format NAME.(MODIFIER.)*TYPE.SUFFIX, where the the order and number of modifiers are unimportant. The gamma values are somewhat unintuitive, but I guess you'll just have to play around with it to get it right.
    And to randomize the whole thing, I just used the following script in my .xinitrc to randomly pick a image from a folder.
    #!/bin/bash
    bg_folder="$HOME/.backgrounds";
    pics=($(ls $bg_folder))
    let "n = $RANDOM % ${#pics[@]}"
    (cd $bg_folder; set-background ${pics[$n]})

  • Writing own TableCellRenderer for setting the Background Color of a cell ?

    Hello,
    I am using the JTable and DefaultTableModel for my GUI. I use also only plain text in the rows and columns. I have a method which examine every row wether something is wrong with a string so if something is wrong i want to set the BackgroundColor of this cell with the bad string to a color i can define.
    Do I need to write an own TableCellRenderer for this tiny task?
    Table class has no setBackground(new Color(22,22,22),posRow,posCol);

    http://forum.java.sun.com/thread.jspa?forumID=57&threa
    dID=606504this code is from your ColorRenderer class:
    public void actionPerformed(ActionEvent e)
                   Iterator it = colors.keySet().iterator();
                   while ( it.hasNext() )
                        Point key = (Point)it.next();
                        int row = key.x;
                        int column = key.y;
                        if (column == -1)
                             model.fireTableRowsUpdated(row, row);
                        else if (row == -1)
                             int rows = table.getRowCount();
                             for (int i = 0; i < rows; i++)
                                  model.fireTableCellUpdated(i, column);                              
              }you have set an ActionListener to the ColorRenderer class and put the actionPerformed method in it but compared to a JButton the actionPerformed method is called when i click the JButton but what you do in your code that the actionPerformed method is executed. I have deleted the whole actionPerformed method and the listener and still the cell is displayed with a color so was it for the blinking?
    And the method setBackground is nowhere called or run actively so is this method called internally by the ColorRenderer class? or is this method somehow called recursively as in the method setBackground I can see this method call:
    c.setBackground( (Color)o ); but i think this is another setBackground method right? because the first method i mentioned has 3 parameters not 1 parameter so where is the method setBackground with 3 parameters called actively in your code? i cant find anything. ok after examining again the c.setBackground( (Color)o ); is the one with 3 parameters ;-)
    public void setBackground(Component c, int row, int column)
              { that was set for the previous cell, so reset it here
                   if (c instanceof DefaultTableCellRenderer)
                        c.setBackground( table.getBackground() );
                   //  In case columns have been reordered, convert the column number
                   column = table.convertColumnIndexToModel(column);
                   //  Get cell color
                   Object key = getKey(row, column);
                   Object o = colors.get( key );
                   if (o != null)
                        c.setBackground( (Color)o );
                        return;
                   //  Get row color
                   key = getKey(row, -1);
                   o = colors.get( key );
                   if (o != null)
                        c.setBackground( (Color)o );
                        return;
                   //  Get column color
                   key = getKey(-1, column);
                   o = colors.get( key );
                   if (o != null)
                        c.setBackground( (Color)o );
                        return;
              }using your full code gives me a bug:
    when i double click in the first column to change some text doesnt matter which row then the selected cell gets a red border and the rest of the table freezes. When i exchange the order of the columns move column 1 to 2 and column 2 to 1 then the freezed table is working again?? could you help solving that problem else the cell color setting works fine for me :-) thank you very much!

  • FM required for setting the message body with values from table

    Hi all,
      I have a retq wherein in tcode VL31n when i create the IBD,after saving the document,i need to send a mail to few people in the FI dept with the foll deatils:
    Inbound delivery no.
    A. Bill of Lading no.
    B. Bill of Lading date
    C. No. of containers
    D. Invoice no.
    E. Invoice date
    F. Supplier name
    G. Vessel name
    H. Name of the receiving port
    I. Final Destination,,
    J. Expected date of arrival
      The method used is SAVE_AND_PUBLISH_DOCUMENT.i get all these deatils in the table it_xlikp.But is there  any FM by means of which i cna read these  values and set the message body with these values and send this  as  a mail using the FM SO_DOCUMENT_SEND_API1?Full points will be  awarded..Any help is appreciated..
    Regards,
    Disha.

    HI Disha
    Check out these links. They will surely help
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    If you find this answer useful, please reward me for the same.
    Good luck
    Karthik Potharaju

  • BAPI/FM for setting the user status for the Project definition and WBS elem

    Hi,
    I have to set the User Status for the Project Definition and the WBS elements in that project.
    The User status to be set is the same for the project and wbs elements.
    Please let me know if there is any BAPI/FM to set the user status..
    Thanks in advance.
    Regards
    Shiva

    Hi Shkithija,
    There is a dump encoutered in the form "PS_FLAG_GET_GLOBAL_FLAGS" for 'chk_precommit_ok' in the "BAPI_PS_PRECOMMIT".
    But it is showing SY-SUBRC = 0 when used along with BAPI_TRANSACTION_COMMIT.
    May i know what are input parameters we need to pass it to "BAPI_PS_PRECOMMIT".
    Do you have any idea.
    Please let me know
    Regards
    vishnu

  • Help on preparing shell script for setting the listener password

    Hi All,
    I am working on checking all my DB servers listeners and if the password is not set for the listener then I need to set the password for that.
    As we have many servers, I am planning to prepare the shell script for doing this task.
    I am familiar with setting up the listener password manually, but strucked up to prepare the shell script to do the same task.
    Can any one kindly help me on this.
    Thanks in advance,
    Mahi

    815537 wrote:
    Could any body please help me.
    Thanks,
    MahiPatience, Grasshopper
    This forum is not a chat line, and it is not paid support.
    No one is responsible for monitoring it and giving a quick response.
    Furthermore, it is a global forum. The person with the information you seek may very well live 20 time zones away from you and was going to bed just as you posted. He will not even see your post for several more hours.
    Your original post went up in the middle of the night for half the world.
    No one with the information you seek is deliberately withholding it until you sound sufficiently desperate.

  • Is there a command for setting the selection option to be mandatory

    hi,
    i have a 4 select-option in my program, and i would set that, either one select option must be fill to execute the program. which mean, at least one field ( any select option) have to be enter, or else it will not run. is there a command to restrict on this?
    please help. thanks

    Check this sample
    TABLES : vbap.
    SELECT-OPTIONS : so_vbeln FOR vbap-vbeln,
                     so_posnr FOR vbap-posnr.
    AT SELECTION-SCREEN.
      IF NOT so_vbeln[] IS INITIAL OR
         NOT so_posnr[] IS INITIAL.
      ELSE.
        MESSAGE e000(ztest_gopi) WITH 'Atleast one shd be filled'.
      ENDIF.
    " OR You can do it this way also
    TABLES : vbap.
    SELECT-OPTIONS : so_vbeln FOR vbap-vbeln,
                     so_posnr FOR vbap-posnr.
    AT SELECTION-SCREEN.
      IF so_vbeln[] IS INITIAL AND
         so_posnr[] IS INITIAL.
        MESSAGE e000(ztest_gopi) WITH 'Atleast one shd be filled'.
      ENDIF.
    Regards
    Gopi

  • PowerShell Script for Setting the Welcome Page View of a document set

    Hi,
    We are using document set in the document library and we have created the separate view in the document set and it will show only particular metadata columns. We need to change from default view to another view. For this, we need to write the power shell
    script and update the document set welcome page view link in the document set template. Please let me know how we can get this.
    Thanks,
    Mylsamy

    Hey Mylsamy,
    welcome page view is stored in $contenttype.XmlDocuments. Here is how you can change the view using powershell:
    $web = Get-SPWeb "WEBURL"
    $list = $web.Lists["LISTNAME"]
    $contenttype = $list.ContentTypes["CONTENTYPENAME"]
    $viewid = $list.Views["VIEWNAME"].Id
    $xmldocs = $contenttype.XmlDocuments
    foreach($xmldoc in $xmldocs)
    if($xmldoc.Contains("WelcomePageView"))
    Write-Host "XML contains WPV"
    $newview = [XML] @"
    <wpv:WelcomePageView xmlns:wpv="http://schemas.microsoft.com/office/documentsets/welcomepageview" ViewId="$viewid" />
    $xmldocs.Delete("http://schemas.microsoft.com/office/documentsets/welcomepageview")
    $xmldocs.Add($newview)
    break;
    $contenttype.Update($updateChildren, $false)
    Write-Host "Welcome Page View updated at " $list.Title
    Regards,
    Alexander 

  • I have followed all the instructions for setting the font size,but it remains very tiny (6 or 8 point). Why?

    Though the font on the desktop and email programs is fine (14 or 16 point), on the google sedarch pages or any websites that are accessed via Firefox, it is tiny. What's wrong? How can I make things more legible? I am working on a laptop and followed all the instructions given in DISPLAY.
    Thanks for any advice.

    You can use an extension to set a default font size and page zoom on web pages.
    *Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • 2K8 - Best practice for setting the DNS server list on a DC/DNS server for an interface

    We have been referencing the article 
    "DNS: DNS servers on <adapter name> should include their own IP addresses on their interface lists of DNS servers"
    http://technet.microsoft.com/en-us/library/dd378900%28WS.10%29.aspx but there are some parts that are a bit confusing.  In particular is this statement
    "The inclusion of its own IP address in the list of DNS servers improves performance and increases availability of DNS servers. However, if the DNS server is also a domain
    controller and it points only to itself for name resolution, it can become an island and fail to replicate with other domain controllers. For this reason, use caution when configuring the loopback address on an adapter if the server is also a domain controller.
    The loopback address should be configured only as a secondary or tertiary DNS server on a domain controller.”
    The paragraph switches from using the term "its own IP address" to "loopback" address.  This is confusing becasuse technically they are not the same.  Loppback addresses are 127.0.0.1 through 127.255.255.255. The resolution section then
    goes on and adds the "loopback address" 127.0.0.1 to the list of DNS servers for each interface.
    In the past we always setup DCs to use their own IP address as the primary DNS server, not 127.0.0.1.  Based on my experience and reading the article I am under the impression we could use the following setup.
    Primary DNS:  Locally assigned IP of the DC (i.e. 192.168.1.5)
    Secondary DNS: The assigned IP of another DC (i.e. 192.168.1.6)
    Tertiary DNS:  127.0.0.1
    I guess the secondary and tertiary addresses could be swapped based on the article.  Is there a document that provides clearer guidance on how to setup the DNS server list properly on Windows 2008 R2 DC/DNS servers?  I have seen some other discussions
    that talk about the pros and cons of using another DC/DNS as the Primary.  MS should have clear guidance on this somewhere.

    Actually, my suggestion, which seems to be the mostly agreed method, is:
    Primary DNS:  Locally assigned IP of the DC (i.e. 192.168.1.5)
    Secondary DNS: The assigned IP of another DC (i.e. 192.168.1.6)
    Tertiary DNS:  empty
    The tertiary more than likely won't be hit, (besides it being superfluous and the list will reset back to the first one) due to the client side resolver algorithm time out process, as I mentioned earlier. Here's a full explanation on how
    it works and why:
    This article discusses:
    WINS NetBIOS, Browser Service, Disabling NetBIOS, & Direct Hosted SMB (DirectSMB).
    The DNS Client Side Resolver algorithm.
    If one DC or DNS goes down, does a client logon to another DC?
    DNS Forwarders Algorithm and multiple DNS addresses (if you've configured more than one forwarders)
    Client side resolution process chart
    http://msmvps.com/blogs/acefekay/archive/2009/11/29/dns-wins-netbios-amp-the-client-side-resolver-browser-service-disabling-netbios-direct-hosted-smb-directsmb-if-one-dc-is-down-does-a-client-
    logon-to-another-dc-and-dns-forwarders-algorithm.aspx
    DNS
    Client side resolver service
    http://technet.microsoft.com/en-us/library/cc779517.aspx 
    The DNS Client Service Does Not Revert to Using the First Server in the List in Windows XP
    http://support.microsoft.com/kb/320760
    Ace Fekay
    MVP, MCT, MCITP EA, MCTS Windows 2008 & Exchange 2007 & Exchange 2010, Exchange 2010 Enterprise Administrator, MCSE & MCSA 2003/2000, MCSA Messaging 2003
    Microsoft Certified Trainer
    Microsoft MVP - Directory Services
    Complete List of Technical Blogs: http://www.delawarecountycomputerconsulting.com/technicalblogs.php
    This posting is provided AS-IS with no warranties or guarantees and confers no rights.
    I agree with this proposed solution as well:
    Primary DNS:  Locally assigned IP of the DC (i.e. 192.168.1.5)
    Secondary DNS: The assigned IP of another DC (i.e. 192.168.1.6)
    Tertiary DNS:  empty
    One thing to note, in this configuration the Best Practice Analyzer will throw the error:
    The network adapter Local Area Connection 2 does not list the loopback IP address as a DNS server, or it is configured as the first entry.
    Even if you add the loopback address as a Tertiary DNS address the error will still appear. The only way I've seen this error eliminated is to add the loopback address as the second entry in DNS, so:
    Primary DNS:  The assigned IP of another DC (i.e. 192.168.1.6)
    Secondary DNS: 127.0.0.1
    Tertiary DNS:  empty
    I'm not comfortable not having the local DC/DNS address listed so I'm going with the solution Ace offers.
    Opinion?

  • Can v use the same Client for setting the ALE ??

    Can i use the same client like 080 for my ALE configuaration ?

    Configuring is a Cross-Client(Client Independent) activity.
    Check whether you have necessary access/authorizations to Configure.
    This should be always done in Development client.
    Hope this helps.
    Regards
    Vinayak

Maybe you are looking for