This would make it very easy to navigate and oversee large texts. I’m thinking of a widget that can be placed either to the left or right of the editing area.Each heading in the currently open tab would be there and if clicked, it should bring the cursor to the section in question. I am wondering if there is any chance a of including an outlining function. There is, however one feature that would make it even better for the creative process. Var currentPageNumber = .getElements().pdfAttributes.pageNumber Īpp.pdfPlacePreferences.pageNumber = maxNumber ĬurrentPageNumber = .getElements().pdfAttributes.Wow, FocusWriter keeps getting better and better! It’s already the most beautiful word processor ever and with the addition of RTF support a while ago it’s become a very useful tool for creative writers. Var tempDoc = ( false ) Īpp.pdfPlacePreferences.pageNumber = maxNumber + 1 Var numberOfPagesOfPDF = getNumberOfPagesInPDF( pdfFile ) Īlert( "Number of Pages of Placed PDF: "+numberOfPagesOfPDF ) įunction getNumberOfPagesInPDF( pdfFile ) Select the frame and run the script snippet. Use case with a selected frame where a PDF is placed into. Uwe Laubender 10:22 AM (in response to dev9togo) Re: Number of pages in imported PDF file? This is a VERY SLOW version and can be improved very much with a "Divide & Conquer" method.Ī first approach can be found in this thread:Ģ. Using the placeGun to count the number of pages in a PDF. But be aware that there is no error handling with the given argument here. You may test with a selected PDF file as well, the function takes a PDF file as argument. Here the code that is working on a graphic frame selected that is holding a placed PDF. InDesign will not throw an error on such an attempt, but will simply place page 1. For example if you want to place page 21 of a PDF with 20 pages only. The method exploits the fact, that the value for pdfAttributes.pageNumber of a placed PDF will be set to 1 if you want to place a page number that is not possible. This time I impoved the code a bit using a temp document's placeGun to count PDF pages and not a temp graphic frame. An early version of the below approach can be found here: Lim = parseInt(str.substring(ix+3, _ix)) īelow a solution that is based purely on InDesign, but that obviously can be very much improved with a devide-&-conquer-method for picking numbers. Lim = parseInt(src.substring(ix+9, _ix)) writeFile(f, str.toSource()) f.execute() If ( = pdfFirstPage) į.seek(0, 0) var str = f.read() f.close() Is there a simple way to get the count of PDFpages without going through a loop and placing the next page from the PDF until the placed page number equals the first page number?Īpp.pdfPlacePreferences.pageNumber = totPDFPages For this I need to know how many pages there are in the PDF before I start placing the PDF pages, and then making the new document pages long. However, the next step is to re-write the script to create a saddle stitch document (16,1|2,15), (14,3|4,13). I've easily created a script that iterates through a PDF and places it into a new document as (4,1|2,3), (8,5|6,7) etc, which works for printing in duplex, folding each page in half, and gluing the resulting spines to make a simple thick book (for PDFs with more than, say, 64 pages). (saddle stitch, 4up signatures, 16up signatures etc.) I'd like to create a script that places a multiPage PDF in any number of different impositions. Before the spiel, I'm using javascript in InDesign CS3.
0 Comments
Leave a Reply. |