Default drawing aids

Hi!
Is there a way to define default drawing aids? For example, I would like a form to show a specific grid, with "snap to grid activated" and "snap to center of page" deactivated directly after it is created, without having to define that grid for that form. The reason is the sheer number of forms I'm dealing with (many fragments), and for each one I've got to define the grid from the beginning.
The other problem is that Livecycle Designer always seems to activate "snap to center of page" again some time after i deactivated it. This seems to happen when editing another document (without closing the current window) or when scrolling to annother page, or... I get it all the time. How do I prevent that?
Regards,
Jost

Hi radzmar,
my problem is not to find the drawing aids dialog. It is to define default values for the drawing aids. For example: If I create a new document, I want the horizontal grid resolution to be 16/in, the vertical grid resolution to be 32/in, and "snap to grid" should be activated, all other "snap to"s deactivated. But in a new document, resolutions are both set to either 4/in or 8/in, "snap to grid" is deactivated, and "snap to center of page" is activated.
And since I've got lots of fragments, and a separate document for each, this really annoys me.
Greetings,
Jost

Similar Messages

  • Drawing Aids palette

    I would like to change the grid size on my drawing page. According to the help, I need to use the Drawing Aids palette. I'm supposed to be able to display it by double-clicking on the rules, but nothing displays.
    What does the palette look like? And how else can you display it?
    Cindy

    Here is a screenshot. It is usually anchored on the bottom left of the screen
    Paul

  • Drawing Aids: Gudline Sets

    in the Drawing Aids window you can choose some Guideline sets (e.g. US Letter, Us-Legal).
    How can I create own Guideline sets.
    Thank You for your help.
    Walter

    Hi Paul,
    Thank you for your response.
    So I can stop to search.
    Walter

  • Change default drawing markup color to black

    hi,
    I would like to change the default color of the drawing markups in adobe acrobat X pro from red to black.
    Can you help me ?
    thx

    Right-click on tool, choose 'Tool Default Propeties', now changed color will be default color.

  • Intermittant dialog draw proc CRASH

    Hi,
    I am developing Illustrator CS2 plugin for Mac using Xcode 1.5/OS 10.3.9. I have intermittant problem with display of certain dialog. I have overridden dialog's draw procedure with my own, which calls default draw and then adds some additional text and icon.
    Usually it dislays fine.
    Sometimes however, it starts to draw my text and then I get bad crash out of Illustrator. Some of crash log is below. Perhaps it is recursivly calling my display proc?
    Tried debugging. I put breakpoint in my draw proc. First time it is hit, nothing shows up in Illustrator. After continue, dialog pops up and breakpoint is hit again (why?). Continue again, and back in Illustrator we can hit OK to dismiss dialog. Now breakpoint is hit a third time, after continue all is normal.
    HELP please!
    Chunky
    Exception: EXC_BAD_ACCESS (0x0001)
    Codes: KERN_INVALID_ADDRESS (0x0001) at 0xbf7ffaf0
    Thread 0:
    0 com.apple.CoreGraphics 0x936ade74 aa_moveto + 0xc
    1 com.apple.CoreGraphics 0x936928f8 CGPathApply + 0x224
    2 libRIP.A.dylib 0x9073bac8 ripr_Path + 0x538
    3 libRIP.A.dylib 0x907352dc ripc_GetClippingState + 0x5b8
    4 libRIP.A.dylib 0x907377a8 ripc_GetRenderingState + 0x2c
    5 libRIP.A.dylib 0x9073632c ripc_DrawGlyphs + 0x98
    6 com.apple.CoreGraphics 0x936aa270 drawGlyphs + 0x94
    7 com.apple.CoreGraphics 0x936ab4e0 CGContextShowGlyphsWithAdvances + 0xd0
    8 com.apple.QD 0x951d6ccc RenderGlyphRecordArrayWithCG + 0x650
    9 com.apple.QD 0x951d3500 ATSUDrawGlyphs(ATSGlyphVector*, unsigned long, unsigned long, FixedPoint*, CGContext*) + 0x58
    10 com.apple.QD 0x951d347c TTextLineLayout::DrawText(unsigned long, unsigned long, long, long) + 0x298
    11 com.apple.QD 0x951d31b8 ATSUDrawText + 0x98
    12 com.apple.HIToolbox 0x9288fbac TATSUTextLayout::DrawBox(_HIThemeTextInfo*, CGRect const&, CGContext*) + 0x278
    13 com.apple.HIToolbox 0x9288fce0 DataEngine::DrawThemeTextBox(__CFString const*, CGRect const*, _HIThemeTextInfo*, CGContext*) + 0xa4
    14 com.apple.HIToolbox 0x92895278 HIThemeDrawTextBox + 0x100
    15 com.apple.HIToolbox 0x928a91c0 _DrawThemeTextBox + 0x22c
    16 com.adobe.coretech.adm 0x0ee2d160 dyld_stub_binding_helper + 0x77e30
    17 com.adobe.coretech.adm 0x0edde400 dyld_stub_binding_helper + 0x290d0
    18 com.mycompany.myplugin 0x12516b10 MyDlgDrawProc(_Opaque_ADMDialog*, _Opaque_ADMDrawer*) + 0xd0
    19 com.adobe.coretech.adm 0x0edc915c dyld_stub_binding_helper + 0x13e2c
    20 com.adobe.coretech.adm 0x0ee27ed8 dyld_stub_binding_helper + 0x72ba8
    21 com.adobe.coretech.adm 0x0ee2a454 dyld_stub_binding_helper + 0x75124
    22 com.adobe.coretech.adm 0x0ee2ae4c dyld_stub_binding_helper + 0x75b1c
    23 com.adobe.coretech.adm 0x0ee2af7c dyld_stub_binding_helper + 0x75c4c
    24 com.adobe.coretech.adm 0x0ee2fc08 dyld_stub_binding_helper + 0x7a8d8
    25 com.adobe.coretech.adm 0x0edb9248 dyld_stub_binding_helper + 0x3f18
    26 com.adobe.coretech.adm 0x0ee003c8 dyld_stub_binding_helper + 0x4b098
    27 com.mycompany.myplugin 0x12516c50 MyDlgDrawProc(_Opaque_ADMDialog*, _Opaque_ADMDrawer*) + 0x210
    28 com.adobe.coretech.adm 0x0edc915c dyld_stub_binding_helper + 0x13e2c
    29 com.adobe.coretech.adm 0x0ee27ed8 dyld_stub_binding_helper + 0x72ba8
    30 com.adobe.coretech.adm 0x0ee2a454 dyld_stub_binding_helper + 0x75124
    31 com.adobe.coretech.adm 0x0ee2ae4c dyld_stub_binding_helper + 0x75b1c
    32 com.adobe.coretech.adm 0x0ee2af7c dyld_stub_binding_helper + 0x75c4c
    33 com.adobe.coretech.adm 0x0ee2fc08 dyld_stub_binding_helper + 0x7a8d8
    34 com.adobe.coretech.adm 0x0edb9248 dyld_stub_binding_helper + 0x3f18
    35 com.adobe.coretech.adm

    Rest of crash log which got cut off:
    36 com.mycompany.myplugin 0x12516c50 MyDlgDrawProc(_Opaque_ADMDialog*, _Opaque_ADMDrawer*) + 0x210
    37 com.adobe.coretech.adm 0x0edc915c dyld_stub_binding_helper + 0x13e2c
    38 com.adobe.coretech.adm 0x0ee27ed8 dyld_stub_binding_helper + 0x72ba8
    (many lines deleted)
    503 com.adobe.coretech.adm 0x0ee003c8 dyld_stub_binding_helper + 0x4b098
    504 com.mycompany.myplugin 0x12516c50 MyDlgDrawProc(_Opaque_ADMDialog*, _Opaque_ADMDrawer*) + 0x210
    505 com.adobe.coretech.adm 0x0edc915c dyld_stub_binding_helper + 0x13e2c
    506 com.adobe.coretech.adm 0x0ee27ed8 dyld_stub_binding_helper + 0x72ba8
    507 com.adobe.coretech.adm 0x0ee2a454 dyld_stub_binding_helper + 0x75124
    508 com.adobe.coretech.adm 0x0ee2ae4c dyld_stub_binding_helper + 0x75b1c
    Thread 1 Crashed:
    0 ...ple.CoreServices.CarbonCore 0x947d668c _XHNDL_fullinfo_init + 0x14
    1 ...ple.CoreServices.CarbonCore 0x947d6788 _XHNDL_exception_setup_dispatch + 0x30
    2 ...ple.CoreServices.CarbonCore 0x947d6948 _XHNDL_server_handler + 0x108
    3 ...ple.CoreServices.CarbonCore 0x947d5988 TS_exception_listener_thread + 0xbc
    4 libSystem.B.dylib 0x92516990 _pthread_body + 0x28

  • Reg: Layout size & position

    Dear All,
    iam very new to development of Adobe PDF forms
    i had encountered with one issue while setting the size of master page in CM by default its resetting it to INCHES
    give me proper input to change from INCHES to CM
    Highly Appreciated
    Regards
    Jaipal.E

    Hi,
    Go to Palletes in Menu bar.. Choose Drawing aids.. there from Grid and Ruler Settings.. Choose 'CM'
    Thanks,
    Rakesh

  • Moving an object using arrow keys

    I think I changed  the default distance to move an object using the arrow keys from 1 Point (1/72 of an inch). Can someone help me with changing it back to the default or tell me how to adjust the distance you can move an object like a text field using the arrow keys. Thank you.

    It's based on your grid Interval setting on the Drawing Aids palette. For a 1 point grid you would need an Interval of 12/pc (although it says points the grid measurement is picas, 12 points to the pica).
    I find 1 point too fine, I use a grid of 4/pc (3 points) and have all my object measurements base around multiples of 3.

  • How do I free up the Guidelines?

    Hello,
    I am designing a new form, and as I was fooling with the measurements for the guidelines in the Drawing Aids palette, I now cannot move any of them, whether they be vertical or horizontal.  My reasoning for trying to adjust the measurement was due to the need to have the guides move a shorter distance on the ruler so I could make my design work.  So I typed in measurements, and once I did, the guidelines froze up.  What did I do wrong here?  And how do I get this back to default?  Thanks guys.

    I am sorry to seem so naive to this software, I am!  I had the (snap to grid) box checked.  Do I get credit for answering my own question?

  • Adobe Certified Expert:LiveCycle ES2 Form Developer Exam

    Hi All,
    I would like to know whether the following certification is still available for enrollment?
    "Adobe Certified Expert:LiveCycle ES2 Form Developer Exam"
    If Yes, please share your experience in case if you had completed the above certification.
    Thanks,
    VJ

    This is the info that i got through some source:
      If you have been exposed to LiveCycle Designer for at least one year and have hands on development experience, it is likely that you will able to pass the Form Developer exam with only a review of the preparation guide and the associated product documentation related to each of the topics. However, if you are new to LiveCycle Designer, you should plan on several months of use before being prepared to pass this certification.
    Exam TopicsFollowing is a detailed outline of the information covered on the exam.Understanding template types
    • Given an output file type in LiveCycle Designer, describe the differences between those output types (Output types include: XDP, static PDF, dynamic PDF, TDS)
    • Given a form type, describe the characteristics of the form type (Form types include: static, dynamic, print, interactive, Acroform, artwork)
    Working with XFA
    • Describe the XFA object model (Topics include: hierarchy, subform types, referenced objects, variables)
    • Given a DOM, describe the functionality of that DOM (DOMs include: data, form, template, layout)
    • Describe the rendering process of an XDP to a PDF
    Importing other file formats
    • Importing an existing PDF into LiveCycle Designer
    • Given a file format, import that file into LiveCycle Designer (File formats include: .IFD, .DOC, .XSN, .XFT)
    Working with Master pages and page flows
    • Explain the purpose of Master pages
    • Given a Master page property, describe the functionality of the property (Properties include: orientation, paper type, page occurrence)
    • Explain the purpose of the Content area
    • Controlling pagination on a form
    • Creating page sets and page set properties
    Working with data connections
    • Given a data connection, describe that data connection (Data connection types include: schema, XML sample file, WSDL, Adobe Data Model)
    • Binding objects to data sources. (methods include: import and export binding, data binding, best practices for binding, relative vs. explicit binding)
    Laying out a form
    • Given a layout tool, explain the purpose of that layout too. (layout tools include: Justification, Alignment, Distribute, Make Same Size)
    • Given a drawing aid, explain the purpose of that drawing aid (Drawing aids include: Show Grid, Snap to Grid, Show object boundaries, Interval)
    • Given a form, set properties for that form (Properties include: Default, Preview, PDF Security, Save options)
    • Create and explain the purpose of custom libraries (Includes: Adding objects to custom libraries)
    • Set the tab order of fields by using the Tab Order tool
    Designing dynamic forms
    • Describe the content flow of a subform (position vs. flowed)
    • Describe the relationship between parent subforms and child subforms (position vs. flowed)
    • Given a page overflow condition, explain how you would handle that condition
    • Programmatically control repeating elements of a dynamic form by using the instanceManager
    • Control properties of a subform programmatically and via the UI (includes: min count, max count, initial count, repeat subform, expand to fit)
    • Create and use subform sets
    Adding form intelligence
    • Generating scripts by using Action Builder
    • Set validation patterns on a field (Patterns include: display, edit, validation, data)
    Scripting
    • Given a property in the Script Editor, explain the purpose of that property (properties include: language, run at, show, enable event propagation)
    • Given a form property, explain the purpose of that property (properties include: preserve scripting changes to form when saved, preview options, variables, form validation, enforce strict scoping rules in JavaScript)
    • Given a form, locate a script
    • Understand the SOM expressions within LiveCycle Designer
    • Debugging scripts (Includes: activating the JavaScript console, writing to the console, interpreting a message from the console, using the Report palette, syntax checker)
    • Interacting with a DOM
    Submitting data
    • Understand the data submission options (Options include: submit to URL, submit as, signed submission, include)
    • Submitting a form via email (Options include: using mailDoc, using mailto, using an email submit button)
    • Acknowledge a response from a data submission
    Designing with fragments
    • Creating a fragment (includes: in place vs. convert to embedded object)
    • Given a fragment library property, explain the purpose of that property (properties include: show fragment preview, fragment info, fragment library location)
    • Optimize binding in a fragment (Absolute vs. relative)
    • Rendering a fragment within a form
    Integrating with LiveCycle Server
    • Given an object in the library, explain the purpose of that object (objects include: form bridge, process fields, insertion point)
    • Given a form property, explain how to use that property (properties include: target version, PDF render format, PDF security tab)
    Thanks,
    VJ

  • Moving and resizing fields

    Hello,
    1. I want to make a field just a little bit smaller but when I grab the grab bars and drag to make it smaller it redcues it too much. How do I drag it very, very small amounts? I have looked for help topics on this and there is nothing. I have tried holding down ctrl, alt, and shift when I drag but nothing does it.
    2. How do I get a field to just nudge a little with arrow keys?
    Thank you.

    I use the Layout pallet to position object quite a bit. How ever I do use the arrow keys to nudge objects around the page. You might check and make sure that Snap to grid is unchecked otherwise when you use the arrow keys to move objects they will move in the increment the grid is set to. To set the grid or define grid and ruler settings and guides go to Windows -> Drawing Aids. I think snap to grid is checked by default.

  • Unable to delete applet.....

    Hi all,
    I am unable to delete one applet which I have loaded in the card.
    There are 2 applets, one is purse and other is loyalty. And am using shareable interface in which loyalty is the server and purse is the client. I can delete the purse applet but i can't delete the loyalty from the card.
    Here is my code : There are in all 3 codes, one is purse, second is loyalty code and third is the shareable interface code. Can some one look at the code and tell me what's wrong in this programs.
    package com.gemplus.examples.loyalty;
    import javacard.framework.*;
    import visa.openplatform.*;
    public class Loyalty extends javacard.framework.Applet implements TestInterface
    static byte points ;
    protected Loyalty(byte[] buffer, short offset, byte length)
    // data offset is used for application specific parameter.
    // initialization with default offset (AID offset).
    short dataOffset = offset;
    if(length > 9) {
    // Install parameter detail. Compliant with OP 2.0.1.
    // | size | content
    // |------|---------------------------
    // | 1 | [AID_Length]
    // | 5-16 | [AID_Bytes]
    // | 1 | [Privilege_Length]
    // | 1-n | [Privilege_Bytes] (normally 1Byte)
    // | 1 | [Application_Proprietary_Length]
    // | 0-m | [Application_Proprietary_Bytes]
    // shift to privilege offset
    dataOffset += (short)(1 + buffer[offset]);
    // finally shift to Application specific offset
    dataOffset += (short)(1 + buffer[dataOffset]);
    // checks wrong data length
    if(buffer[dataOffset] != 4)
    // return received proprietary data length in the reason
    ISOException.throwIt((short)(ISO7816.SW_WRONG_LENGTH + offset + length - dataOffset));
    // go to proprietary data
    dataOffset++;
    // points = 0;
    // register this instance
    register(buffer, (short)(offset + 1), (byte)buffer[offset]);
    * Method installing the applet.
    * @param bArray the array constaining installation parameters
    * @param bOffset the starting offset in bArray
    * @param bLength the length in bytes of the data parameter in bArray
    public static void install(byte[] bArray, short bOffset, byte bLength) throws ISOException
    /* applet instance creation */
    new Loyalty (bArray, bOffset, (byte)bLength);
    * Select method returning true if applet selection is supported.
    * @return boolean status of selection.
    public boolean select()
    /* return status of selection */
    return true;
    * Deselect method.
    public void deselect()
    return;
    public void process(APDU apdu) throws ISOException
              // check valid Applet state
    if(OPSystem.getCardContentState() == OPSystem.APPLET_BLOCKED)
              ISOException.throwIt(ISO7816.SW_COMMAND_NOT_ALLOWED);
                   apdu.setIncomingAndReceive();
              byte[] apduBuffer = apdu.getBuffer();
    // writes the balance into the APDU buffer after the APDU command part
              creditPoints((byte)0x00);     
              apduBuffer[5] = (byte)(points >> 8) ;
              apduBuffer[6] = (byte)points ;
    // sends the APDU response
    // switches to output mode
              apdu.setOutgoing() ;
    // 2 bytes to return
              apdu.setOutgoingLength((short)2) ;
    // offset and length of bytes to return in the APDU buffer
              apdu.sendBytes((short)5, (short)2) ;
         public void creditPoints(byte pTobeCredited)
    points += pTobeCredited;
    public Shareable getShareableInterfaceObject(AID client, byte param){
              if(param != (byte)0x00)
                   return null;
         return (this);
    second code is :
    package com.gemplus.examples.oppurse;
    * Imported packages
    import javacard.framework.*;
    import visa.openplatform.*;
    import com.gemplus.examples.loyalty.*;
    public class OPPurse extends javacard.framework.Applet
    // the APDU constants for all the commands.
         private final static byte INS_GET_BALANCE = (byte)0x30 ;
         private final static byte INS_DEBIT      = (byte)0x31 ;
         private final static byte INS_CREDIT      = (byte)0x32 ;
         private final static byte INS_VERIFY_PIN = (byte)0x33 ;
         private final static byte INS_SET_NAME                    = (byte)0x34 ;
         private final static byte INS_GET_NAME                    = (byte)0x35 ;
    // the OP/VOP specific instruction set for mutual authentication
         private final static byte CLA_INIT_UPDATE = (byte)0x80 ;
         private final static byte INS_INIT_UPDATE = (byte)0x50 ;
         private final static byte CLA_EXTERNAL_AUTHENTICATE = (byte)0x84 ;
         private final static byte INS_EXTERNAL_AUTHENTICATE = (byte)0x82 ;
    // the PIN validity flag
    private boolean validPIN = false;
    // SW bytes for PIN Failed condition
         // the last nibble is replaced with the number of remaining tries
         private final static short      SW_PIN_FAILED = (short)0x63C0;
         private final static short SW_FAILED_TO_OBTAIN_SIO = (short)0x63D0;
         private final static short SW_LOYALTY_APP_NOT_EXIST = (short)0x63E0;
    // the illegal amount value for the exceptions.
    private final static short ILLEGAL_AMOUNT = 1;
    // the maximum balance in this purse.
    private static final short maximumBalance = 10000;
    // the current balance in this purse.
    private static short balance;
    /*     byte[] loyaltyAID = new byte[]{ (byte)0xA0,(byte)0x00,(byte)0x00,(byte)0x00,
              (byte)0x19,(byte)0xFF,(byte)0x00,(byte)0x00,
              (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
              (byte)0x00,(byte)0x00,(byte)0x02,(byte)0x02};*/
    /* Security part of declarations */
    // the Security Object necessary to credit the purse
    private ProviderSecurityDomain securityObject = null;
    // the security channel number
    byte secureChannel = (byte)0xFF;
    // the authentication status
    private boolean authenticationDone = false;
    // the secure channel status
    private boolean channelOpened = false;
         private byte[] nameBuffer = new byte[6];
    * Only this class's install method should create the applet object.
    protected OPPurse(byte[] buffer, short offset, byte length)
    // data offset is used for application specific parameter.
    // initialization with default offset (AID offset).
    short dataOffset = offset;
    if(length > 9) {
    // Install parameter detail. Compliant with OP 2.0.1.
    // | size | content
    // |------|---------------------------
    // | 1 | [AID_Length]
    // | 5-16 | [AID_Bytes]
    // | 1 | [Privilege_Length]
    // | 1-n | [Privilege_Bytes] (normally 1Byte)
    // | 1 | [Application_Proprietary_Length]
    // | 0-m | [Application_Proprietary_Bytes]
    // shift to privilege offset
    dataOffset += (short)( 1 + buffer[offset]);
    // finally shift to Application specific offset
    dataOffset += (short)( 1 + buffer[dataOffset]);
    // checks wrong data length
    if(buffer[dataOffset] != 2)
    // return received proprietary data length in the reason
    ISOException.throwIt((short)(ISO7816.SW_WRONG_LENGTH + offset + length - dataOffset));
    // go to proprietary data
    dataOffset++;
    } else {
    // Install parameter compliant with OP 2.0.
    if(length != 2)
    ISOException.throwIt((short)(ISO7816.SW_WRONG_LENGTH + length));
              // retreive the balance value from the APDU buffer
    short value = (short)(((buffer[(short)(dataOffset + 1)]) & 0xFF)
              | ((buffer[dataOffset] & 0xFF) << 8));
    // checks initial balance value
    if(value > maximumBalance)
    ISOException.throwIt(ISO7816.SW_DATA_INVALID);
              // initializes the balance with the APDU buffer contents
    balance = value;
    // register this instance as an installed Applet
    register();
    // ask the system for the Security Object associated to the Applet
    securityObject = OPSystem.getSecurityDomain();
    // applet is personalized and its state can change
    OPSystem.setCardContentState(OPSystem.APPLET_PERSONALIZED);
    // build the new ATR historical bytes
    byte[] newATRHistory = new byte[]
    // put "OPPurse" in historical bytes.
    (byte)0x4F, (byte)0x50, (byte)0x50, (byte)0x75, (byte)0x72, (byte)0x73, (byte)0x65
    // !!! ACTIVATED IF INSTALL PRIVILEGE IS "Default Selected" (0x04). !!!
    // change the default ATR to a personalized's one
    OPSystem.setATRHistBytes(newATRHistory, (short)0, (byte)newATRHistory.length);
    * Method installing the applet.
    * @param installparam the array constaining installation parameters
    * @param offset the starting offset in installparam
    * @param length the length in bytes of the data parameter in installparam
    public static void install(byte[] installparam, short offset, byte length )
    throws ISOException
    // applet instance creation with the initial balance
    new OPPurse(installparam, offset, length );
    * Select method returning true if applet selection is supported.
    * @return boolean status of selection.
    public boolean select()
    validPIN = false;
    // reset security if used.
    // In case of reset deselect is not called
    reset_security();
    // return status of selection
    return true;
    * Deselect method.
    public void deselect()
    // reset security if used.
    reset_security();
    return;
    * Method processing an incoming APDU.
    * @see APDU
    * @param apdu the incoming APDU
    * @exception ISOException with the response bytes defined by ISO 7816-4
    public void process(APDU apdu) throws ISOException
    // get the APDU buffer
    // the APDU data is available in 'apduBuffer'
    byte[] apduBuffer = apdu.getBuffer();
    // the "try" is mandatory because the debit method
    // can throw a javacard.framework.UserException
    try
         switch(apduBuffer[ISO7816.OFFSET_INS])
    case INS_VERIFY_PIN :
         verifyPIN(apdu);
    break ;
    case INS_GET_BALANCE :
         getBalance(apdu) ;
    break ;
    case INS_DEBIT :
         debit(apdu) ;
    break ;
                        case INS_SET_NAME :
                             setName(apdu);
                        break;
                        case INS_GET_NAME :
                             getName(apdu);
                        break ;
    case INS_CREDIT :
         credit(apdu) ;
    break ;
    case INS_INIT_UPDATE :
    if(apduBuffer[ISO7816.OFFSET_CLA] == CLA_INIT_UPDATE)
    // call initialize/update security method
         init_update(apdu) ;
    else
    // wrong CLA received
    ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
    break ;
    case INS_EXTERNAL_AUTHENTICATE :
    if(apduBuffer[ISO7816.OFFSET_CLA] == CLA_EXTERNAL_AUTHENTICATE)
    // call external/authenticate security method
         external_authenticate(apdu) ;
    else
    // wrong CLA received
    ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
    break ;
    case ISO7816.INS_SELECT :
    break ;
    default :
    // The INS code is not supported by the dispatcher
         ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED) ;
    break ;
         }     // end of the switch
    } // end of the try
              catch(UserException e)
    // translates the UserException in an ISOException.
              if(e.getReason() == ILLEGAL_AMOUNT)
    throw new ISOException ( ISO7816.SW_DATA_INVALID ) ;
    //- P R I V A T E M E T H O D S -
         * Handles Verify Pin APDU.
         * @param apdu APDU object
         private void verifyPIN(APDU apdu)
    // get APDU data
              apdu.setIncomingAndReceive();
    // get APDU buffer
    byte[] apduBuffer = apdu.getBuffer();
    // check that the PIN is not blocked
    if(OPSystem.getTriesRemaining() == 0)
    OPSystem.setCardContentState(OPSystem.APPLET_BLOCKED);
    // Pin format for OP specification
    // |type(2),length|nible(1),nible(2)|nible(3),nible(4)|...|nible(n-1),nible(n)|
    // get Pin length
    byte length = (byte)(apduBuffer[ISO7816.OFFSET_LC] & 0x0F);
    // pad the PIN ASCII value
    for(byte i=length; i<0x0E; i++)
    // only low nibble of padding is used
    apduBuffer[ISO7816.OFFSET_CDATA + i] = 0x3F;
    // fill header TAG
    apduBuffer[0] = (byte)((0x02 << 4) | length);
    // parse ASCII Pin code
    for(byte i=0; i<0x0E; i++)
    // fill bytes with ASCII Pin nibbles
    if((i & 0x01) == 0)
    // high nibble
    apduBuffer[(i >> 1)+1] = (byte)((apduBuffer[ISO7816.OFFSET_CDATA + i] & 0x0F) << 4);
    else
    // low nibble
    apduBuffer[(i >> 1)+1] |= (byte)(apduBuffer[ISO7816.OFFSET_CDATA + i] & 0x0F);
    // verify the received PIN
    // !!! WARNING PIN HAS TO BE INITIALIZED BEFORE USE !!!
    if(OPSystem.verifyPin(apdu, (byte)0))
    // set PIN validity flag
    validPIN = true;
    // if applet state is BLOCKED then restore previous state (PERSONALIZED)
    if(OPSystem.getCardContentState() == OPSystem.APPLET_BLOCKED)
    OPSystem.setCardContentState(OPSystem.APPLET_PERSONALIZED);
    return;
         // the last nibble of returned code is the number of remaining tries
              ISOException.throwIt((short)(SW_PIN_FAILED + OPSystem.getTriesRemaining()));
    * Performs the "getBalance" operation on this counter.
    * @param apdu The APDU to process.
    private void getBalance( APDU apdu )
    // check valid Applet state
    if(OPSystem.getCardContentState() == OPSystem.APPLET_BLOCKED)
                   ISOException.throwIt(ISO7816.SW_COMMAND_NOT_ALLOWED);
    // get the APDU buffer
    byte[] apduBuffer = apdu.getBuffer();
    // writes the balance into the APDU buffer after the APDU command part
              apduBuffer[5] = (byte)(balance >> 8) ;
              apduBuffer[6] = (byte)balance ;
    // sends the APDU response
    // switches to output mode
              apdu.setOutgoing() ;
    // 2 bytes to return
              apdu.setOutgoingLength((short)2) ;
    // offset and length of bytes to return in the APDU buffer
              apdu.sendBytes((short)5, (short)2) ;
         private void setName(APDU apdu)
              // check valid Applet state
    if(OPSystem.getCardContentState() == OPSystem.APPLET_BLOCKED)
                   ISOException.throwIt(ISO7816.SW_COMMAND_NOT_ALLOWED);
              // the operation is allowed only if master pin is validated
         if(!validPIN)
    ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
              byte[] apduBuffer = apdu.getBuffer();
              apdu.setIncomingAndReceive();     
              for(short i=0,k=5;i<6;i++,k++)
                   nameBuffer[i] = apduBuffer[k];
         }//end of setName
         private void getName(APDU apdu)
              // check valid Applet state
    if(OPSystem.getCardContentState() == OPSystem.APPLET_BLOCKED)
                   ISOException.throwIt(ISO7816.SW_COMMAND_NOT_ALLOWED);
                   byte[] apduBuffer = apdu.getBuffer();
                   for(short i=5, k=0;i<11;i++,k++)
                        apduBuffer=nameBuffer[k];
                   apdu.setOutgoing();
                   apdu.setOutgoingLength((short)6);
                   apdu.sendBytes((short)5,(short)6);
         }//end of storeName
    * Performs the "debit" operation on this counter.
    * @param apdu The APDU to process.
    * @exception ISOException If the APDU is invalid.
    * @exception UserException If the amount to debit is invalid.
    private void debit(APDU apdu) throws ISOException, UserException
    // check valid Applet state
    if(OPSystem.getCardContentState() == OPSystem.APPLET_BLOCKED)
                   ISOException.throwIt(ISO7816.SW_COMMAND_NOT_ALLOWED);
    // the operation is allowed only if master pin is validated
         if(!validPIN)
    ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
    // get the APDU buffer
    byte[] apduBuffer = apdu.getBuffer();
         // Gets the length of bytes to recieved from the terminal and receives them
    // If does not receive 4 bytes throws an ISO.SW_WRONG_LENGTH exception
              if(apduBuffer[4] != 2 || apdu.setIncomingAndReceive() != 2)
              ISOException.throwIt(ISO7816.SW_WRONG_LENGTH) ;
              // Reads the debit amount from the APDU buffer
    // Starts at offset 5 in the APDU buffer since the 5 first bytes
    // are used by the APDU command part
              short amount = (short)(((apduBuffer[6]) & (short)0x000000FF)
    | ((apduBuffer[5] << 8 ) & (short)0x0000FF00));
    // tests if the debit is valid
    if((balance >= amount) && (amount > 0))
    // does the debit operation
    balance -= amount ;
    // writes the new balance into the APDU buffer
    // (writes after the debit amount in the APDU buffer)
    apduBuffer[7] = (byte)(balance >> 8) ;
    apduBuffer[8] = (byte)balance ;
    // sends the APDU response
    apdu.setOutgoing() ; // Switches to output mode
    apdu.setOutgoingLength((short)2) ; // 2 bytes to return
    // offset and length of bytes to return in the APDU buffer
    apdu.sendBytes((short)7, (short)2) ;
              /*short points = 10;
    AID loyaltyID = JCSystem.lookupAID(loyaltyAID, (short)0, (byte)loyaltyAID.length);
              if(loyaltyID == null)
                   ISOException.throwIt((short)(SW_LOYALTY_APP_NOT_EXIST));
              TestInterface sio = (TestInterface)(JCSystem.getAppletShareableInterfaceObject(loyaltyID, (byte)0x00));
              if(sio == null)
                   ISOException.throwIt((short)(SW_FAILED_TO_OBTAIN_SIO));
              sio.creditPoints(points);*/
    else
    // throw a UserException with illegal amount as reason
    throw new UserException(ILLEGAL_AMOUNT) ;
    /* byte points = (byte)0x0A;
              //short points = 10;
    AID loyaltyID = JCSystem.lookupAID(loyaltyAID, (short)0, (byte)loyaltyAID.length);
              if(loyaltyID == null)
                   ISOException.throwIt((short)(SW_LOYALTY_APP_NOT_EXIST));
              TestInterface sio = (TestInterface)JCSystem.getAppletShareableInterfaceObject(loyaltyID, (byte)0x00);
              if(sio == null)
                   ISOException.throwIt((short)(SW_FAILED_TO_OBTAIN_SIO));
              sio.creditPoints(points);*/
    * Performs the "credit" operation on this counter. The operation is allowed only
    * if master pin is validated
    * @param apdu The APDU to process.
    * @exception ISOException If the APDU is invalid or if the amount to credit
    * is invalid.
    private void credit(APDU apdu) throws ISOException
    // check valid Applet state
    if(OPSystem.getCardContentState() == OPSystem.APPLET_BLOCKED)
                   ISOException.throwIt(ISO7816.SW_COMMAND_NOT_ALLOWED);
    // the operation is allowed only if master pin is validated and authentication is done
         if (!validPIN || !authenticationDone)
    ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
    // get the APDU buffer
    byte[] apduBuffer = apdu.getBuffer();
              // gets the length of bytes to recieved from the terminal and receives them
    // if does not receive 2 bytes throws an ISO.SW_WRONG_LENGTH exception
              if(apduBuffer[4] != 2 || apdu.setIncomingAndReceive() != 2)
    throw new ISOException(ISO7816.SW_WRONG_LENGTH) ;
              // reads the credit amount from the APDU buffer
    // starts at offset 5 in the APDU buffer since the 5 first bytes
    // are used by the APDU command part
              short amount = (short)(((apduBuffer[6]) & (short)0x000000FF)
    | ((apduBuffer[5] << 8) & (short)0x0000FF00));
    // tests if the credit is valid
    if(((short)(balance + amount) > maximumBalance) || (amount <= (short)0))
    throw new ISOException(ISO7816.SW_DATA_INVALID) ;
    else
    // does the credit operation
    balance += amount ;
    * Performs the "init_update" security operation.
    * @param apdu The APDU to process.
    private void init_update( APDU apdu )
    // receives data
    apdu.setIncomingAndReceive();
    // checks for existing active secure channel
    if(channelOpened)
    // close the openned security channel
    try
    securityObject.closeSecureChannel(secureChannel);
    catch(CardRuntimeException cre2)
    // channel number is invalid. this case is ignored
    // set the channel flag to close
    channelOpened = false;
    try
    // open a new security channel
    secureChannel = securityObject.openSecureChannel(apdu);
    // set the channel flag to open
    channelOpened = true;
    // get expected length
    short expected = apdu.setOutgoing();
    // send authentication result
    // expected length forced to 0x1C
    apdu.setOutgoingLength((byte)0x1C);
    apdu.sendBytes(ISO7816.OFFSET_CDATA, (byte)0x1c);
    catch(CardRuntimeException cre)
    // no available channel or APDU is invalid
    ISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);
    * Performs the "external_authenticate" security operation.
    * @param apdu The APDU to process.
    private void external_authenticate( APDU apdu )
    // receives data
    apdu.setIncomingAndReceive();
    // checks for existing active secure channel
    if(channelOpened)
    try
    // try to authenticate the client
    securityObject.verifyExternalAuthenticate(secureChannel, apdu);
    // authentication succeed
    authenticationDone = true;
    catch(CardRuntimeException cre)
    // authentication fails
    // set authentication flag to fails
    authenticationDone = false;
    // close the openned security channel
    try {
    securityObject.closeSecureChannel(secureChannel);
    } catch(CardRuntimeException cre2) {
    // channel number is invalid. this case is ignored
    // set the channel flag to close
    channelOpened = false;
    // send authentication result
    ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
    // send authentication result
    ISOException.throwIt(ISO7816.SW_NO_ERROR);
    else
    ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
    * The "reset_security" method close an opened secure channel if exist.
    * @return void.
    public void reset_security()
    // close the secure channel if openned.
    if(secureChannel != (byte)0xFF)
    try
    // close the openned security channel
    securityObject.closeSecureChannel(secureChannel);
    catch(CardRuntimeException cre2)
    // channel number is invalid. this case is ignored
    // reset security parameters
    secureChannel = (byte)0xFF;
    channelOpened = false;
    authenticationDone = false;
    return;
    and the 3rd code is:
    package com.gemplus.examples.loyalty;
    import javacard.framework.Shareable;
    public interface TestInterface extends Shareable
    // public void creditPoints(byte points) ;
              public void creditPoints(byte points) ;
    Thanks in advance......

    Thanks. I know they are not the same thing. A package cannot be deleted if it contains one or more applets.
    I tried to delete by typing in the applet AID first, but it just doesn't work. And of course it doesn't work for package AID.
    Both the package and applet AID are generated in JBuilder, which looks like this, package AID(6D 79 70 61 63 6B 61 67 31),
    applet AID(6D 79 70 61 63 30 30 30 31),
    instance AID(6D 79 70 61 63 30 30 30 31)
    I've tried those three AIDs, it's not working.
    Thanks.

  • Unable to print through Java program

    Hi all,
    I have downloaded a sample java code to print text. When i try to print on solaris, it displays some postscript characters like:
    %! PS-Adobe-3.0%%BeginProlog/imStr 0 def /heximageSrc....
    But i am able to print the same information through lp command correctly.
    I am using EPSON - LP8200. As per my knowledge, this printer doesn't support postscript printing
    The sample java code works perfectly on Win2k connected to the same printer.
    Please help me out. I am stuckup in this problem for quite a few days
    Below is the code that i am using
    // This example is from the book Java AWT Reference by John Zukowski.
    // Written by John Zukowski. Copyright (c) 1997 O'Reilly & Associates.
    // You may study, use, modify, and distribute this example for any purpose.
    // This example is provided WITHOUT WARRANTY either expressed or
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import java.awt.print.*;
    public class TestPrintEx extends Frame implements Printable {
    TextArea textArea;
    Label statusInfo;
    Button loadButton, printButton, closeButton;
    Properties p = new Properties();
    Vector pages = new Vector();
    static boolean bFirstTime = false;
    public TestPrintEx() {
    super ("File Loader");
    add (statusInfo = new Label(), "North");
    Panel p = new Panel ();
    p.add (loadButton = new Button ("Load"));
    loadButton.addActionListener( new LoadFileCommand() );
    p.add (printButton = new Button ("Print"));
    printButton.addActionListener( new PrintCommand() );
    p.add (closeButton = new Button ("Close"));
    closeButton.addActionListener( new CloseCommand() );
    add (p, "South");
    add (textArea = new TextArea (10, 40), "Center");
    pack();
    public static void main (String args[]) {
    TestPrintEx f = new TestPrintEx();
    f.show();
    // Bail Out
    class CloseCommand implements ActionListener {
    public void actionPerformed (ActionEvent e) {
    System.exit (0);
    // Load a file into the text area.
    class LoadFileCommand implements ActionListener {
    public void actionPerformed (ActionEvent e) {
    int state;
    String msg;
    FileDialog file = new FileDialog (TestPrintEx.this, "Load File", FileDialog.LOAD);
    file.setFile ("*.java"); // Set initial filename filter
    file.show(); // Blocks
    String curFile;
    if ((curFile = file.getFile()) != null) {
    String filename = file.getDirectory() + curFile;
    char[] data;
    setCursor (Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    File f = new File (filename);
    try {
    FileReader fin = new FileReader (f);
    int filesize = (int)f.length();
    data = new char[filesize];
    fin.read (data, 0, filesize);
    } catch (FileNotFoundException exc) {
    String errorString = "File Not Found: " + filename;
    data = errorString.toCharArray ();
    } catch (IOException exc) {
    String errorString = "IOException: " + filename;
    data = errorString.toCharArray ();
    statusInfo.setText ("Load: " + filename);
    textArea.setText (new String (data));
         System.out.println("#### " + new String(data));
    setCursor (Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
    // Print a file into the text area.
    class PrintCommand implements ActionListener {
    public void actionPerformed (ActionEvent e) {
         PrinterJob pjob = PrinterJob.getPrinterJob();
         TestPrintEx.bFirstTime = true;
         pjob.setPrintable(TestPrintEx.this);
         try{
         //pjob.print();
         pjob.printDialog();
         catch(PrinterException pe)
              pe.printStackTrace();
         pjob.printDialog();
    class Page
         Vector lines;
         Page()
              lines = new Vector();
         void addLine(String s)
              lines.addElement(s);
         Enumeration getLines()
              return lines.elements();
         void print(Graphics pg, PageFormat pf)
              System.out.println("Printing page now");
              // Note: String is immutable so won't change while printing.
              if (!(pg instanceof PrinterGraphics)) {
              throw new IllegalArgumentException ("Graphics context not PrintGraphics");
              //--- Create the Graphics2D object
              Graphics2D g2d = (Graphics2D) pg;
              //--- Translate the origin to 0,0 for the top left corner
              g2d.translate (pf.getImageableX (), pf.getImageableY ());
              //--- Set the default drawing color to black
              g2d.setPaint (Color.black);
              //--- Draw a border around the page
              Rectangle border = new Rectangle(0,
                             0,
                             (int)(pf.getImageableWidth()),
                             (int)(pf.getImageableHeight()));
              g2d.draw (border);
              int pageHeight = (int)pf.getImageableHeight();
              //Font helv = new Font("Helvetica", Font.PLAIN, 12);
              Font helv = new Font(null, Font.PLAIN, 12);
              //have to set the font to get any output
              g2d.setFont (helv);
              FontMetrics fm = g2d.getFontMetrics(helv);
              int fontHeight = fm.getHeight();
              int fontDescent = fm.getDescent();
              int curHeight = (int)(pf.getImageableY() + 72);
              int size = lines.size();
         for(int i = 0; i < size; i++)
              curHeight += fontHeight;
              if (g2d != null) {
                   g2d.drawString ((String)lines.elementAt(i),
                        (int)(pf.getImageableX () + 72), curHeight - fontDescent);
              } else {
                   System.out.println ("pg null");
              g2d.dispose();
    public int print(Graphics pg, PageFormat pf, int index)
         if(bFirstTime)
              System.out.println("First time - paginating");
              paginate(pg, pf);
              bFirstTime = false;
         System.out.println("No of pages = " + pages.size());
         if(!isValidIndex(index))
              return Printable.NO_SUCH_PAGE;
         ((Page)pages.elementAt(index)).print(pg, pf);
         return Printable.PAGE_EXISTS;
    boolean isValidIndex(int index)
         if(index >= 0 && index < pages.size())
              return true;
         return false;
    void paginate(Graphics pg, PageFormat pf)
         pages.clear();
    // Note: String is immutable so won't change while printing.
    if (!(pg instanceof PrinterGraphics)) {
    throw new IllegalArgumentException ("Graphics context not PrintGraphics");
         //--- Create the Graphics2D object
         Graphics2D g2d = (Graphics2D) pg;
         //--- Translate the origin to 0,0 for the top left corner
         g2d.translate (pf.getImageableX (), pf.getImageableY ());
         String s = textArea.getText();
    StringReader sr = new StringReader (s);
    LineNumberReader lnr = new LineNumberReader (sr);
    String nextLine;
         int pageHeight = (int)pf.getImageableHeight();
    Font helv = new Font(null, Font.PLAIN, 12);
    //have to set the font to get any output
    g2d.setFont (helv);
    FontMetrics fm = g2d.getFontMetrics(helv);
    int fontHeight = fm.getHeight();
    int fontDescent = fm.getDescent();
    int curHeight = (int)(pf.getImageableY() + 72);
         Page page = new Page();
         pages.addElement(page);
    try {
    do {
    nextLine = lnr.readLine();
    if (nextLine != null) {
    if ((curHeight + fontHeight) > pageHeight - 72) {
                   page = new Page();
    pages.addElement(page);
    curHeight = 0;
    curHeight += fontHeight;
    if (g2d != null) {
                   page.addLine(nextLine);
    } else {
    System.out.println ("pg null");
    } while (nextLine != null);
    } catch (EOFException eof) {
    // Fine, ignore
    } catch (Throwable t) { // Anything else
    t.printStackTrace();
    Thanks

    Did you ever find a resolution to this problem.
    I am having the same exact problem?

  • Are there plans to update livecycle designer to conform with the CC Family of Tools?

    I am relatively new to using adobe LiveCycle Designer. I have to say it's a pretty great piece of software.  There are some things in it that really bother me though.
    For example, you can't just drag guides from the rulers. There's no smart guides. The shortcuts that work in every other program don't work for LC.
    The design is 1990 ish and a myriad of other small annoyances. I was just wondering if Adobe has plans to rework LCD to conform to the CC Family Standards.
    Don't get me wrong LiveCycle is the only program in it's class and has been a tremendous help. I just feel it's not up to adobe standards.
    Also, Where's the mac version? I've been having to run ES3 in VMWare due to the fact I only wanted LC Designer and not all the other phooey that comes with it.

    Hi,
    Designer was initially a product from a company named JetForm which was acquired by Adobe in 2002 and its interface hasn't been changed that much by Adobe.
    Here some hints for you:
    If you double click a ruler you'll be able to edit the Drawing Aids.
    You can set snap to grid or to guideline etc.
    In ES3 and newer you also can activate orientation by page center or other objects which is quite similar to the smart guides you may know from InDesign.
    Draging guides from the rulers also works, but only from the upper left corner, not for every ruler separately.
    From the Extras menu you also can create your own shortcuts.
    There has never been a MAC version of Designer and I think there never be one.

  • Extra Pages

    I have a form with 2 master pages. Master page 1 is a title page and Master 2 is used for the remaining 7 pages.
    When I view the form in Design mode or Preview there are an extra 2 pages. Page 3 and 9 are phantom pages - there should only be 8. They are both copies of one of the master pages.
    How can I get rid of them?

    Typically the content on one of the pages is too big to fit on your defined master pages, hence an extra page is created for the overflow. Make sure all objects are within the content area boundries as defined by the master pages. You can turn on Window/Drawing Aids/Show Object Boundaries to get a visual as to the size of each object. If there is anything the is on the page boundry (all sides) then ensure that it is inside of the page.

  • XY Chart - Connecting Points

    Post Author: apskhanna
    CA Forum: Xcelsius and Live Office
    It seems Xcelsius is unable to connect the points drawn using XY chart, unlike in Excel. This is a major limitation and I was wondering if any one knows how to acheive that directly or indirectly. I need to draw lines at an angle using a variable but am unable to because there are no drawing aids or possibilty of connecting points on the xy chart.

    I currently face the same limitation and am really curious about any workarounds to display a trendline connecting the points of an XY Chart.
    Thanks for any kind of help.
    Edited by: Christian Tobias Schieck on Jul 29, 2008 5:13 PM

Maybe you are looking for

  • Render and Replace doesn't open Soundbooth

    Mac / PP CS4 (production  premium) Hi, I have a clip in the timeline and I'm right-clicking, choosing Edit in Adobe Soundbooth > Render and Replace but nothing happens.... Soundbooth doesn't open (at all) with the clip to edit. Any suggestion appreci

  • Problem processing Email attachment when Body text exists

    Using an Email communication channel (POP3) we are successfully processing emails with an attachment of type csv or xml. These attachments are swapped with the Payload message then sent into an IP for processing. The IP splits the inbound message int

  • LMS 3.2: Compliance Mngt: ASA tacacs configuration

    Hi there! I'm stuck (again *sigh*) with CiscoWorks compliance managment. I would like to check our tacacs configuration (ASA): aaa-server TACACS+ (inside) host <server1> timeout 20 key <key> aaa-server TACACS+ (inside) host <server2> timeout 20 key <

  • HP ProBook 4530s, Windows 7 64 bit Blue Screen – Windows will not load

    How do I get Windows to open. I have been having trouble this past week, Windows starts to load (Starting Window), then the blue screen is dsplayed.  Earlier this week I was able to use a restore point in January, and Window opened, but that restore

  • Get-NetworkStatistics returns all the values set to zero despite having internet traffic

    Hi I'm running Windows Server 2012 R2 and I have a problem with the Get-NetworkStatistics cmdlet: it returns all the parameters with a value of zero eventhough the wireless network adapter is up and running, including having internet access. Furtherm