Outcome of the intention to create options

Hi all

I'm trying to check if a document has the intention set on the digital edition option and if no, create a new one that offers this option. I tried the script below, but that doesn't seem to work as expected. Any suggestions would be much appreciated!

Kind regards

Julian





function createDocument(){   
 


     
 


        
try{







            
// Check to see if a document is open; if not, create it under the catch


            
var myDocument = app.activeDocument; 


            
var myDocumentPreset = app.documentPresets.add();


            
myDocumentPreset.createPrimaryTextFrame = true;


           
 


            
// Check to see if the open document is meant for digital publishing. If not, create a new one.


            
if (myDocument.documentPreferences.intent != DocumentIntentOptions.DPS_INTENT){


                
var myDocument = app.documents.add({documentPreset:myDocumentPreset}); 


                
myDocument.documentPreferences.intent = DocumentIntentOptions.DPS_INTENT;


                
alert(myDocument.documentPreferences.intent);


                
}


           
 


            
}


       
 


        
catch(e){


             
var myDocument = app.documents.add({documentPreset:myDocumentPreset}); 


             
myDocument.documentPreferences.intent = DocumentIntentOptions.DPS_INTENT;       
 


             
}


    
}








I don't see a problem with the exception that you do not claim the function.

createDocument();

createDocument() {} function

etc.

}

I would suggest that you do not create the document preset until you need it, for example:

checkDocument();

function checkDocument() {}

try {}

myDocument var = app.activeDocument;

If (myDocument.documentPreferences.intent! = DocumentIntentOptions.DPS_INTENT) {}

myDocument = newDocument();

}

} catch (e) {}

myDocument = newDocument();

}

}

function newDocument() {}

var myPreset = app.documentPresets.add ();

myPreset.createPrimaryTextFrame = true;

var myDocument = app.documents.add({documentPreset:myPreset});)

myDocument.documentPreferences.intent = DocumentIntentOptions.DPS_INTENT;

return (myDocument)

}

Tags: InDesign

