Convert page co-ordinate to page item co-ordinate

Hello All,
I have problem regarding co-ordinate system.
I have Rects in page co-ordinate system  and want to convert with respect to pageItem co-ordinate.
This Rects are resides within a frame, my requirement is to convert pagecoordinateRect to innerRect.
I have tried using TransformParentRectToInner Or TransformPasteboardRectToInner  using IGeometry interface of page item.
Left and Right points are converted but Top and Bottom points are not updated.
Please help me to sort out above problem.
Thanks
Govind

Not sure if this question should be asked in scripting or SDK forum, but this is definitely not the right place. The folks who hang out here don't do much coding.

Similar Messages

  • Convert page coordinate to page item coordinate

    Hello All,
    I have problem regarding co-ordinate system.
    I have Rects in page co-ordinate system  and want to convert with respect to pageItem co-ordinate.
    This Rects are resides within a frame, my requirement is to convert pagecoordinateRect to innerRect.
    I have tried using TransformParentRectToInner Or TransformPasteboardRectToInner  using IGeometry interface of page item.
    Left and Right points are converted but Top and Bottom points are not updated.
    Please help me to sort out above problem.
    Thanks
    Govind

    getUserPoint(int x, int y)
    Gets the user space point corresponding to the mouse click.
    getUserPoint in Java API converts from screen to user space ( lat/lon or whatever coordinate system you are using)

  • Is it possible to place display co-ordinate for page item

    hi,
    In any one of the reagion, if i want to display the label as "Name" in Row Number 15, column no 10 (assuming screen size is 25 rows and 80 characters ) and input column on specified row and column. (here row is vertically numbered and column is horizontally numbered) This will facilitate myself to place any page item in anywhere. Using Ajax, possibility may also be suggested so that i shall try to explore it.
    Help is thanked in advance

    dr.s.raghu,
    You can position elements using absolute positioning but this will not be as easy as it sounds. You may need to create a very specific theme (or at least a few templates) for this.
    Have a look at this:
    http://www.w3schools.com/css/pr_class_position.asp
    Regards,
    Dan
    Blog: http://DanielMcGhan.us/
    Work: http://SkillBuilders.com/apex/

  • Batch convert Pages files to Doc and stay in the same folder?

    Hi there,
    I use iWork '09 on Mountain Lion. I recently switched to Microsoft Word and prefer it over Pages (personal preference). However, I have nearly 1000 files on my computer that are in Pages format. I have extensively searched this issue in the Apple Support Communities and it appears that there are scripts that DO EXIST that batch convert Pages files into Word files. However, it appears that many of these scripts were built for older versions of iWork and therefore I run into various errors. For example, I used the script available at http://pagesfaq.blogspot.com/2008/01/export-folder-to-word-rtf-pdf-txt-or.html and click run but nothing actually happens (the script runs for less than a second, then I can click run again). I was able to use one script successfully (pasted below), but the only reason I can't use it is because it saves ALL my converted documents in one folder on my desktop and I would like a script that can save them in the original file were the Pages document is located.
    So, is there an iWork '09 compatible script that can convert my Pages documents to Word documents and save them in the same folder as the original? Oh, and for an added bonus, it'd be cool if the script also deleted my Pages version after it was done with the conversion
    --[SCRIPT batch_exportPages2DOC] (* Enregistrer ce script en tant que script ou progiciel. Exécuter ce script ou déposer l'icône d'un dossier sur son icône. Il ouvre tout document Pages du dossier et l' enregistre en fichier DOC  dans le dossier "was_Pages_now_DOC". Celui-ci peut être sur le bureau ou dans le dossier "~/Documents". Si le GUIscripting n'est pas activé le script demande votre mot de passe pour l'activer. Le script récupère le dossier d'exportation par défaut dans le fichier de préférences de Pages. Éviter de cliquer durant l'exécution du script sauf évidemment pour sélectionner le dossier source. ************* Save the script as script or application bundle. Run it or drag and drop a folder icon on its icon. It opens every Pages's documents stored in the folder and save it as DOC file in a folder named "was_Pages_now_DOC". This one may be on the desktop or in the "~/Documents" folder. according to the property storeOnDesktop. If GUIscripting is disabled the script ask for your password to enable it. The script extract the default export path from the Pages's preferences file. Don't click when the script is running. Except, of course, to select the source folder. ************* Yvan KOENIG (VALLAURIS, France) 2008/04/20 2009/06/17 adapté pour format .doc 2009/12/13 updated for MacOs 10.6… *) property theApp : "Pages" property theExt : "pages" property nomDuRapport : "report_Pages2DOC.txt" property nom_du_dossier : "was_Pages_now_DOC" property storeOnDesktop : true (* true = dest folder will be on Desktop false = dest folder will be in "~/Documents" *) property msg1 : "" -- globale property msg90 : "" -- globale property msg91 : "" -- globale -- property msg92 : "" -- globale property msg94 : "" -- globale property msg96 : "" -- globale property msg99 : "" -- globale property rapport : "" -- globale property dossierDeStockage : "" -- globale property dossierParDefaut : "" -- globale property localExport : "" -- globale property newExt : "" -- globale property newType : "" -- globale property isOs4 : missing value -- globale property isOs5 : missing value -- globale property theMenu : missing value -- globale property menuExport : missing value -- globale property types : {{"doc", "SLDocumentTypeMSWord", 2}, {"pdf", "SLDocumentTypePDF", 1}, {"txt", "SLDocumentTypePlainText", 4}, {"rtf", "SLDocumentTypeRichText", 3}, {"rtfd", "SLDocumentTypeRichTextBundle"}, 3} --===== (* our settings *) property typeNum : 1 (* 1 = WORD, 2 = PDF, 3 = Txt, 4 = rtf, 5 = rtfd *) property theButton : missing value (* 1          button PDF 2          button Word 3          button RTF 4 button Standard *) --===== on run (* lignes exécutées si on double clique sur l'icône du script application • lines executed if one double click the application script's icon *)             tell application "System Events" to set dossier to choose folder (* dans un bloc System Events pour avoir un titre de dialogue "localisé" • in a System Events block to get a localized dialog title. *)           my commun({dossier})             --          my commun({"Macintosh HD:Users:yvan_koenig:Desktop:for_see:" as alias}) end run --===== on open (sel) (* sel contient une liste d'alias des éléments qu'on a déposés sur l'icône du script (la sélection) • sel contains a list of aliases of the items dropped on the script's icon (the selection) *)           my commun(sel) end open --===== on commun(elems)           my nettoie()           my prepareMessages()             tell application "System Events"                     if not (UI elements enabled) then set (UI elements enabled) to true (* Active le GUI scripting • Enable GUI scripting *)                     set titres to title of processes           end tell -- to System Events             if theApp is not in titres then my activateTheApp() (* Active et ferme la fenêtre du document créé à l'ouverture • Activate and close the doc's window created at opening *)           set {newExt, newType, theButton} to item typeNum of types (* item 1 = {"doc", "SLDocumentTypeMSWord",2} item 2 = {"pdf", "SLDocumentTypePDF",1} item 3 = {"txt", "SLDocumentTypePlainText",4} item 4 = {"rtf", "SLDocumentTypeRichText",3} item 5 = {"rtfd", "SLDocumentTypeRichTextBundle",3} *)           set sysAtt to (system attribute "sys2")           if 4 > sysAtt then                     if my parleAnglais() then                               error "This script requires MacOs X 10.4 or higher !"                     else                               error "Ce script requiert MacOs X 1.4 ou ultérieur !"                     end if           else if 5 > sysAtt then                     set isOs4 to true                     set isOs5 to false                     if my getVersion() < "4" then                               set theMenu to 3                               set menuExport to 13                     else                               set theMenu to 10                               set menuExport to 9                     end if           else if 6 > sysAtt then                     set isOs4 to false                     set isOs5 to true                     if my getVersion() < "4" then                               set theMenu to 3                               set menuExport to 13                     else                               set theMenu to 10                               set menuExport to 8 (* was a wrong 9 *)                     end if           else                     set isOs4 to false                     set isOs5 to false                     if my getVersion() < "4" then                               set theMenu to 3                               set menuExport to 13                     else                               set theMenu to 10                               set menuExport to 8 (* was a wrong 9 *)                     end if           end if           my fermeFenetres() (* • Close existing windows *)             my afficheLeMessage(msg1) (* Éviter de cliquer… • Don't click… *)           tell application theApp to set localExport to localized string "Export"           set dossierParDefaut to my getDefaultExport() as text           set rapport to ""           set dossierDeStockage to my creeDossierDeStockage(nom_du_dossier) (* Unicode text *)             try                     repeat with elem in elems                               try                                         my exploreTraite(elem as alias, "")                               end try                     end repeat                       if rapport = "" then set rapport to msg90                     -- crée un fichier texte sur le Bureau                     set p2d to path to desktop                     set p2r to (p2d as Unicode text) & nomDuRapport                     tell application "System Events"                               if exists (file p2r) then delete (file p2r)                               make new file at end of p2d with properties {name:nomDuRapport}                     end tell                     set rapport to rapport as text                     write rapport to (p2r as alias)             on error MsgErr number NroErr                     if NroErr is not -128 then                               beep 2                               tell application (path to frontmost application as string) to ¬                                         display dialog "" & NroErr & " : " & MsgErr with icon 0 buttons {msg99} giving up after 20                     end if -- NroErr is…                     return           end try             my nettoie()           if my parleAnglais() then                     my afficheLeMessage("Export done.")           else                     my afficheLeMessage("Traitement terminé.")           end if end commun --===== on nettoie() (* pour ne pas stocker dans le fichier script • So it will not be stored in the script file *)           set dossierDeStockage to ""           set dossierParDefaut to ""           set rapport to ""             set localExport to ""           set newExt to ""           set newType to ""           set isOs4 to missing value           set isOs5 to missing value           set theMenu to missing value           set menuExport to missing value           set theButton to missing value           set msg1 to ""           set msg90 to ""           set msg91 to ""           set msg92 to ""           --           set msg94 to ""           set msg96 to ""           set msg99 to " " end nettoie --=====  on afficheLeMessage(m)           beep 1           tell application (path to frontmost application as string)                     activate                     if my parleAnglais() then                               display dialog m buttons {" OK "} default button 1 giving up after 10                     else                               display dialog m buttons {" Vu "} default button 1 giving up after 10                     end if           end tell end afficheLeMessage --===== on creeDossierDeStockage(Nom) (* S'il n'existe pas, construit un dossier destination sur le bureau ou dans "~/Documents" • If does not exist, create a destination folder on the desktop or in "~/Documents" *)           local dd, dds           if storeOnDesktop is true then                     set dd to path to desktop as Unicode text           else                     set dd to path to documents folder as Unicode text           end if             if Nom ends with ":" then                     set dds to dd & Nom           else                     set dds to dd & Nom & ":"           end if           (* dossierDeStockage n'existe pas, on le crée • dossierDeStockage is not available, build it *)           tell application "System Events" to if not (exists item dds) then make new folder at end of folder dd with properties {name:Nom}           return dds as Unicode text end creeDossierDeStockage --===== on exploreTraite(elem, ptree) (* elem est un alias • elem is an alias *)           local elem_, cl_, type_Id           set elem_ to elem as Unicode text           tell application "System Events" to tell disk item elem_                     set cl_ to class                     if cl_ is folder then                               set type_Id to ""                     else                               set type_Id to type identifier                     end if           end tell --  "System Events"           set cl_ to cl_ as Unicode text             if type_Id is in {"com.apple.iwork.pages.pages", "com.apple.iwork.pages.sffpages"} then (* C'est un fichier Pages. • It's a Pages document *)                     my TraiteUnDocument(elem_)           else if cl_ is in {"file package", "«class cpkg»"} then                     set rapport to rapport & msg91 & elem_ & return (* "Package", Attention, un package EST un dossier "spécial". • Caution, a package IS a "special" folder. *)           else if cl_ is in {"folder", "«class cfol»"} then                     my ExploreUnDossier(elem_, ptree)           else                     set rapport to rapport & msg92 & elem_ & return (*  "Pas un document Pages". • "Not a Pages's document" *)           end if -- typeId_ is … end exploreTraite --===== on ExploreUnDossier(dossier, ptree)           local nomElement, cheminElement, c           repeat with nomElement in list folder dossier without invisibles                     set cheminElement to dossier & nomElement                     tell application "System Events" to set c to name of (dossier as alias)                     my exploreTraite(cheminElement as alias, ptree & c & ":")           end repeat end ExploreUnDossier --===== on TraiteUnDocument(leCheminOriginal_UniText)           my export2Doc(leCheminOriginal_UniText as alias, leCheminOriginal_UniText) end TraiteUnDocument --===== on export2Doc(p, leCheminOriginal_UniText) (* • here p is the path as alias *)           local flag, nom_de_p, nouveauChemin, w, bof, x, p_xport           try                     tell application theApp                               open p                               set flag to false                               repeat 300 times (* Attends que le fichier soit réellement ouvert. • Wait until the file is really open *)                                         if my getNbWindows() > 0 then                                                   set flag to true                                                   exit repeat                                         end if                               end repeat                     end tell -- to theApp                     if flag is false then error number 8888 (* Le fichier n'a pu être ouvert. • The file can't be open. *)           on error MsgErr number NroErr                     if NroErr = 8888 then                               set rapport to rapport & msg94 & leCheminOriginal_UniText & return                     else                               set rapport to rapport & "### " & MsgErr & " ### " & errNbr & return                     end if                     return (* can't do the remaining tasks *)           end try             tell application "System Events" to tell file leCheminOriginal_UniText                     set nom_de_p to name           end tell -- System Events             if nom_de_p ends with theExt then set nom_de_p to text 1 thru -(2 + (length of theExt)) of nom_de_p           set nouveauChemin to dossierParDefaut & nom_de_p & "." & newExt           --log nouveauChemin           tell application "System Events" to if exists (file nouveauChemin) then set name of file nouveauChemin to nom_de_p & my horoDateur(modification date of file nouveauChemin) & "." & newExt (* name stamped *)           try                     set {w, bof} to my getFrontWindow()                       tell application "System Events" to tell application process theApp                               click menu item menuExport of menu 1 of menu bar item theMenu of menu bar 1 (* Exporter… *)                               repeat until exists sheet 1 of window w                                         delay 0.1                               end repeat                               tell sheet 1 of window w (* sheet containing the buttons PDF, Word, RTF, Standard *)                                         --          get properties of UI elements of radio group 1                                         if isOs4 then                                                   click button theButton of radio group 1                                         else if isOs5 then                                                   click checkbox theButton of radio group 1                                         else                                                   click radio button theButton of radio group 1 (* I hope that they will no longer change it *)                                         end if -- isOs4 is true                                         (*                                         if typeNum is 2 then                                                   delay 0.2                                                   tell pop up button 1                                                             click                                                             click menu item quality of menu 1                                                   end tell                                                   delay 0.2                                         end if                                         *)                                         click button 1 (* Suivant… *)                                         repeat until exists button localExport                                                   delay 0.1                                         end repeat                                         click button localExport (* Exporter… *)                               end tell -- to sheet…                                 repeat 20 times                                         if exists sheet 1 of window w then                                                   click button 2 of sheet 1 of window w (* "Ne pas consulter " dans éventuel rapport d'anomalies • "Don't review" in sheet reporting possible export anomalies *)                                                   exit repeat                                         end if                                         delay 0.1                               end repeat                     end tell -- to process … System Events                       if dossierDeStockage is not dossierParDefaut then (* we must move the file from folder dossierParDefaut to folder dossierDeStockage *)                                 set p_xport to dossierDeStockage & nom_de_p & "." & newExt                                 tell application "System Events" to if exists (file p_xport) then set name of file p_xport to nom_de_p & my horoDateur(modification date of file p_xport) & "." & newExt                               tell application "Finder" to duplicate file nouveauChemin to folder dossierDeStockage (*                               • before 10.5, System Events is unable to move *)                                 my wait4File(p_xport)                                 tell application "System Events" to if exists file nouveauChemin then delete file nouveauChemin                     end if -- dossierDeStockage is not…                     my ferme1fenetre()             on error errMsg number errNbr                     set rapport to rapport & msg96 & p & return & errMsg & " ### " & errNbr & return           end try end export2Doc (* ===== • Build a stamp from the modification date_time *) on horoDateur(dt)           local annee, mois, jour, lHeure, lesSecondes, lesMinutes           set annee to year of dt           set mois to month of dt as number (* existe depuis 10.4 *)           set jour to day of dt           set lHeure to time of dt           set lesSecondes to (lHeure mod 60)           set lHeure to round (lHeure div 60)           set lesMinutes to (lHeure mod 60)           set lHeure to round (lHeure div 60)           return "_" & annee & text -2 thru -1 of ("00" & mois) & text -2 thru -1 of ("00" & jour) & "-" & text -2 thru -1 of ("00" & lHeure) & text -2 thru -1 of ("00" & lesMinutes) & text -2 thru -1 of ("00" & lesSecondes) (* • Here, the stamp is  "_YYYYMMDD-hhmmss" *) end horoDateur (* ===== • Take care, the front window may be an Inspector or a dialog one. *) on getFrontWindow()           local namesOfWindows, w, flag           tell application theApp to activate           set flag to false           tell application "System Events" to tell application process theApp                     set namesOfWindows to name of every window                     repeat with w in namesOfWindows                               if subrole of (get properties of window w) is "AXStandardWindow" then                                         set flag to true                                         exit repeat                               end if                     end repeat           end tell           return {w, flag} (* • w is the name of the front document's window *) end getFrontWindow (* ===== • Wait that the file is completely written on disk *) on wait4File(p) (* • p must be Unicode text *)           local oldSize, nnn, newSize           set oldSize to 0           tell application "System Events" to set nnn to name of file p             repeat                     try                               tell application "System Events" to set newSize to physical size of file p                               if oldSize < newSize then                                         set oldSize to newSize                               else                                         exit repeat                               end if                     end try           end repeat end wait4File --===== on activateTheApp()           local bof, status           tell application theApp to activate           if my getStartingStatus() is false then tell application "System Events" to tell application process theApp to keystroke return           repeat                     set {bof, status} to my getFrontWindow()                     if status is true then exit repeat           end repeat end activateTheApp (* ===== • Close existing open windows *) on fermeFenetres()           repeat while my getNbWindows() > 0                     my ferme1fenetre()           end repeat (* • Now there is no open window *) end fermeFenetres --===== on ferme1fenetre()           tell application theApp to activate           tell application "System Events" to tell application process theApp to keystroke "w" using {command down} end ferme1fenetre --===== on getPlistValue(valName, default)           local thePlist, u           set thePlist to (path to preferences folder as Unicode text) & "com.apple.iWork." & theApp & ".plist"           tell application "System Events"                     if exists file thePlist then                               tell contents of property list file thePlist                                         try                                                   set u to (value of property list item valName) (* Unicode Text *)                                         on error (* On est là si Pages n'a rien enregistré avec des préférences neuves • Here if Pages never saved with the new preferences file. *)                                                   set u to default                                         end try                               end tell -- to contents of…                     else (* On est là s'il n'y a pas de fichier de préférences • Here if there is no preferences file. *)                               set u to default                     end if           end tell -- to system events           return u end getPlistValue --===== on getStartingStatus()           return my getPlistValue("LSDefaultsUseDefaultStartingPoint", false) end getStartingStatus --===== on getDefaultExport()           local u           (* son of a *****, I forgot that they don't use the same name !! *)           if theApp contains "Pages" then                     set u to my getPlistValue("SLDocumentDefaultExportDirectory", "~/Documents")           else if theApp contains "Numbers" then                     set u to my getPlistValue("LSDocumentDefaultExportDirectory", "~/Documents")           else                     error "I didn't coded a Keynote version !"           end if             set u to (POSIX file (do shell script "echo " & u)) as text           if u ends with ":" then                     return u           else                     return (u & ":")           end if end getDefaultExport --===== on getNbWindows()           tell application "System Events" to tell application process theApp to return count of windows end getNbWindows --===== on getLocale(a, x)           tell application a to return localized string x end getLocale --===== on getVersion()           try                     tell application theApp to return version           on error                     return "1"           end try end getVersion --===== on parleAnglais()           local z           try                     tell application theApp to set z to localized string "Cancel"           on error                     set z to "Cancel"           end try           return (z is not "Annuler") end parleAnglais --===== on prepareMessages()           if my parleAnglais() then                     set msg1 to "Don’t click when the script is running." & return & "Except, of course, if it ask for."                     set msg90 to "No problem during the export process."                     set msg91 to "Package"                     set msg92 to "Not a " & theApp & "’s document"                     --                     set msg94 to theApp & " can’t read it"                     set msg96 to "Not copied."                     set msg99 to "Oops"           else                     set msg1 to "Éviter de cliquer durant l’exécution du script" & return & "sauf s’il le demande."                     set msg90 to "Exportation réussie sans incident."                     set msg91 to "Package"                     set msg92 to "Pas un document " & theApp                     --                     set msg94 to theApp & " n’a pas pu le lire"                     set msg96 to "Pas copié."                     set msg99 to " Vu "           end if           set msg91 to "### " & msg91 & " ###  "           set msg92 to "### " & msg92 & " ###  "           --           set msg94 to "### " & msg94 & " ###  "           set msg96 to "### " & msg96 & " ###  " end prepareMessages --===== --[/SCRIPT]

    Try this app: http://tyorex.com/iWorkConverter
    Batch convert Pages files to doc and pdf.

  • How do you populate a page item in apex with a value read from excel

    Dear All
    I am working on application where I am uploading a csv file in oracle apex. I then need to access a value in Cell B2 of the csv file and populate a page item called
    :P2100_AUTHORISATION_ID with this value. Many of the examples I have found upload the data using v_data-array into a table but I don't need to do that I just need to get the value from the csv file and then display additional information about the file allowing the user to either or continue or cancel the request to upload. I am running into a small problem that I can't explain and wondered if anyone had any ideas.
    Here is the code I am using to try and populate and item called :P2100_AUTHORISATION_ID but when I poulate the item the value is always 0. But if I replace the line :P2100_AUTHORISATION_ID:= v_data_array(2) with a raise_application_error(-20001,v_data_array(2)); The correct value is displayed in the eror. Any Help would be appreciate and I apologise in advance if this akes no sense at all:-)
    declare
    --variables needed to read excel data from flow files
    v_blob_data BLOB;
    v_blob_len NUMBER;
    v_position NUMBER;
    v_raw_chunk RAW(10000);
    v_char CHAR(1);
    c_chunk_len number := 1;
    v_line VARCHAR2 (32767) := NULL;
    v_data_array wwv_flow_global.vc_arr2;
    v_rows number;
    v_sr_no number := 1;
    begin
    --------------------------------------get file info from www_flow_files
    select blob_content into v_blob_data from wwv_flow_files
    where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER) and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
    v_blob_len := dbms_lob.getlength(v_blob_data);
    v_position := 1;
    --Read and convert binary to char
    WHILE ( v_position <= v_blob_len ) LOOP
    v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
    v_char := chr(p_bl_wd_data_entry.hex_to_decimal(rawtohex(v_raw_chunk)));
    v_line := v_line || v_char;
    v_position := v_position + c_chunk_len;
    -- When a whole line is retrieved
    IF v_char = CHR(10) THEN
    -- Convert comma to : to use wwv_flow_utilities </span>
    v_line := REPLACE (v_line, ',', ':');
    -- Convert each column separated by : into array of data </span>
    v_data_array := wwv_flow_utilities.string_to_table (v_line);
    --get filename from wwv_flow_files
    select filename into :P2100_FILE_NAME from wwv_flow_files where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER) and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
    :P2100_AUTHORISATION_ID:= v_data_array(2);
    -- Clear out
    -- v_line := NULL;
    --v_sr_no := v_sr_no + 1;
    END IF;
    END LOOP;
    end;
    Best Regards
    Lynn

    Hi Joel
    Continuing on from my last question, there was something else I want to ask if you dont mind.
    Now that I have the v_data_array(2) value in a page item I would like to use as an input value to a procedure to return some information I need displayed on the page. To do this I need to convert it to a number but when I try to so this I get the following error
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    When I use the wwv_flow.debug that you told me about it is outputting a value '4851 ' so it look like there may be some sort of asii character causing a problem. I have tried using trim(v_data_array(2)) and ascii(v_data_array(2)) but nothing seems to work.
    Would you know how to convert a v_data_array value to a number? At the moment I am attemting to do it withiin the same code I attached in my earlier post but I have replaced the assignment of :P2100_AUTHORISATION_ID with the code below where P_BL_WD_DATA_ENTRY.getauthid is the procedure returning the values I need.
    :P2100_AUTHORISATION_ID:= P_BL_WD_DATA_ENTRY.getauthid(to_number(v_data_array(2)));
    Thanks
    Lynn

  • [JS] Page item (rectangle frame) width and height

    Following is my attempt at writing a function for width and height. It appears to work on rotated and sheared objects. Can anyone tell me if I'm on the right track?
    >function WidthAndHeight(myRectangle) // Returns an array [width,height]
    ]var myRectangleTopLeft = myRectangle.resolve(AnchorPoint.topLeftAnchor, CoordinateSpaces.pasteboardCoordinates, true);
    var myRectangleTopRight = myRectangle.resolve(AnchorPoint.topRightAnchor, CoordinateSpaces.pasteboardCoordinates, true);
    var myRectangleBottomLeft = myRectangle.resolve(AnchorPoint.bottomLeftAnchor, CoordinateSpaces.pasteboardCoordinates, true);
    ]var d1x = (myRectangleTopRight[0][0] - myRectangleTopLeft[0][0]);
    var d1y = (myRectangleTopRight[0][1] - myRectangleTopLeft[0][1]);
    var myWidth = hypotenuse(d1x,d1y);
    var d2x = (myRectangleTopLeft[0][0] - myRectangleBottomLeft[0][0]);
    var d2y = (myRectangleTopLeft[0][1] - myRectangleBottomLeft[0][1]);
    var myHeight = hypotenuse(d2x,d2y);
    ]return [myWidth,myHeight];
    ]function hypotenuse(d1,d2)
    ]]return Math.sqrt ( Math.pow(d1,2) + Math.pow(d2,2) );

    Dave, you are absolutely right (no surprise here) about always returning points. I'm not sure, but I think this may actually be an InDesign bug. At the end of the 'resolve' method the 'true' value is meant to indicate 'use ruler units', I believe. Having read the documentation, however, it does seem like certain transformation coordinate spaces functions only work in points.
    To make this a more complete function, I've updated it to include a conversion to the current ruler units. I'm using the UnitValue object, and perhaps I'm misunderstanding something, but I cannot easily convert to a new UnitValue using the ruler measurements enumerations (it requires a string value to represent the target units). So I've had to include a switch function to get from the enumeration to the string value. Also, the UnitValue object does not seem to work with agates, and I haven't gone so far as to write my own conversion function for that, so the function has to exit with an alert if the user has agates as their ruler units.
    If anyone can offer a more elegant way of dealing with this, it would be great. Or even better, some insight into why the resolve method does not seem to honour the ruler units. This _is_ getting a bit over-the-top for a simple width and height function. Maybe Adobe will consider just adding the property to the page item and putting us all (well, certainly me, anyway) out of our misery (I've put in a feature request).
    > function WidthAndHeight(myRectangle) // Returns an array [width,height]
    ]] var myRectangleTopLeft = myRectangle.resolve(AnchorPoint.topLeftAnchor, CoordinateSpaces.pasteboardCoordinates, true);
    var myRectangleTopRight = myRectangle.resolve(AnchorPoint.topRightAnchor, CoordinateSpaces.pasteboardCoordinates, true);
    var myRectangleBottomLeft = myRectangle.resolve(AnchorPoint.bottomLeftAnchor, CoordinateSpaces.pasteboardCoordinates, true);
    ]] var d1x = (myRectangleTopRight[0][0] - myRectangleTopLeft[0][0]);
    var d1y = (myRectangleTopRight[0][1] - myRectangleTopLeft[0][1]);
    var myWidth = hypotenuse(d1x,d1y);
    var d2x = (myRectangleTopLeft[0][0] - myRectangleBottomLeft[0][0]);
    var d2y = (myRectangleTopLeft[0][1] - myRectangleBottomLeft[0][1]);
    var myHeight = hypotenuse(d2x,d2y);
    ]] var myHorizontalUnits = unitsEnumToString(app.documents[0].viewPreferences.horizontalMeasurementUnits);
    var myVerticalUnits = unitsEnumToString(app.documents[0].viewPreferences.verticalMeasurementUnits);
    ]] myWidth = new UnitValue(myWidth,"points");
    myHeight = new UnitValue(myHeight,"points");
    ]] myWidth = myWidth.as(myHorizontalUnits);
    myHeight = myHeight.as(myVerticalUnits);
    ]] return [myWidth,myHeight];
    ]] function hypotenuse(d1,d2)
    ]]]] return Math.sqrt ( Math.pow(d1,2) + Math.pow(d2,2) );
    ]] function unitsEnumToString(myUnitsEnum)
    ]]]] switch(myUnitsEnum)
    ]]]]]] case 2054188905 :
    ]]]]]]] return "points";
    ]]]]]] case 2054187363 :
    ]]]]]]] return "picas";
    ]]]]]] case 2053729891 :
    ]]]]]]] return "inches";
    ]]]]]] case 2053729892 :
    ]]]]]]] return "inches decimal";
    ]]]]]] case 2053991795 :
    ]]]]]]] return "millimeters";
    ]]]]]] case 2053336435 :
    ]]]]]]] return "centimeters";
    ]]]]]] case 2053335395 :
    ]]]]]]] return "ciceros";
    ]]]]]] default :
    ]]]]]]] alert("Cannot convert to the current ruler units. Sorry.");
    exit();

  • Add interfaces to page items.

    Hi, 
    We have many documents already, and need to "tag" or add attributes to items, which will be written to the IDML.  The idea is for us to be able to select items on a page, and then convert them later to interactive fields in PDF.    I am trying to figure out how to select an item on a page, like a TextFrame, and add a custom interface to it.   I suppose once I have added an custom interface tot the object, I should be able to control how it prints IDML, and add an attribute to the IDML that is printed for that item. 
    Thanks,
    Dave.

    ok,  I have been working with the BPI sample for a little while.. but I am stuck, and am really new to this SDK..  I am trying to add another attribute which will be printed next to BPIData in the IDML.  I am stuck trying to Set the value of the new attribute. 
    Here is how I am attempting to add the attribute (mine is the second Property below):
    BPI.fr:
            // BPIData - a string label
                        Property
                                  kBPIDataPropertyScriptElement,                              // this property's script element ID
                                  p_BPIData,                                                                                // ScriptID
                                  "bpi data",                                                                                // name
                                  "BasicPersistInterface label for a page item ",          // description
                                  StringType,                                                                                // type
                                  {}                                                                                                    // alternate types
                                  kNoAttributeClass,                                                            // attribute class ID
                           // BPIData - a string label
                        Property
                                  kJMANamePropertyScriptElement,                              // this property's script element ID
                                  p_JMAName,                                                                                // ScriptID
                                  "JMA Name",                                                                                // name
                                  "BasicPersistInterface label for a page item ",          // description
                                  StringType,                                                                                // type
                                  {}                                                                                                    // alternate types
                                  kNoAttributeClass,                                                            // attribute class ID
    THEN I WAS looking at
    ErrorCode BPIHelper::ProcessBPISetDataCmd(const UIDList& itemList, const WideString& value)
    to attempt to set the attrbute, but this is where I get lost. 
    What do you think, am I on the right track?  How would you set the new attribute listed above?

  • How do I make a page item transparent?

    I want to be able to set the opacity on a specified page item. I've tried two approaches, but one of them won't compile and the other gives me link errors.<br /><br />Can anyone tell me why I'm getting these errors? And does anyone know of a way to set transparency? (BTW, I can't use a suite since the page item won't be selected.)<br /><br />Thanks.<br /><br />Bob<br /><br />Approach 1:<br /><br />  // This statement causes the following error in InterfacePtr.h(442):<br />  // error C2440: 'static_cast' : cannot convert from 'IPMUnknown *' <br />  //    to 'IGraphicStyleAttributeBossList *'<br />  InterfacePtr<IGraphicStyleAttributeBossList><br />    attrList(uidRef, IID_IGRAPHICSTYLE_OVERRIDES);<br /><br />  ASSERT(attrList);<br />  Utils<IXPAttributeUtils>()->AddBasicOpacityAttribute(0, attrList);<br />  UIDList items(uidRef);<br />  ErrorCode ec =<br />    Utils<IXPAttributeUtils>()->ApplyBasicTransparencyToPageItems(<br />      attrList, (const UIDList) items);<br /><br />Approach 2:<br /><br />  // This statement causes an unresolved external symbol link error for<br />  // DoCleanup()<br />  IXPAttributeSuite::AttributeList myList;<br /><br />  // This statement causes an unresolved external symbol link error for<br />  // push_back()<br />  myList.push_back(<br />    IXPAttributeSuite::AttributeTypeAndValue(<br />      IXPAttributeSuite::kBSOpacity,<br />      IXPAttributeSuite::AttributeValue(PMReal(0))<br />    )<br />  );<br /><br />  ErrorCode ec =<br />    Utils<IXPAttributeUtils>()->ApplyAttributesToPageItems(<br />      myList, UIDList(uidRef));

    I'm having trouble figuring out how to use IXPAttributeFacade. Can you provide a code snippet please, with all the necessary headers.

  • Report- Pl/sql function returning sql query parsing page items as text?

    Hi Team,
    I am facing a strange issue .
    I have four page items namely
    1)JOB_CODE
    2)MIN_EXP
    3) MAX_EXP
    4) SOURCES1
    I have a report of the type "Pl/sql function returning sql query"
    declare
    v_sql varchar2(4000);
    begin
    if (:JOB_CODE IS NOT NULL and :MIN_EXP IS NOT NULL and :MAX_EXP IS NOT NULL and :SOURCES1 IS NOT NULL) then
    v_sql:= 'select v_candidate_id, v_fname,v_current_employer,v_Experience_years from candidature where V_REQUIREMENT = :JOB_CODE and v_experience_years >= :MIN_EXP and v_experience_years <= :MAX_EXP and source like ' || '''' || '%'|| ':SOURCES1' || '%' || '''';
    elsif (:JOB_CODE IS NULL and :MIN_EXP IS NOT NULL and :MAX_EXP IS NOT NULL and :SOURCES1 IS NOT NULL) then
    v_sql := 'select v_candidate_id, v_fname,v_current_employer,v_Experience_years from candidature where v_experience_years >= :MIN_EXP and v_experience_years <= :MAX_EXP and source like ' || '''' || '%'|| ':SOURCES1' || '%' || '''';
    elsif (:MIN_EXP IS NULL and :JOB_CODE IS NOT NULL and :MAX_EXP IS NOT NULL and :SOURCES1 IS NOT NULL) then
    v_sql := 'select v_candidate_id, v_fname,v_current_employer,v_Experience_years from candidature where v_experience_years <= :MAX_EXP and V_REQUIREMENT = :JOB_CODE and source like ' || '''' || '%'|| ':SOURCES1' || '%' || '''';
    elsif (:MAX_EXP is null and :JOB_CODE IS NOT NULL and :MIN_EXP IS NOT NULL and :SOURCES1 IS NOT NULL) then
    v_sql := 'select v_candidate_id, v_fname,v_current_employer,v_Experience_years from candidature where V_REQUIREMENT = :JOB_CODE and v_experience_years >= :MIN_EXP and source like ' || '''' || '%'|| ':SOURCES1' || '%' || '''';
    end if;
    insert into query_list values (v_sql);
    insert into debug values (:JOB_CODE , :MIN_EXP , :MAX_EXP , :SOURCES1);
    return v_sql;
    end;
    Please not that I am insertin the query into a table called Query_list and the page item values into the table called Debug thru the pl/sql function which returns teh query.
    Now I select the data from the debug tables.
    select unique(query) from query_list;
    select v_candidate_id, v_fname,v_current_employer,v_Experience_years from candidature where V_REQUIREMENT = :JOB_CODE and v_experience_years >= :MIN_EXP and v_experience_years <= :MAX_EXP and source like '%:SOURCES1%'
    select * from debug;
    JOBCODE     MINEX     MAXEX     SOURCE
    21     1     10     donkeyHire
    And if I run the query in sql I get some records returned
    select v_candidate_id, v_fname,v_current_employer,v_Experience_years from candidature where V_REQUIREMENT = 21 and v_experience_years >= 1 and v_experience_years <= and source like 'donkeyHire'
    V_CANDIDATE_ID     V_FNAME     V_CURRENT_EMPLOYER     V_EXPERIENCE_YEARS
    2     Vengu     Andale Tech     4
    But the record does not show up in the report!
    does this type of report parse page items as text?
    Why is it so?
    Waiting for an early reply.
    Thanks,
    venkat

    Venkat - You don't want to put ':SOURCES1' in quotes like that.
    Scott

  • Text wrap on Master Page items

    RE:  InDesign CS2 on Windows Vista
    Hello,
    I inserted a graphic on both of my master pages and applied a text wrap to them.  However, on my document pages, my text does not wrap around the graphics.  (In the Text Frame Options dialog box, the "Ignore Text Wrap" box is not checked.)  I know I can either override my master page items (and insert the graphic again) or control-shift-click on the graphic and force the text to wrap around it.  But that puts another link to the graphic in my document...and I'm trying to minimize the file size.
    Do you have any ideas on how to make the text wrap on the master pages work on the document pages?

    Text wrap on masters is not honored on live pages in CS2. It was added as feature in CS3.
    Bob

  • Set page item from a stored procedure

    Dear reader
    We would like to have a stored procedure to run every 10 minutes. When the procedure starts, the user has to be warned that the update process is running.
    When the procedure is finished, the user should receive a message that the update process is finished.
    What I had in mind was to set a Page 0 item 'P0_REFRESH' and set his value depending on the status of the update. Then add a dynamic action with a change event. So everytime the value of this page item changes, the user will receive a correct message.
    Does anyone know if it is possible to set a page item from a stored procedure?
    Kind regards
    Xnni

    AndyPol
    I found a solution by querying the user_jobs table. In Apex, I created two page 0 items that hold the current status of the job (online, offline) and the old value of the job.
    Online of offline in the current status item is determined by a decode on "this_sec".
    The enext step was to include a html region in P0 that contains some javascript. This javascript will display a message when the values of the new status is different from the old status ;)
    Many thanks for bringing up the ideas.
    Greetz
    Xnni

  • Problem with dynamic change a page item value

    Hi,
    I'm trying to dynamically calculated the value of an item based on a simple formula that involves the multiplication of two elements from the same page.
    To do this, create dynamic action as follows:
    Event: Change
    Selection Type: Item(s)
    Item(s): P19_DURATION
    Action: Set value
    Fire on page load: TRUE
    Set Type: SQL Statement
    SQL Statement: SELECT :P19_DURATION * :P19_RATE FROM DUAL
    Page items to submit: P19_DURATION
    Selection Type: Item(s)
    Item(s): P19_AMOUNT
    When altering the P19_DURATION get no change in P19_AMOUNT
    Since my knowledge of javascript is almost zero, I'm trying to do this with pl / sql or sql. Try the dynamic action with a function or a PL / SQL statement and nothing works.
    Have to use javascript for this?
    Searching the forum I think it's something simple, but I did not find an example similar to what I need.
    Regards

    Event: Change
    Selection Type: Item(s)
    Item(s): P19_DURATION
    Action: Set value
    Fire on page load: TRUE
    Set Type: javascript
    javascript Code:
    amount = $v('P19_DURATION') *  $v('P19_RATE');
    $s('P19_AMOUNT',amount);

  • Discoverer Viewer Report with Page Items Slow Performance

    I created a report in Discoverer User that has page items and parameters and runs fine (under 3 minutes) in Discoverer User, but when I try and run it in Discoverer Viewer it takes a long time. It took over 70 minutes before manually terminating it. I made a copy of the report and removed the page items and tried to run it again in Discoverer Viewer and now the report runs in under 3 minutes. Any idea why a report with page items would run in Discoverer user fine, but not discoverer viewer?
    I am using Oracle Business Intelligence Plus 10g (10.1.2.55.26)

    As long as you can access the middle-tier server where Discoverer Viewer is running, you should be able to run and view Discoverer worksheets.
    While it is difficult to even start guessing what the problem might be, if the machine you installed Discoverer on has DHCP addressing, you will run into problems.
    Thanks
    Abhinav
    Oracle Business Intelligence Product Management
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN : http://www.oracle.com/technology/products/bi/
    Discoverer : http://www.oracle.com/technology/products/discoverer/
    BI Software : http://www.oracle.com/technology/software/products/ias/devuse.html
    Documentation: http://www.oracle.com/technology/documentation/appserver1012.html
    BI Samples : http://www.oracle.com/technology/products/bi/samples/
    Blog : http://oraclebi.blogspot.com/

  • Report row highlight based on a page item

    Is there a way to highlight a report row based on the value of a page item?
    In my case I have a report where the application user requests data in a detail report using a column link in the master report. This loads an id number from my report into a page item (say :P8_ID for example). If this item is null, I want the report rows to all render normally (nothing is selected or the detail report has been closed). If there is an id in that field then I want the row containing the information about that item to highlight (its column link has been clicked selected it to bring up a detail report).
    At first glance, this looks similar to Vikas solution (Change the Report row color when clicked but I am trying to make the connection between what has already been done and where I need to be.

    After looking back, I discovered my value was being set after the report rendered. When I re-organized my calculations and the rest, it worked.

  • IR Report based off of page item value

    Hey all,
    I want to create an IRR region and have the report update based off of a a page item.
    The page item will be a drop down of the tables I want to show, so something like:
    Select * from '||v('P1_TABLES')
    This will work with the normal report but not with the IRR. Is the syntax incorrect?
    Help is appreciated!
    Edited by: Ben C on Feb 23, 2012 6:42 AM

    Zooid,
    but always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always
    use bind variables !!!!
    Regards,
    Richard
    blog: http://blog.warp11.nl
    twitter: @rhjmartens
    If this question is answered, please mark the thread as closed and assign points where earned..

Maybe you are looking for

  • VL10A and new select-options

    Hi, I copied transaction VL10A to a new one ZVL10A. This was due to the need to add a new selection-criteria in the main screen: Delivery Type field. When I try to create the delivery for that delivery type I selected in ZVL10A main screen I am not a

  • BAdi to append leading zeros

    Hi experts, Please can anyone help me understand how to implement this BADI FIEB_CHANGE_BS_DATA step by step  to append leading zeros,its kind of urgent. Regards

  • How to Debug IDOC posting

    Hi,    Could anyone please advise how to debug an IDOC posting. I am new to ABAP. regards, Munavar Basha A.K.

  • PDF as an article content

    Hi Adobe experts, I am currently adapting a 12-page catalogue to an ipad doc containing hyperlinks and capable of pinch and zoom. May I ask for an ideal PDF export setting from indesign to generate a high resolution PDF capable of displaying a high q

  • Funktioniert Photoshop Elements 13 auf Windows 8.1 mit 64 bit???

    Möchte Photoshop Elements 13 bei Amazon bestellen. Funktioniert die käufliche Version auf Windows 8.1 mit 64 bit??? Zitat Adobe: "Microsoft Windows 7 oder Windows 8 (32-Bit-Versionen sind für 32-Bit-Systeme, 64-Bit-Versionen für 64-Bit-Systeme vorges