CS6 - how to get page number?
i have selected frame. I want to know page number, where it is.
aSel = app.selection[0];
alert (aSel.parent.name); - i get empty string
cause it' Object spread. And what to do then? (without losing of right/left reffering)
thanks
p.s. in CS3 i did it, and in CS6 i get stuck.
@Dmitry – for further reference see also:
http://www.indiscripts.com/post/2012/06/so-what-s-new-in-indesign-cs6-scripting-dom
http://www.indiscripts.com/post/2011/04/so-what-s-new-in-indesign-cs5-5-scripting-dom
http://www.indiscripts.com/post/2010/10/so-what-s-new-in-indesign-cs5-scripting-dom
For the whole documentation of the DOM:
http://www.jongware.com/idjshelp.html
Hm. While we are at it:
Is there a "What's new in InDesign CS4 scripting DOM" somewhere?
Just to complete the picture…
Uwe
Similar Messages
-
How to get page number from the PDF using Javascript
Hi,
We are having list of Single page PDF. The pdf are named in the order,
ISBN_Author_01.PDF (with real page number as i)
ISBN_Author_02.PDF (with real page number as ii)
ISBN_Author_03.PDF (with real page number as iii)
ISBN_Author_04.PDF (with real page number as 1)
ISBN_Author_05.PDF (with real page number as 2)
ISBN_Author_06.PDF (with real page number as 3)
ISBN_Author_nn.PDF (with real page number as 500)
Here each pdf has a page number and in sequential order.
The task is to check whether all the pdfs are in sequential order (i.e i, ii, iii, 1, 2, 3). If any page is missing, the script should throw an error report.
To do this task, I am writing a Javascript to get the real page number from the PDF.
Can anybody help me how to get the page number from the PDF using Javascript.
Thanks,
GopalThe "real" page number within a PDF is the count of the physical page starting at 0, zero.
pageNum numPages
The number printed on each page is the page label.
setPageLabels getPageLabel
You will have to open each PDF and your script would need to know the page label for that file. I would expect you would need to build a 2 dimensional array of the file names and the page label for the page within that array. -
Indesign CS3: How to get the number of the current layer?
Hallo!
How to get the number of the current layer in a page?
Thanks,
Alois BlaimerInterfacePtr<ILayerList> layerList(documentUIDRef, UseDefaultIID()); <br /><br />int32 layerCount = layerList->GetCount();<br /><br />To findout layer name use<br /><br />IDocumentLayer* documentLayer = layerList->QueryLayer(layerIndex);<br /> <br />PMString layer=documentLayer->GetName();
-
How to get paragraph number of selected text in ID CS4
Hi,
Can anybody help me how to get paragraph number of selected text in Indesign cs4.
Thanks,
GopalAh, I see -- thanks. Turns out that there's no difference in speed between texts.itemByRange(), characters.itemByRange(),and insertionPoints.itemByRange(). In a document with 170 pages of text, and with the cursor in the last paragraph, the second and third lines, below (and your function), give exactly the same result:
t = app.selection[0];
t.parentStory.texts.itemByRange (t.parentStory.insertionPoints[0], t).paragraphs.length;
t.parentStory.characters.itemByRange (t.parentStory.characters[0], t).paragraphs.length;
Peter -
How to set page number & current date in sqlplus result
how to set page number & current date in sqlplus result
Hi,
Use the TTITLE command. For example:
SET PAGESIZE 15
TTITLE LEFT &_date RIGHT "Page:" FORMAT 999 sql.pno SKIP 2
SELECT ROWNUM
, ename
FROM scott.emp
;Output:
12-Jan-2011 Page: 1
ROWNUM ENAME
1 SMITH
2 ALLEN
3 WARD
4 JONES
5 MARTIN
6 BLAKE
7 CLARK
8 SCOTT
9 KING
10 TURNER
12-Jan-2011 Page: 2
ROWNUM ENAME
11 ADAMS
12 JAMES
13 FORD
14 MILLER
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and the results you want from that data. If your question is based on commonly available tables, like those in the scott schema, then you don't have to post any sample data: just post the output.
Explain how you get those results from that data.
Always say what version of Oracle (and other relevant softward, SQL*Plus in this case) you're using. -
How to get page numbers using cl_gui_alv_grid
dear all,
I want to display page nos at every end of .iam using cl_gui_alv_grid.iam didving itab into no of pages,iam using code to display no of pages is
CLASS LCL_EVENT_RECEIVER DEFINITIOn.
PUBLIC SECTION.
HANDLE_END_OF_PAGE
FOR EVENT PRINT_END_OF_PAGE OF CL_GUI_ALV_GRID.
PRIVATE SECTION.
DATA: PAGENUM TYPE I.
ENDCLASS.
CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
METHOD HANDLE_END_OF_PAGE.
DATA: TABLENAME(30) TYPE C.
ADD 1 TO PAGENUM.
WRITE: /,'Event: PRINT_END_OF_PAGE'(003),
'Number of pages so far: '(004), PAGENUM.
ENDMETHOD. "handle_end_of_page
Endclass.
and iam wrting in PBO set_table_for_first_display
CREATE OBJECT EVENT_RECEIVER.
SET HANDLER EVENT_RECEIVER->HANDLE_END_OF_PAGE FOR GRID1.
create object grid1.
exporitng
i_parent name = 'CONT'.
GS_PRINT-RESERVELNS = 2.
CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME =
IS_PRINT = GS_PRINT
IS_LAYOUT = GS_LAYOUT
CHANGING IT_OUTTAB = it_Tab.
but this is not triggering when i dispalying output.i think this will trigeer when we will give print output.
then how to get page nos at buttom of each page .
thanks in advance
shivHi,
I think you have to define the page size because for each page if you have defined the page size(say N), at first top of page will be triggered and after the N number of lines the end of page event is defined. Please check this if you have not defined all the page size it assumes all the lines in one page. Please check.
Thanks. -
When converting word to pdf the cover page of my documet gets page number 1.On the original the number pages start from the second page.How to keep the original format?
Michael's reponse is correct. However, as far as I knew, OFFICE 2007 came with printer metrics turned off, meaning it is not supposed to be sensitive to the printer selection. The setting is buried in the options list for compatibility. If it is turned off and a change in printer does affect the result, it would appear just one more of the many things in OFFICE 2007 that MS messed up. The latest one for me has been helping students with the messed up equation editor when you want to add equation numbers in a "standard" way. One of the MS employees even wrote a workaround macro for that problem.
-
How to get week number from date
Hi,
please mention how to get the number of week from a particular date using fn module?Hi Debarshi,
Use FM <b>DATE_GET_WEEK</b>
Reward points if helpful.
Regards,
Hemant -
How to get total number of days
Hi All,
how to get total number of days , for example if month eq 05 then need to get total number of days until MAY 31.
and how to get total number of days in a month.
Thank You,,
Sriii..Hi Sridhar,
Pls Try to search before posting general questions.
Try this,
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
i_datum_bis = p_lv_date1
i_datum_von = p_lv_date2
IMPORTING
e_tage = p_e_date_difference
EXCEPTIONS
days_method_not_defined = 1
OTHERS = 2
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards,
Sunil kairam. -
How to get page one to animate only once in interactive pdf?
how to get page one to animate only once in interactive pdf? I like when the document opens up in acrobat and the the page animations work but when I go to one of the pages and hit my designated home button it goes back to page one but it reloads again. As a user it would drive me crazy to have to wait for all of it to load......anyway to have that page one load once as the opening page?
I don't think you really mean animations (unless you have a placed SWF file) because things created with the Animation panel don't work in PDF. Nonetheless, you're talking about some kind of interactivity which is set to happen On Page Load.
So when you return to that page, of course the interactivity loads again.
There isn't a On Page Load Once command.
Perhaps you need to rethink why the interactivity is there. If it's important, maybe it should be triggered by a rollover or by clicking a button. -
How to get physical number of selected row on the screen.
Hi,
We have block defined with Numbers of Records Displayed = 3. In the same time the data set contains 10 records. We would like to know how to get a number of row selected on the screen. i.e. in our case that the number will be always between 1 and 3 independent of the current row position in the data set.
Best regards,
Constantin.You can calculate that number by subtracting :SYSTEM.CURSOR_RECORD and GET_BLOCK_PROPERTY('BLOCK', TOPMOST_RECORD)
-
How to get the number of columns in a result set???
hi everyone..
i am trying to establish a servlet applet communication....
my applet send the sql query to the servlet as serialised string and then the servlet executes the query...
Since i need to pass the result back to the applet, i thaught of passing the whole reult set to the applet..but that seems to be not possible..
so i thaught of storing my result set data in a vector and then pass the vector,but the first problem that i came across is that how to get the number of colums in a result set....
so is there a way to get the number of columns in a result set...???
and also i would like to know if it possible to send my whole result set to the applet bye serialization or by any method...???
thanx in advanceYou shouldn't do. It expenses resources (you should always close the ResultSet and the Statement as fast as possible). Simply gently process it into a Collection or Map of DTO's. Those are serializable.
-
How to get row number of selected entry from OVS search result
Hi,
Anyone having any idea on how to get row number of the selected entry/ how to differentiate rows in OVS search result in ON_OVS method?
Regards,
JatinHi,
You can get the selected record to <ls_selection> structure in co phase 3.
From that structure you can get what ever field you want.,
check the below code for reference,
<< Moderator message - Cut and paste response from F4 help for ALV table field removed. Plagiarism is not allowed in SCN >>
hope this helps u.,
Thanks & Regards,
Kiran
Edited by: Rob Burbank on Jan 5, 2012 5:24 PM -
How to get the number of files currently open?
hi,
does any one know how to get the number of files currently open in windows OS?
e.g. lets say .txt files...
any comment will be really appreciated.
thanksAssuming that you don't want to actually do this from within Java code (which would obviously require native code), here's a utility that will give you a list of which file handles are opened by which processes (on Windows):
http://www.sysinternals.com/ntw2k/freeware/handle.shtml
- K -
How to get the number of elements in DB
Could you tell me how to get the number of elements in DB??
My code to get the number is below, but I think it is not efficient
DB->cursor(DB, NULL, &cursorp, 0);
while ((ret = cursorp->c_get(cursorp, &key, &data, DB_NEXT)) == 0)
count++;
--------------------------------------------------------------------------------------------------------------Hi,
The most efficient way to get a count from the database is using the DB->stat API (http://docs.oracle.com/cd/E17076_02/html/api_reference/C/dbstat.html)
The code will be something like:
DB *dbp;
DB_BTREE_STAT *statp;
int ret;
/* Print out the number of records in the database. */
if ((ret = dbp->stat(dbp, NULL, &statp, 0)) != 0) {
dbp->err(dbp, ret, "DB->stat");
goto err1;
printf("%s: database contains %lu records\n",
progname, (u_long)statp->bt_ndata);
free(statp);The code comes from the example included in the distribution at examples/c/ex_btrec.c
If the database isn't a btree, you should update to the appropriate statistics structure and field.
It's worth noting that retrieving the count is never a "cheap" operation. The count is not stored in the database - since doing so introduced a single point of contention that creates a bottle neck.
Regards,
Alex Gorrod
Oracle Berkeley DB
Maybe you are looking for
-
Biller Direct: Incomplete Customizing
Hi guruz, I'm trying to configure the connection between biller direct and FI-CA using UME as repository for the users. I made all the steps described in the configuration guide but I still have an issue that I can't understand. Here is the exception
-
What is it that we acheive by connecting an r/3 system using the UM configuration in the system configuration Is it necessary that we , prior to mapping users in a portal to that in r/3, do the UM configuration?
-
How can i search a text value on an image file?? Does UCM have this ability or we use third party programs?
-
my friend gave me a phone and said that it was deactivated but i can make calls on the phone and i wanted to know how to deactivated it so that i can get it activated with a new number. how do you deactivate it.
-
Hi All, I am trying to archive some inforecords , for that i am using MM_EINA archiving object in ME17. The job starts and gets cancelled immediately.The job log shows the following logs, Job started