Similar Questions

  • When I select this option I get the dialog box 'Create image s system' but it cannot find any 'backup devices on this computer"and lists the error 0 x 81000036

    Error image system original title: windows 7 0 x 81000036

    I'm doing a backup system image.  When I select this option I get the dialog box 'Create image s system' but it cannot find any 'backup devices on this computer"and lists the error 0 x 81000036.

    I have an ESATA connection on my Dell laptop I was trying to make the image on.  I use the unit every day to save files and which works very well.  He just leaves me CCADE with the system image backup...

    any ideas?

    Hello

    ·         You have created a system image backup before that?

    ·         You did it changes on your computer?

    ·         Is your esata formatted NTFS drive?

    Try to save the image of the boot system: http://support.microsoft.com/kb/929135

    Note: make sure that you start the computer in normal mode after a repair.

    See also the linkfor more information about the backup: http://windows.microsoft.com/en-US/windows7/Back-up-your-programs-system-settings-and-files

  • Why I can't see the "named Columns (RTF)" option when I created layout of report?

    Hi all

    I want to creat state using the RTF presentation, but why don't I see the option 'named columns (RTF)'? I look forward to the "Oracle Application Express Administration Guide", but I can't find the key message. Help, please. Thank you very much!

    Hi Reema,

    ReemaPuri Answer totally irrelevant.

    Hi Jane,

    This is the case when your oracle apex is configured with APEX listener using the server of XSL - FO. You need to check this with the DBA team that what server they want the PDF reports to get generated to use the Oracle BI Publisher option, RTF and XSL both will be at your disposal.

    As you mentioned on the guide of Directors Oracle APEX, it uses BI Publisher as its print server, and therefore these options it.

    Hope this helps you.

    Sunil Bhatia

  • OSD-04010: < create > option specified, the file already exists

    Hi all

    I try to create controfliel watches from the rpimary database, but I get the error below. Please suggest

    SQL > alter database create controlfile as 'D:\Oracle\product1\10.2.0\test ';
    change the database create controlfile as 'D:\Oracle\product1\10.2.0\test '.
    *+
    ERROR on line 1:
    ORA-01580: error creating the backup control file D:\Oracle\product1\10.2.0\test
    ORA-27038: created file already exists
    OSD-04010: < create > option specified, the file already exists

    The 10.2.0.3 Basic version
    Windows XP

    Thanks and greetings
    Arun

    arundba wrote:
    Hi all

    I try to create controfliel watches from the rpimary database, but I get the error below. Please suggest

    SQL > alter database create controlfile as 'D:\Oracle\product1\10.2.0\test ';
    change the database create controlfile as 'D:\Oracle\product1\10.2.0\test '.
    *+
    ERROR on line 1:
    ORA-01580: error creating the backup control file D:\Oracle\product1\10.2.0\test
    ORA-27038: created file already exists
    OSD-04010: option specified, the file already exists

    The 10.2.0.3 Basic version
    Windows XP

    Thanks and greetings
    Arun

    You must give the full path and name of the standby database controlfile as

     alter database create standby controlfile as
    'D:\Oracle\product1\10.2.0\test\standbycf.ctl'
    
  • have forgotten the administrative password and the need to create a new

    have forgotten the administrative password and the need to create a new, but without knowing an old failed to create a new

    your options are explained here

    Change or reset the password of a user account from OS X - Apple support

  • Why the Adobe PDF Create add-in is no longer supported by 25 FF?

    I use 25 FF on Windows 7 Pro x 64 system. Recently, I did a reinstall of the OS and with it a reinstall of Firefox. After importing my old profile, I noticed that the Adobe PDF create button was missing. It is a very useful application in my daily work.

    Going to the Add-ons Manager, I noticed that the Adobe Acrobat - create PDF 1.0 add on is disabled in 25 FF. Why support has been removed for this?

    I tried to use another Add on PDF, but it caused the browser hanging and it had to be removed. Is there a reliable option to save a web page to PDF? (other than the use of a Mac).

    This means that the addon message must be updated to be compatible with the latest version, if this addon is essential, you can revert to a previous version.

    If the second section does not work, the foregoing applies.

  • Impossible to find in the Menu to create recovery media ThinkVantage programs

    Hi all:

    I'm doing a product recovery disc for my Type 8380 - 85U Thinkcentre. desktop computer.  The help file says to go to Start --> all programs --> ThinkVantage --> to create recovery media to do this.

    I did, but there is no option in the menu of ThinkVantage to create recovery media.

    I need to know what the real app is only the tip of the shortcut to.

    I called the Tech Support line and told to search for and download document Outphasing-67520.  I have done this and downloaded the Lenovo systems Toolbox which told me to provide me with the utility to create the recovery media.  I installed the Toolbox systems and create product recovery disc was not one of the functions that this app provides.

    Can anyone tell me the name of the file and if possible the location of the executable file that indicates the shortcut in the menu create recovery media.

    Thanks in advance for any help getting this done product recovery disc.

    Best regards

    Michael, W1RC

    Hi Netnubar:

    You WROTE:... the executable file is "RRMedia.exe".

    Thank you. You are right.  My problem is solved.

    Wonder why two of the IBM support people didn't know that.

    Best regards

    W1RC

  • Virtual PC/XP Mode is asking me my name & the password. I think it says XPMUser and wants to answer me with a password. I want to change the name and create a password. I have never created a.

    I have not created anything yet he keeps asking for a password and display name is XPMUser, I believe.  How I can change this option to create a password also.  My file is listed as XPMUser under.   c:/Documents and Settings/XPMUser I have this file.  Who has my name there instead and if so how to change the name and create a password?

    Thank you

    When you install Windows XP Mode, it automatically creates a user named XPMUser account.  If you want to use a different name:

    1. log in as that of XPMUser.
    2. create a new computer administrator account with the name that you want.
    3. close XPMUser.
    4 log in to the new account and create a password.

    You can then remove the XPMUser account if you wish.

  • Case of reunification in Windows 7 libraries: I wish that the library I created to display as the document library

    original title: folder in Windows 7 libraries

    The document library by default for Windows 7 includes two files.  When I select the document library, the contents of these two files is displayed in the right pane without grouping.

    I created a new library for myself and it adds files.  When I select that library, the contents of the folders that I placed inside appear in the right pane, grouped by folder.

    As far as I'm concerned. the grouping is just clutter, and I would the library I created to display as the document library.  Is there a way I can turn on and off grouping in the view "organize by folder"?

    I found the answer after I posted the question.  If you right-click in the free space (but not on any icons) in the pane right when a library is selected, you get a context menu that allows you to change the grouping of this component.  You can't have the same menu by right-clicking in the library in the left pane.  I have not found a way to change the grouping behavior using the diaglogs of folder options.

    I suggest that the list of tasks Microsoft must include an entry to add to the aid system so a search for 'group' and 'library' comes up with something related to the grouping in a library display.

    Thanks for the reply.

  • How can I check that my copies of my personal files are on the DVD backup created?

    Original title: backup (bssic)

    I always use the Basic (datasafe not updated) backup

    How can I check that my copies of my personal files are on the DVD backup created.

    Can I see a proof without actually deleting a file and try to recover the DVD

    I have no confidence with him at the present time, after seeing the various problems on the forum

    Hello

    Thanks to Mir... for explanations.

    I don't think I'm that close properly. I tried to shut down e-mail but think I did it without writing anything (what is now). I've been around all 22 replies and then got lost

    I bought today the local backup from dell datasafe (cleverbridge).

    I hope so, I'd be able to print all the 22 responses within the email (?) I would like to, instead of printing the current response only. I like being able to see things on paper, and not only within windows.

    These forums are a great idea.  DellConnect is not always the best method, I do not seem to 'chat' option for XPS laptop.

    Thanks again

  • When installing a new operating system isn't automatically wipe the hard disk, create a new partition, and then install the operating system?

    Have a Dell system, caught a virus and it has really messed up the PC. Recently, it got worse so I tried to reinstall the operating system with the Dell disks. It wouldn't work. So I bought for Windows 7 Professional, it will not be installed. My first question when installing a new operating system isn't automatically wipe the hard disk, create a new partition, and then install the operating system? Because this does the same as the Dell disks, is to take what is on the hard drive and put it in a folder called windows old, is not formatting the HD. When I boot the disk, it shows the installation of files then open windows and start the installation. Before he could finish I get an error missing or corrupted files. Tried several times now, windows will still not open. Any suggestions? Once while trying to install the pc crashed with a blue screen which is one of the reasons why I have reinstall the OS, he started to plant a few times. I don't remember all the details on my PC, but its 4 years, triple core coprocessors, ram 8 GB, 500 GB HD. At the same time just after all this started in Jan. I had also improved my 3 GB to 8 GB memory. I bought the Dell memory for my system. Since the crash, could there be a problem with these new memory chips? Last night I tried to disassemble each and reinstalling it, but that doesn't seem to make a difference. Before I tried to reinstall the operating system, the pc was see the concert 8.

    Original title: used to install Windows 7

    Disconnect any other (additional) internal hard drives and external USB devices.
    Look for any loose hard drive power or cables SATA, graphics card or other power cables.

    First run Memtest86 +:
    It runs from a floppy disk or CD and should eliminate or confirm if one or more of your memory
    sticks are bad or the values of the SPD in the BIOS are correct.
    Let it run for as long as you can: 2,4,6,8 or several hours (at least 3 full passes), so no errors at that time then your ram is OK.
    http://www.memtest.org/
    Memtest86 + Guide/How To (use the.) ISO to create a bootable CD)
    http://www.overclockers.com/forums/showthread.php?t=409152

    Hard drive test:
    If you do not know your readers of the brand and model, try "Speccy",.
    It provides information from the computer/system in detail:
    OS, CPU, RAM, motherboard, graphics, Hard Drive, optical, Audio, peripherals, network.
    Note: Option RAM indicates number of slots, DRAM Timing.
    Works your memory speed (frequency). The nominal frequency of your memory.
    http://www.Piriform.com/Speccy

    Test your player - create a Bootable CD:
    Ranging from 5 to 25% (depending on the make and model) new hard disks are defective.
    Note: Reliability of the drive hard has come the way down over the last 24 months and improved a bit lately according to manufacturing.

    Test your drive with the car manufacture utility.
    If you have a new hard drive Seagate the very next thing would be to download Seagate Seatools
    (bootable CD) and check bad sectors.
    SeaTools for information: http://www.seagate.com/support/downloads/seatools/
    SeaTools for Windows download: http://www.seagate.com/support/internal-hard-drives/enterprise-hard-drives/saturn/seatools-win-master/
    SeaTools for DOS download:
    http://www.Seagate.com/support/internal-hard-drives/consumer-electronics/LD25-series/SeaTools-DOS-master/

    For Western Digital readers to download the .iso from WdDiag file: http://support.wdc.com/product/download.asp?groupid=611&sid=30&lang=en

    Samsung Estool: http://www.samsung.com/global/business/hdd/support/utilities/ES_Tool.html
    Samsung Disk Manager software: http://www.samsung.com/Products/HardDiskDrive/utilities/shdiag.htm

    Hitachi Drive Fitness Test Software: http://www.hgst.com/hdd/support/download.htm#DFT
    Diagnostic tool available for use by customers who believe that having a brand Toshiba Fujitsu hard drive:
    http://SDD.Toshiba.com/main.aspx?path=ServicesandSupport/WarrantySupport/SoftwareUtilities

    Notice of Fujitsu drive management utility: http://www.fujitsu.com/us/services/computing/storage/hdd/

    Toshiba CD bootable: (BACK Diagnostic Tool version 7.0 for IDE/ATA/SATA hard disks)
    http://SDD.Toshiba.com/main.aspx?path=ServicesSupport/FujitsuDrivesUSandCanada/SoftwareUtilities#diagnostic

    Also check Home Edition free Partition Wizard option "Test of disc surface":
    http://www.partitionwizard.com/free-partition-manager.html

    J W Stuart: http://www.pagestart.com

  • What is the syntax to create segments?

    Hello

    segment can be created manually as table space? If Yes, what is the syntax to create the segment?

    Concerning

    The create table statement has a storage clause that is part of the clause of physical attributes.

    These clauses to define options for the creation of segment/measure. If you do not specify the storage clause, then the tablespace-level settings are used.

    Documentation of the CREATE TABLE statement

    Physical properties: https://docs.oracle.com/database/121/SQLRF/statements_7002.htm#i2126711

    {[deferred_segment_creation] [table_compression] segment_attributes_clause}

    [inmemory_table_clause] [ilm_clause]

    | [deferred_segment_creation] ORGANIZATION

    {Heap_org_table_clause BUNCH [segment_attributes_clause]

    | INDEX index_org_table_clause [segment_attributes_clause]

    | External_table_clause EXTERNAL

    }

    | CLUSTER cluster (column [, column]...)

    Segment attributes clause: https://docs.oracle.com/database/121/SQLRF/statements_7002.htm#i2214991

    {physical_attributes_clause

    | TABLESPACE tablespace

    | logging_clause

    }...

    {Clause of their physical characteristics: https://docs.oracle.com/database/121/SQLRF/clauses007.htm#SQLRF30011}

    [{ PCTFREE whole

    | Whole PCTUSED

    | INITRANS whole

    | storage_clause

    }...

    ]

    Term of storage: https://docs.oracle.com/database/121/SQLRF/clauses009.htm#CJACEJGB


    STORAGE

    ({ INITIAL size_clause

    | Size_clause NEXT

    | MINEXTENTS whole

    | MAXEXTENTS {integer |} UNLIMITED }

    | maxsize_clause

    | PCTINCREASE whole

    | Whole FREELISTS

    | FREELIST GROUPS around

    | OPTIMAL [size_clause |] NULL ]

    | USER_TABLES { KEEP |} RECYCLE | DEFAULT }

    | FLASH_CACHE { KEEP |} NO | DEFAULT }

    | ENCRYPT

    } ...

    )

    However, the create table statement lets you not create segments or extensions directly. New extensions are to be created initially (when the table is created) or later, when more space is needed for the table, usually after several insertions that filled the original measure.

    Also remember that SQL is a language of generation 4. But there is no need to go into details such as the management of use or storage. All that and managed by the RDBMS.

  • Why the path I create in Illustrator CC never rest in place?

    Is there a current bug in the tool path in Illustrator CC? I tried grid align, Snap Gird, Guides, snap to Guides, enabled all the Options to turn power on and off. No matter what I try to solve the problem, the way I create will not remain in the position that I place when adding properties. Adding an accident stroke to the path causes the path to awkwardly move in a random direction, mainly down. I won't 6400% zoom with the direct Selection tool and manually move the anchor points back on the guides/grids that I put up and as soon as I let go, the anchor returns to the position of the random pixel. IE - set the anchor of 400px and happen randomly to the 400.5px later. Nothing stays the place. It seems that any adjustment to the path will cause the path move randomly. It's extremely frustrating trying to keep things clean and precise. I spend more time trying to solve the buggy movements than to actually create my work.

    Is there a setting preferably I'm missing that causes this or is this a real bug?

    410er0r,

    Just to be sure: is to line up on the grid of pixels completely off?

    Otherwise, you can select the entire document and untick finally align on the pixel grid in the Transform palette and uncheck also align new objects to the pixel grid in the options of the Launcher. It is crucial that the checkbox is disabled completely, not just a - which also count as ticked.

    It may be noted that even align with the pixel grid is cleared with all the selected objects, align new objects to the pixel grid is checked as the creation of new objects will result in these new objects being aligned, even when they are created from existing objects that can happen with Pathfinder operations.

    You can avoid the types of documents with the default (RGB for the web and other) or change the default value for such documents.

    Here is a screenshot of exquisite made per ton in the first post:

    https://forums.Adobe.com/message/7841770#7841770

  • How to prevent the user to create the 'analysis' and 'dashboard '?

    We have a requirement that is to restrict the user create new 'analysis' and 'dashboard '. As we know when the connection ' host: port / analytical, in the top of the page there is a drop down list of 'New' where users can create new 'analysis' and 'Dashboard', how to set up the privilege to disable the option 'Analysis' and 'dashboard '?

    OBIEE version: Oracle Business Intelligence 11.1.1.7.0

    Thank you
    Jinbo

    Summary:

    1 set the "New Menu" permission in the 'home page and Header' refusal, then the 'New' menu will disappear from the top right of the page, which prevents the user to create dashboards and new anlysis

    2. in order to not allow the user to modify the catalog, set the permission of "access user interface of the catalogue"in the ' welcome and header' to refuse."

    3. even made 1 and 2, we have always have a path that the user can create new report, it's "House"menu." To avoid this, our method is to set the explicit right to catalog for the application role.

    Thank you
    Jinbo

  • Profile of supported lenses does not appear in the last subscription create Cloud for Lightroom and Photoshop.

    Hello

    I find it extremely frustrating. According to the last creative cloud Lightroom and versions of PhotoShop, what I use, namely F/2.8 Di VC USD A009E lenses from Tamron SP 24-70 mm F/2.8 Di VC USD A007N and TAMRON SP 70-200 mm are supported but when I load a photo RAW using these lenses and activate profile correction It is not found. If I choose it manually, it is still not found!  What I am doing wrong?

    I have a camera Nikon D750, and even that is not in the list. It seems that my lens profile database is obsolete. But how is this possible if I downloaded the last subscription create clouds?

    I also have a Samyang 14 mm F/2.8 lens. Not sure if this is taken care of. If someone could point me in the right place it would be greatly appreciated.

    Thank you.

    Hello

    Profiles of lenses are applied to raw files when the option is enabled. You can see the image that the Lens Correction is enabled or disabled.

    The Tamron will be there, the Samyang I don't know - check by flipping the switch on and outside, it will become quickly apparent.

    The list is for JPEG and TIFF files and does not apply to raw files, so don't worry.

