[JS CS5]How to get Custom Page size

I've been searching the answer of this simple question but looking no way around.
I have an InDesign document with different page size e.g. left page width is 621 pt. and on the same document right page width is 837 pt.
Now I need to get the width of pages using script but app.documentPreferences.pageWidth return standard document preset size(621 pt.) not the custom page size.
Does any one have the Idea to get custom page size using script.
Thanks in advance
Mac

Mac,
as documentation is showing there are some new properties of "page" since InDesign CS5.
Among those is:
bounds    Array of Measurement Unit (Number or String)    readonly    The bounds of the Page, in the format [y1, x1, y2, x2].
So:
myPage.bounds
and pageWidth of the documentPreferences might be:
myPage.bounds[3]-myPage.bounds[1]
unless  myPage is transformed (e.g. rotated and/or sheared and/or scaled) with:
myPage.transform()
void transform (in: CoordinateSpaces, from: varies, withMatrix: varies[, replacingCurrent: varies][, consideringRulerUnits: bool=false])
Transform the page item.
var d = app.activeDocument;
var myPage = d.pages[0];
var oldPB = myPage.bounds;
var rAngle = -45;
var sAngle = 40;
var myTransformationMatrix1 = app.transformationMatrices.add({counterclockwiseRotationAngle:rAngle});
myPage.transform(CoordinateSpaces.INNER_COORDINATES, AnchorPoint.CENTER_ANCHOR, myTransformationMatrix1);
var myTransformationMatrix2 = app.transformationMatrices.add({clockwiseShearAngle:sAngle});
myPage.transform(CoordinateSpaces.INNER_COORDINATES, AnchorPoint.CENTER_ANCHOR, myTransformationMatrix2);
var newPB = myPage.bounds;
$.writeln(oldPB);
$.writeln(newPB);
Now oldPB and newPB will differ a lot.
So, the question remains: what is a reliable way to show if the myPage was or was not transformed against documentPreferences.pageWidth or if  myPage is of rectangular shape at all. See the possibility of adding a sheer angle to the transformation matrix. Also see screen shot:
Transform_Page_CS5.png
Uwe