Maybe you are looking for

  • My Firefox synced the 'wrong way' and I need to recover my favorites.

    Wednesday, I opened Firefox on my computer WORK (PC) after a long hiatus and he recommended I update Firefox since I hadn't used in a while. He said he would preserve all my bookmarks, etc.. Did, everything was fine. Yesterday I logged Firefox on my

  • bounced emails don't come back for me

    I send a lot of emails and to keep my lists of specific e-mail, I need to know which emails bounce for me. From the last 2 weeks that I don't get all bounced emails. I sent several tests of fake emails and they don't come back as well. What is the so

  • MP3 plugin controls not visible in Firefox 9

    I have some MP3 files on my site. When I browse the site in Internet Explorer, the files appear with the controls (play, pause, etc.). For a long time, they also worked in Firefox, but now that I've upgraded to Firefox 9, controls disappear. Correctl

  • whenever a new page is opened, the sidebar of history is too, showing all the sites I had visited

    Whenever a new page is opened, the sidebar of history is too, showing all the sites I had visited. My version of Firefox is updated 6.0.2 and I am on Windows 7. Thank you Lizzie

  • Icon problem - space between icons

    original title: icon problem... Please read this post I don't know what happened to my desktop icons. It appears like this > [IMG] http://i40.tinypic.com/244xs07.jpg [line] The problem is the spacing or gaps between the icons > [IMG] http://i42.tinyp