Similar Messages

  • How to specify custom page size in points?

    Have done the usual searches and not hit anything.
    Has anyone worked out how to get the custom sizes in Print Setup… to be measured in Points?
    I have a job where I need to work to screen resolution.
    The two System choices are for Metric which oddly shows in mm when everything else is in cm, or US measurements which are in inches (at least they aren't cubits).
    Nothing I see will switch it to the most accurate, by pdf/PostScript standards, of showing the measure in points.
    I have a vague recollection of having done this years ago in an OS far, far away. Could have been OS9, Windows or Linux of some ilk.
    Peter

    Peter,
    I have looked at this again in Pages ’09, and via Page Setup > Paper: Manage Custom Sizes..., it will not let me override the inch measurements.
    Try this to get two decimal places. Double-click the mm value in the paper size to select all, and then just type your mm setting with two decimal places (no mm text designation) and then tab out of that entry window. The two decimal setting is retained.
    This is redundant knowledge, but here is the conversion fluff. Inches in Page Setup may need to be set to approximate closest points. In the Postscript (cough) world, the conversion is:
    1 Point = 0.01388888889 Inch
    And the calculator (with round option).

  • CR 2008 SDK: how to set custom paper size?

    Dear forum users, I'm trying to use Crystal Reports 2008 SDK to print barcode labels to a Datamax Printer.
    The printer uses a custom page size. Can anyone tell me how to set custom page size and margins using C# and CR2008 SDK?
    Best regards
    Alessandro

    I'm experiencing this problem: I need to print barcode labels which are 4 x 9 cm each (a custom paper size). The report has been build correctly, orientation is right but when I print the labels programmatically by an application I made the label gets printed in a wrong way.
    In particular, orientation and paper size are not correct.
    So I would like to try to force both of them (both the orientation and the custom paper size). How can I do that?
    Best regards
    Alessandro

  • Getting the page size in PDF file

    i want know how do get the page size in PDF file befor placing every page in document
    for example height=297 mm And width=210mm

    This script:
    http://indesignsecrets.com/zanelli-releases-multipageimporter-for-importing-both -pdf-and-indd-files.php
    answers all your questions.
    Peter

  • Custom Page Sizes - How to change from centimeters to Inches?

    Hello,
    I'm working on some panoramic prints to an Epson R2400 and I need to set up a custom paper size for printing to roll paper. When I select Custom Page Sizes from the Page Setup dropdown, all my measurements are forced into centimeters. Even if I try and specify it to be in inches when I type in the values, I get an error saying "Invalid Number" because of the " (in mark designation).
    And because the input box only allows two decimal places, I can't get accurate inches-to-centimeter conversions because the sizes I need are 3+ decimals when converted to centimeters.
    Searching on the web I've come across many pages with info on the Custom Page Sizes dialog box and the images show the values being set in inches, but I've found nowhere that says where you specify where I can change this default measurement?
    If anyone could help me, it'd be greatly appreciated!
    Thanks,
    Kristin.

    Answering my own questions.
    Because I'm Canadian, in Preferences -> International -> Formats I needed to change "Measurement Units" to "US" instead of "Metric".
    k.

  • How do I make a custom page size in Acrobat X pro?

    I downloaded a gigantic trial version of Acrobat X pro to create a full PDF book cover. I was
    unable to figure out how to make the program do anything at all. The help file and forums did
    not give me the information I needed. Eventually I was able to use 4 other programs in
    combination to create a .doc version of the cover but now I need to turn it into a PDF.
    Can somebody please tell me how to, or how to find out how to, create a custom page size in
    Acrobat X Pro and import a Word document into that page size.
    Alternatively perhaps someone could tell me where I can download an earlier, hopefully more
    usable, version of Acrobat.

    As you have discovered, Acrobat is not a creation or editing tool. It is a program to create a final archive of a document from another application that is readable on most platforms. There have been several tools added to Acrobat to provide more functionality for forms and such, but it was never intended for the creation process.
    Now that you have created your cover in WORD, an appropriate place to create it, you would simply print the page to the Adobe PDF printer. You should change the printer in WORD before the conversion and check the page to be sure that it is still what you wanted. This check is needed for versions prior to OFFICE 2007 that used printer metrics by default. Since OFFICE 2007, printer metrics have been turned off by default.
    If the page does not come out correctly (like is 8.5X11 letter or an A-4 page), then enter the printer properties before printing and set a custom page size there to match your WORD document. I assume the WORD document has the desired size. The printer property change is like putting the correct paper in the printer before printing. Sometimes it seems to sense the application setting, and yet at other times is seems to need to be set.

  • Getting the page size and knowing how many pages they are in PDF file

    Hi There,
    when i do this script (
    var myPDFFile = File.openDialog(["Choose a PDF File"]); ) 
    with JS via Windows it is used for opening a new PDF file when i import this file i need to
    get the page size and how many pages they are in PDF file. but i dont know how to do it.
    please help me.

    Ask here: http://forums.adobe.com/community/indesign/indesign_scripting

  • Adobe pro - print settings: How do i make a custom page size list, which i can copy to my other comp

    Adobe pro - print settings: How do i make a custom page size list, which i can copy to my other computers who have adobe pro installed?

    your right.. i ment acrobat pro :-)
    my problem is that i use the PDF printer to export CAD drawings as PDF´s.
    As it is now, there are some pre-defined page sizes in the print settings, and i know i can add custom pages manually one at a time.
    What i want is to copy the list of my danish standard page sizes, and use them on my other versions of acrobat.
    Its like 70 different sizes, and i have them made manually on my current computer, but i hope its possible to copy the list to other computers.
    Maby its some script where i can define the sizes, and then copy to another computer. Im just not that much of a computer genius :-)
    Hope i got through this without to many spelling mistakes...
    Thanks for helping.

  • HELP!!  I am having BIG PROBLEMS getting the Custom Page Sizes to work!!

    I am having a MAJOR challenge working with the Custom Page Size feature in Pages '09. My mom is working on a primer music book for publication, where the page size (for the printer) MUST BE 9" X 12"!! For some reason even though I have set the custom page size to 9" x 12", The document does not appear to have the proper proportions, (i.e. the ration of the width to height IS NOT EQUAL TO THAT OF A 9" X 12" DOCUMENT!!)
    HELP!! PLEASE!!
    Also, for some reason my Vertical Ruler has COMPLETELY DISAPPEARED!! My Horizontal Ruler (on top) is still there but there is no sign of the vertical one which is CRITICAL for aligning the of the content for publication!!
    I took an annotated screenshot of what the document that is +*SUPPOSEDLY 9" x 12".*+ But there is +*NO WAY THAT IT IS ACTUALLY 9"12!!*+
    I have also taken some screenshots of a few other Inspector Panels and other things that might help SOMEBODY to figure out what the problem is!
    _Link Title_ _Flickr Link_
    Front Cover Mock-Up http://www.flickr.com/photos/kmamusic/4085015686/
    Metrics Inspector Panel http://www.flickr.com/photos/kmamusic/4084236829/
    Layout Inspector Panel http://www.flickr.com/photos/kmamusic/4084235497/
    Page Setup Dialog Box http://www.flickr.com/photos/kmamusic/4084990178/
    Document Inspector Panel http://www.flickr.com/photos/kmamusic/4084231449/
    Annotated 9” x 12” Doc. http://www.flickr.com/photos/kmamusic/4084092849/
    I do hope that somebody can answer WHY I am having these problems

    Hi kmamusic
    Welcome to the forum.
    To show your vertical ruler:
    +Menu > Pages > Preferences > Rulers > check Enable vertical ruler in word processing documents+
    You are right the page does look slightly too high.
    The one thing you did not give us was a screen snap of the *Custom Page* you set up in *Page Setup…*
    This is what would dictate the actual page size.
    Peter

  • Cannot create PDF w/ custom page size in FM 9

    I just upgraded to the new Technical Communication Suite and cannot create a PDF from FrameMaker with a custom page size anymore. I need to create a PDF with a page size of 8.125" by 10.875", and have tried both Save As PDF and Print to the PDF driver. I followed all of the instructions on how to do so via the PDF printer driver's "Printing Preferences", Adobe PDF page size, etc. When that didn't work, I also tried Save As PDF with a custom page size ... still won't print to the custom size no matter how many places I specify it.
    My only way to get my custom page size at this point is to create the PDF and then go in and modify Document > Crop Pages > Change Page Size to Custom, and specify my size. This is clearly less than desirable.
    I am using FM version 9.0p 196. Any help/advice/suggestions welcome!

    Cindy,
    You should get the FM updates. There have been 3 patches released since the 9.0p196 version. Install them in order.
    Before creating PDFs, make certain that your default printer is set to the AdobePDF printer instance. The SetPrint utility from Sundorne helps ensure that this is always the case for FM, see http://www.sundorne.com/FrameMaker/Freeware/setPrint.htm
    In the Save As PDF dialogue, set the "Page Size" for the output on the Settings tab, as shown here:
    Set your PDF joboptions for the appropriate press requirements.
    Set your registration if required.
    Make sure the "Convert CMYK Colors to RGB" is set (the PDF CMYK generation is still buggy).
    Hit the "Set" button and you should get the correctly sized output.
    When you were creating the ouptut via the printer route, if you had set the "Generate Acrobat Data" option, then FM sets the document so that it is always cropped to the FM page size, rather than the printer specified output sheet size, in the final PDF. Omit setting this option and it should work via this route as well.

  • Set custom page size for printing

    I want to set a custom page size for printing some PDF three and four-page musical scores to roll paper on an Epson 1290 using Adobe Reader 9.3.4 on Ubuntu 10.04. The printer properties in the print dialog has a media size option, and one of the choices is "custom", but having chosen "custom", the dialog does not allow me to add the actual page size to the lpr printer command. I can see that when I choose "custom", the lpr command is
    lpr -P Stylus-Photo-1290 -o PageSize=Custom etc
    but what I need for a three page output, for example, is
    lpr -P Stylus-Photo-1290 -o PageSize=Custom.297x630mm etc
    and I can't see how to add the actual custom paper size. If I Ok the media size choice dialog with it just set to PageSize=Custom, I can see from the output preview in the print dialog that the actual page size that has been chosen is letter. The online Adobe doc for Reader 9 printing (http://help.adobe.com/en_US/Reader/9.0/content.html#heading2.3) says "For documents that are larger than the standard page size, go to File  > Page Setup.  Create a custom page size before you print your  document". The problem with that is that there is no "Page Setup" option on the File menu in the Unix version of Adobe Reader, only a "Print" option, which is where I already am.
    If I open the PDFs in Evince, it allows me to add the custom page sizes I want, but as Evince doesn't have the option to print multiple pages per sheet I can't use it either...

    Yes, it used to work, and the resize zoom bar used to work too (now its grayed out). I don't know if this is a "who's to blame for it" thing, but its not getting fixed and its pretty bad that no one seems to care enough even to respond. I found my own solution by opening it in Gimp. Just right click and select open with other ...Gimp and it will import into it. In the Gimp Print dialog, you have a scaling percentage in the "Page Setup" tab, and size settings in the "Image settings" plus loads of other stuff including multiple copies.

  • Custom Page Size Issues

    I just got a new computer (10.5.8) with the Adobe CS4 Suite and I'm having troubles printing custom page sizes from Illustrator to my Epson Stylus Photo 1280 (can handle oversized prints).
    When I was using my old system (AI 10) I could specify a custom page (say, 12"x12") and it would set the print margins according to my printer as well as print out exactly as it looked in the Print Dialog box. No problems.
    With CS4, I am unable to select "Custom" under the Media section in the Print Dialog box, and I can only get to my 12x12 page by selecting "Page Setup" and choosing my custom under the Paper Size drop down. When I build my custom pages, it gives me the option to put in "user defined" margins or to choose my printer. When I choose my printer, it sets all the margins to .00" instead of knowing the Epson's defaults like it used to. Regardless of what I type in, my prints are getting cut off even when they look centered and perfectly fine in the Print Dialog box.
    I'm at a loss. I recently updated my printer driver just to make sure it wasn't that, but I'm still having problems with the margins and the custom page sizes.
    I did have PowerRIP X when I was using my old programs, but I thought that was an issue that was resolved since 10.2. Is anyone familiar with these issues? Do I need to buy PowerRIP X again? I sure hope not (it's pricey!)
    Please help.

    I would copy and paste your entrie post and e-mail it to Epson.com/support/, adobe.com/support/, and apple.com/support/; there should be an easy answer to your problem.  That said, I wonder if the RIP would be the answer.  It shouldn't be.  From what I hear, Epson drivers are pretty robust.  Don't be surprised if they tell you to get a new printer.  I mean, come on, how many years do you expect to get outa that thing?  Chuckle, chuckle.

  • Help with custom page size support for non standard paper

    Firstly, we appreciate any support you may be able to provide, we have already thrown considerable effort at this and it has been very time consuming and frustrating.
    To support a number of business functions need to print to (non standard) continuous and mulitpart paper on a dot matrix printer. The (test) Mac is a 10.4.11 G4 laptop, the printer is an Oki Microline 520 (9 pin 80 column, IBM Proprinter, Microline or Epson FX personalities with a parallel interface) which has been networked via a HP JetDirext Ex Plus print server. That part appears to be operating correctly.
    We have tried a number of drivers / printer personalities with varying levels of success:
    ESP / EPSON 9-Pin Series CUPS v1.1 / Epson FX personality
    ESP / OKIDATA 9-Pin Series CUPS v1.1 / Oki Microline personality
    Ghostscript / epsonc / Epson Dot Matrix Foomatic PPD / Epson FX personality
    Ghostscript / ibmpro / IBM ProPrinterII Foomatic PPD / IBM Proprinter personality
    Ghostscript / okiibm / Oki Microline IBM compatible 9 pin Foomatic PPD / IBM Proprinter personality
    There were no appropriate drivers in Gutenprint (5.2.3 version) The most successful is the okiibm / Oki Microline IBM compatible 9 pin settings, it can print A4 and honors the Printer Features Resolution settings in the print dialogue.
    Q1: Should we see anything in the Printer Info / Installable Option, it is always blank ?
    The issue is custom page sizes, we can manage / add Custom Pages Sizes via the Page Setup / Paper Size interface and they draw on the screen OK but they do not work at the printer (various issue at the printer such error messages, junk printing and wrong orientation):
    Q2: Are we heading in the right direction or is there a better way to handle this ?
    Q3: Would 10.5 solve all our problems, are the print drivers any better ?
    Q4: Is this the correct way to specify custom page sizes, is this all we need to do ?
    Q5: Is so how do we get the driver to respect the size, do we need another filter or something ?
    Q6: Is it possible to add (by hand) custom page sizes to the ESP drivers or Foomatic PPD files so they they appear as a "standard" offering in the Page Setup / Paper Size interface ?
    Sorry for the long / complicated post and thanks in advance for any advice / assistance.

    Matt Broughton wrote:
    Testing on 10.5.7, Tried both Oki 9-Pin Series 1.3 / Microline personality (no joy) and Epson 9-Pin Series 1.3 (this is a much better driver than 1.1) / Epson FX personality but not much joy with custom page sizes,
    The Oki 9-pin Series 1.3 and the Epson 9-Pin Series 1.3 should produce the same results. The only difference in the PPDs is the printer model name.
    After some testing, I find that the output is not the same despite the two PPDs being virtually identical. I did spot in the CUPS source code for the rastertoepson filter that there is some model name matching for Epson printers. Thus I can see where the output using the Oki 9-pin PPD could be different than when using the Epson 9-pin PPD.
    but again once I imbedded the page size into the ppd some (but frustrating) luck. I can get it to respect the paper orientation and it prints well but I could not get the form length to work properly. At best over a print run of 7 labels it would creep up the label by about 0.1 inches / 2 mm.
    Just for the fun of it, I made some additions to the Epson 9-pin 1.3 PPD. All I can say is that I could print a job to file. I have no way to know what it would look like on paper.
    I did find that using a custom paper size did add some unwanted margins to the output bounding box. Putting the custom page size into the PPD seemed to get around that issue.
    I added the following lines to the Epson 9-pin PPD 1.3--
    <pre style="overflow: auto;font-size:small; font-family: Monaco, 'Courier New', Courier, monospace; color: #222; background: #ddd; padding: .3em .8em .3em .8em; font-size: 9px;">*PageSize Label1/Label1: "<</PageSize[288 107.8]/ImagingBBox null>>setpagedevice"
    *PageRegion Label1/Label1: "<<PageSize[288 107.8]/ImagingBBox null>>setpagedevice"
    *ImageableArea Label1/Label1: "0 0 288.00 107.80"
    *PaperDimension Label1/Label1: "288.00 107.80"</pre>
    This adds a paper size with the 4 inch (288pt) width and 1.5 inch (107.8pt) height. That represents the 1.4 inch label and the 0.1 inch gap between labels. I set 0pt margins except for the bottom where is set the 0.1 inch (7pt) gap as the bottom margin.
    The full diff in context is--
    <pre style="overflow: auto;font-size:small; font-family: Monaco, 'Courier New', Courier, monospace; color: #222; background: #ddd; padding: .3em .8em .3em .8em; font-size: 9px;">loki:~ matt$ diff -u /usr/share/cups/model/epson9.ppd ~/Desktop/epson9.ppd
    --- /usr/share/cups/model/epson9.ppd 2009-02-20 20:16:53.000000000 -0600
    +++ /Users/matt/Desktop/epson9.ppd 2009-06-06 20:37:06.000000000 -0500
    @@ -42,6 +42,7 @@
    *PageSize Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
    *PageSize A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
    *PageSize FanFoldUS/US Fanfold: "<</PageSize[1071 792]/ImagingBBox null>>setpagedevice"
    +*PageSize Label1/Label1: "<</PageSize[288 107.8]/ImagingBBox null>>setpagedevice"
    *CloseUI: *PageSize
    *OpenUI *PageRegion/Media Size: PickOne
    *OrderDependency: 10 AnySetup *PageRegion
    @@ -50,17 +51,20 @@
    *PageRegion Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
    *PageRegion A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
    *PageRegion FanFoldUS/US Fanfold: "<</PageSize[1071 792]/ImagingBBox null>>setpagedevice"
    +*PageRegion Label1/Label1: "<<PageSize[288 107.8]/ImagingBBox null>>setpagedevice"
    *CloseUI: *PageRegion
    *DefaultImageableArea: Letter
    *ImageableArea Letter/US Letter: "18.00 18.00 594.00 774.00"
    *ImageableArea Legal/US Legal: "18.00 18.00 594.00 990.00"
    *ImageableArea A4/A4: "18.00 18.00 577.00 824.00"
    *ImageableArea FanFoldUS/US Fanfold: "18.00 18.00 1053.00 774.00"
    +*ImageableArea Label1/Label1: "0 0 288.00 107.80"
    *DefaultPaperDimension: Letter
    *PaperDimension Letter/US Letter: "612.00 792.00"
    *PaperDimension Legal/US Legal: "612.00 1008.00"
    *PaperDimension A4/A4: "595.00 842.00"
    *PaperDimension FanFoldUS/US Fanfold: "1071.00 792.00"
    +*PaperDimension Label1/Label1: "288.00 107.80"
    *MaxMediaWidth: "1080.00"
    *MaxMediaHeight: "86400.00"
    *HWMargins: 18.00 18.00 18.00 18.00</pre>
    I don't know if that will help you or not. Let us know what sort of progress you make.
    Matt

  • Custom page sizes with HP DesignJet 500

    I work with Vectorworks 2008 ps2, and when I tried to plot to a HP Designjet 500, I can't use the Custom page sizes I've created, I have already deleted the plotter and reinstalled it with the Print and Fax preferences, but it didn't help, so please if anyone knows how to solve this matter let me know.

    Hello there,
    To get your issue more exposure, I would suggest posting it in the commercial forums since your product is a commercial product. You can do this at Commercial Forums.
    Enjoy your day!
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • Epson 3800 Custom page sizes using yosemite

    I upgraded to Mac OS yosemite a few weeks ago and PS CS5 crashes when I open the custom page size dialog. I've reinstall PS and made sure my driver was the latest version. Reinstalled the driver as well. This appears to be a PS problem because I can use this printer in other apps to create a custom page size. At least the problem the interaction between Mac OS 10.10, Photoshop and the driver. Any ideas? Is this a known problem?

    "One more thing" as SJ liked to say...  Yosemite has been tested with CS6, so why not download a trial and see if it plays well with your system. For CS5 owners, it's a $200 upgrade and probably affordable in your case.
    Get it here:
    http://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html
    Gene

Maybe you are looking for

  • Material document not created for scrap

    Hi all,            I am doing confirmation and goods  movement through Co11. When i enter more yield than planned and some scrap the goods movement are posted ,but there is no material document accounting for the scrap. Also after the final confirmat

  • How do I set Firefox to open new windows in a separate window (not in tabs)?

    How do I set Firefox to open new windows in a separate window (not in tabs)?

  • TS1398 error message says " unable to join the network"

    I have tried turning the wifi on and off, turning the ipod on and off, the forget this network option, and reset all network connections. It still gives me an error message. I have 5 other devices that are working fine. My network is showing full bar

  • Please help me in this program

    I'm having problem with geting the balls bounce appropriately when they collide in my bouncingball program.Can somebody give me an idea how to do it. The main problem I'm having is in order to collide two balls I need to compare two balls moving on t

  • Premiere Codecs

    Hello I'm having a problem with my Adobe Premiere Pro CS4 on my MacBook Pro 2.66Ghz. When I want to import a screen-captured movie fragment, I'm getting the next error: 'File Import failure: Codec missing or unavailable'. The fragment I want to impor