Activate a profile in Live Preflight - JS

I would like to activate an existing Live Preflight profile for the active document.
The code I have is:
var myDocument=app.activeDocument;
var ProfileName = "TestProfile";
var process = app.preflightProcesses.add(myDocument, ProfileName);
process.waitForProcess();
results = process.processResults;
But I get an error that the document is undefined, why?
Thanks,
Peter

Hi Peter,
You can generate the report if error found. Please see below code:
var myDocument=app.activeDocument;
var profile = app.preflightProfiles.add();
profile.name = "Test";
profile.description = "Test description";
const RULE_NAME = "ADBE_PageSizeOrientation";
var rule = profile.preflightProfileRules.add(RULE_NAME);
//Requires the page size to be 8.5 in x 11in (Letter Size)
//enters a value for tolerance
rule.ruleDataObjects.add("tolerance", RuleDataType.realDataType, 0.01);
//Sets the width  to the point equivalent of 8.5 inches
rule.ruleDataObjects.add("width", RuleDataType.realDataType, 612);
// Sets the width  to the point equivalent of 11 inches
rule.ruleDataObjects.add("height", RuleDataType.realDataType, 792);
//true = ignore orientation is checked
rule.ruleDataObjects.add("ignore_orientation", RuleDataType.booleanDataType, true);
//set the rule to return an error
rule.flag = PreflightRuleFlag.returnAsError;
//Process the doc with the rule
var process = app.preflightProcesses.add(myDocument, profile);
process.waitForProcess();
results = process.processResults;
//If Errors were found
if (results != 'None')
    //Export the file to PDF
    //The “true” value selects to open the file after export.
    process.saveReport(File("~/Desktop/preflight.pdf"), true);
Shonky

Similar Messages

  • A way to activate ICC profiles for all applied images

    Hi there!
    I think there should be an option in InDesign to activate the ICC profiles for all the applied images.
    For those who work with PDF/X-4 and a Workflow-based Color Management, it's very important to take the images' profiles into account.
    I tried and tried, but could not find a way to make it all at once in InDesign.
    Today I have to change the color settings so the INDD's profiles won't match the Color Settings' one, and then open the INDD choosing "Activate All Profiles" on the "Profile mismatch" window.
    It could have an option to choose to activate only the CMYK or RGB profiles and even choose what profiles to activate or not.
    Who would agree with me?
    Tiago Cheregati

    First of all thanks for your help, Dov.
    I may be wrong, but from the tests I made, the image's ICC profile is honored only if the InDesign Color Settings CMYK field is set to "Preserve Embedded Profiles".
    If, at the moment that you place it, Color Settings are set to "Preserve Numbers (Ignore linked profiles), InDesign will "forget" the ICC, and won't send it to the PDF/X-4 even if you ask him to.
    Now, I don't remember which is the default option for InDesign's Color Settings, but we receive a lot of .indd files (most of them books) whose images are profile-ignored. And then either we change it one-by-one or we assing another profile for the .indd, save, close, open it again and ask him to "re-enable" the profiles in the Profile Mismatch window. As I mentioned above.
    So, in response to your question, I wanted InDesign to offer live control to these options, so I can send to the PDF what I really wanted in an easier way.
    Again, I may be standing on a wrong supposition.
    Of course our heads together will think better than one.
    Best wishes,
    Tiago Cheregati

  • Incorrect Page Size or Orientation Error Detected in Live Preflight

    Wednesday, November 10, 2010 12:16:40 PM PST
    I am trying to prepare a newsletter created in Adobe InDesign to send to a Printer in Germany.  This is the first time I'm sending a document to press since moving to Germany last February and the first time since upgrading my computer and software to:
    MacBookPro: Model 5,3
    Adobe InDesign:  ver. 6.0.6
    Adobe Acrobat Pro:  ver. 9.4.0
    The standard paper size in Europe is "A4" , slightly larger than our "Letter" size. Document was set up an "A4" document size. A4 is also selected on the Print menu.
    Live Preflight shows "incorrect page size or orientation" and says:
    Required: 612 pt. x 792 pt.
    Current: 595.276 pt. x 841.89 pt.
    Fix: Choose File/ Document Setup to specified required page size.
    I tried changing the document setup to the "required" 612 x 792, and the document was squeezed into the smaller space, ruining the document formatting! I undid the damage and looked further for the incorrect preference setting.
    There is a wrong setting somewhere, but I can't find it.
    Distiller is rejecting the document and won't generate a PDF. The only other errors detected in Preflight were RGB color space issues.
    All settings in InDesign Preferences, Print Menu and PDF generator are set for the size A4, yet Preflight insists that the Document
    Size and Orientation are incorrect and suggests changing the size to 612 pt. x 792 pt.
    I also noted that when setting up the PDF, I did not check "Optimized for Fast Web Viewing," yet when I generated the PDF, it "Optimized for Fast Web Viewing." It seems that there is some preference somewhere that is overriding my selections. But where....?!
    I was able to generate a PDF from InDesign (without going through Distiller) and the printer was able to use the PDF.  I was taught to always use Distiller when submitting files to printers, and to "package" the files.  Is there some risk in sending files without using Distiller?
    In addition to the page size/orientation issue, Europe has different standards for color space and printers' ink also. If anyone could shed some light on how I should adapt to European standards, I would be grateful.
    I was disappointed that Adobe offered only paid support, although I purchased Adobe CS4 less than a year ago. For such an expensive
    product, I would think free support would be available for at a minimum one year.

    Yes, Preflight was looking for letter size and created a conflict with my page size/orientation selections in the document setup and print setup.
    No, this didn't resolve the problem keeping Distiller from making my PDF.
    Here is the message Distiller gave when it rejected the file:
    Distilling: 12_REVISTA_INFORMATIVA_07.indd
    Start Time: Saturday, November 13, 2010 at 6:36 PM
    Source: /Users/bethshaw/Desktop/DOEBRICH NEWSLETTER/12_DESIGN/12_REVISTA_INFORMATIVA_07.indd
    Destination: /Users/bethshaw/Desktop/DOEBRICH NEWSLETTER/12_DESIGN/12_REVISTA_INFORMATIVA_07.pdf
    Adobe PDF Settings: /Library/Application Support/Adobe/Adobe PDF/Settings/Standard.joboptions
    %%[ Error: undefined; OffendingCommand:   Ìıÿ FÂΩ1ÔÁ˛t∑ DOCUMENT p  ]%%
    %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
    %%[ Warning: PostScript error. No PDF file produced. ] %%
    Distill Time: 7 seconds (00:00:07)
    **** End of Job ****
    Does every criterion set in Preflight have to be fulfilled for Distiller to work?  How do I isolate the problem keeping the PDF from being created?

  • [CS4 JS] Live Preflight

    Hi,
    The following is part of script which checks to see if there are any errors in the Live Preflight before continuing with a PDF export.
    var myPreflight = app.preflightProcesses[0];
    var myReport = myPreflight.processResults;
    myReport = myReport.replace(/\s+$/,"");
    if (myReport == "None")
    My problem is that this script doesn't distinguish between the Preflight for the current document and that for any other document that may be open. I assume it is using the FIRST Preflight process created which will not always be for the current document.
    Is there a way to reference the Preflight for the current document only? Searching for "Preflight" in the Object Model Viewer in ExtendScript Toolkit bring up No Results.
    Thanks,
    Skempy

    var myPreflight = app.preflightProcesses[0];
    var myReport = myPreflight.processResults;
    myReport = myReport.replace(/\s+$/,"");
    if (myReport == "None")
    My problem is that this script doesn't distinguish between the Preflight for the current document and that for any other document that may be open. I assume it is using the FIRST Preflight process created which will not always be for the current document.
    Is there a way to reference the Preflight for the current document only? Searching for "Preflight" in the Object Model Viewer in ExtendScript Toolkit bring up No Results.
    maybe you should check this "array":
    Property AggregatedResults As Variant
        read-only
        Member of InDesign.PreflightProcess
        The aggregated results found by the process. Type: Ordered array containing DocumentName:String, ProfileName:String, Results:Array of Ordered array containing ParentNodeID:Long Integer, ErrorName:String, PageNumber:String, ErrorInfo:String, ErrorDetail:Array of Ordered array containing Label:String, Description:String
    or maybe you should set PreflightScope - to your Document - in PreflightOptions:
    Property PreflightScope As Variant
        Member of InDesign.PreflightOption
        The pages or documents to preflight, specified either as an enumeration or a string. To specify a range, separate page numbers in the string with a hyphen (-). To specify separate pages, separate page numbers in the string with a comma (,). Type: idPreflightScopeOptions enumerator or String
    robin
    www.adobescripts.co.uk

  • Unable to activate Client Profile within Client-Based Groupware Integration

    Experts - Please help us!
    We are trying to activate a new Client Profile wiithin Client Based Groupware Integration. We are receiving an error message that 
    "Multiple profiles not allowed for same role, country, language combination."
    We believe we are receiving this message because there was an incomplete profile already saved in this table. We can not move forward without completing that record, however it is not editable for us.
    Has anyone run into this problem before? Any ideas how we can move forward? I would appreciate any information anyone is able to provide.
    Thank you!
    Jami Shircel

    I have one idea If you want to do this for your future records then you should create a specific transaction type meant only for GWI and assign it to groupware spro settings and that transaction type should not be used from SAP CRM WebUI. In this way all the appointment/task created in Outlook have that special TType and can be differentiated from others. Will that be of any use ?
    Rgds,
    Shobhit

  • How to activate this profiling function

    Hi Pros,
          I can't use profiling function, because it is greyed, do you know how to activate this function?

    Hi,
    what do you mean by profiling Function. Is it BODS column Profiling?.
    If you want to BODS profiling, 1st you should you need to login in profiling server.
    Steps:Tools-->profiler server login-->give user name and Pasword then you can select the profiling repository
    Pre Requisites:  Profiler repoistory should be created 1st.
    Thanks,
    Deepa

  • How to activate authorization profile in ERP 6.0

    Hi,
    Could you give me a hint please.
    In ERP 6.0 system, I copied a authorization profile from &_SAP_ALL_13, and changed it.(saved successfully)
    But clicking activation, message "Unable to activate, authorizations missing: ..." is shown in pop-up.
    What happend in this process.
    In R/3 46C system, such a message is not shown.
    authorization profile activation process changed in ERP 6.0?
    I did following actions;
    T-CD: SU02
    - Profile: &_SAP_ALL_13 / With any options off  -> Create work area for profiles
    - -> Copy Profile
    - Copy profile From &_SAP_ALL_13 To Z_SAP_ALL_13 -> Execute
    T-CD: SU02
    - Profile: Z_SAP_ALL_13 / With any options off  -> Create work area for profiles
    - change some objects in the profile (include delete line) -> Save -> Activate
    regards,
    Katsumi

    Dear Katsumi,
    Go to change authorization data and check weather every node is in green.If not expand every node and check anything in yellow or red that should come in green.Then generate that profile Shift+F5.
    Now after generating your profile make sure to click on User Comparison.
    Also there might be a possibility that user must not be having enough authorization.In that case :
    From the user login wherever this message authorization faliure is coming type /nsu53 and see for missing authorization.
    Now go to your login(considering that you have full authorization) use tcode PFCG and role in which use tcode is residing.Add manually the missing object which reflects on the SU53.Again generate and make user comparision.
    Now come back to user login and again try .If that is still not coming repeat the above 2 steps.
    Regards,
    Ashutosh
    Edited by: ashutosh singh on Aug 13, 2008 7:53 AM
    Edited by: ashutosh singh on Aug 13, 2008 7:54 AM

  • Question about "missing glyph" error in CS4/CS5 live preflight

    Hi all
    Basically I'm wondering what the "missing glyph" error refers to specifically and what are the implications of such an error. The help file doesn't mention it, as far as I can see.
    I have some PDFs (from WordPerfect) which are causing this error when imported into Indesign. I think the pages which cause this error have been corrected with a PDF editor (Iceni Infix) but Acrobat reports all the fonts are embedded and subsetted. A third-party preflight programs reports everything is okay too.
    Am I safe to ignore these errors?
    thanks,
    Iain

    I'm not sure "Missing Glyph" picks up missing glyphs in PDFs. What does ID point to when you click the page number hyperlink in the Preflight panel?
    If you have missing glyphs in your document text, they will look something like this:
    -- then again, perhaps you cannot see the pink highlight because of background (an image) or foreground (another character 'on top of it', or perhaps even a graphic over the text).
    How serious this is? It's ... critical! As you can see in my image, the only thing InDesign can do is notify you with the pink highlight and temporarily insert the font's own "missing" image (which may be a rectangle, a question mark, or even just a space).
    Fortunately, if you do need the character, all you have to do is change the font (for those characters only) to one that does contain the missing ones. You'll have to try all your system fonts before you find one that does and matches the rest of your text as well :-)
    There are a few special cases where InDesign gets it wrong, though. The Symbol font, for example, might not get imported correctly from Word, and in that case you have to manually change the character -- i.e., find the correct one in the Glyphs panel and insert it from there. There is also the Strange Case of the Invisible Marker: InDesign thinks there is something but if you check against the original Word file, there is nothing. This will usually insert a character code U+FFFD; you can safely delete them.

  • Aggregated results from Live Preflight - AS

    This code in AppleScript worked fine in CS4, but produces an error in CS5. Any idea why?
    set PreflightResultsList to aggregated results of preflight process i (with i the number of the preflight process that was run)
    Thanks,
    Peter

    Anyone?

  • How do i register my profile if i live outside the US

    I bought on ebay an unlocked GSM Palm pre plus but cant get it to register my profile. i live outside the US. and where i tried to do it i have both GPRS and Wifi...Can anyone give me some help.
    Post relates to: Pre Plus p100una (AT&T)

    Unless I am mistaken, you have to register the phone over a cellular data connection (2G or 3G).  Once you get it registered, you can use it on WiFi after that.

  • Problems Import Preflight Profile

    Hi guys,
    A friend of mine who works at doing Pre-press adjustments sent me a Preflight Profile .kpf file. I uploaded the file at
    http://dl.dropbox.com/u/641112/dani%20perfil%20imprenta.kfp
    The profile was made with Acrobat Professional 9 for Windows. I tried to imported with Acrobat Pro 8 for Mac and i have a sign that says error. I just create a TEST Preflight profile from my Acrobat 8 for Mac and Imported perfectly on my Acrobat 8 for PC.  I just wondering if the problem is a Acrobat 9 to 8 compatibility issue or the original .kfp file is damaged.
    Can i open the profile with any other software and save it as again? Any help or ideas?
    Cheers,
    S

    That seems to be an ICC profile - a colour profile, NOT a preflight profile.

  • Profile parameter.....activate

    Dear all,
    After Ecc 6.0 installation......we want to activate one profile parameter na  in RZ10, RZ11. Can anyone guide me how to activate that profile parameter, give the profile parameter name also..... Thanks in advance

    Hi Harish,
    To activate the profiles please do the foll:
    Go to t.code RZ10 and enter the profile name you want to activate, use the pushbutton to display profiles that are available then choose the profile and activate it. Stop and restart the SAP instance for the profile through CCMS.
    ABAP program RSPARAM helps you to find out the Parameters which are active for a given SAP instance.
    Hope it helps.
    Regards,
    Raghu

  • Error in activating status profile for SVT

    Hi,
    I've been trying to activate status profile EHS_SO for SVT in REACH compliance version 2.0 . But I am stuck.
    When I save a sales order, a message-'Error when activating status 0001 for status profile EHS_SO in order XXXXXX' has come up. My IMG settings are as follows:
    Sales documentr: No existing status profile used
    Status profile: EHS_SO added with status SD
    Environment parameter:SVT_SO_PROFILE: EHS_SO
                                          SVT_SO_STATUS: 0001 used
    Activate Status profile: STUCK (can't figure out the object type for VBP object type category)
    Does anyone know?

    Hello Bomi,
    Please see SAP note # 1111196. It talks about Status profile for sales order and status profile for production orders for online check for SVT.
    May be useful to you.
    Regards,
    Niraj

  • How to generate profile create in SU02

    Hi expert,
    I had just create a profile in SU02 and i already activate it.
    But still not been generate and there was no black button under Ty. column in SU02.
    Is there other tcode to generate profile?
    Please advice and my sap system is ver 4.0B.
    Thanks
    regards,
    ng chong chuan

    Chong,
    As Alex mentioned - when you are creating profiles manually there is no generation of profiles involved.
    When you are in SU02 and enter the profile name and press enter you come to a screen that says "Profile List", there you click on the create icon (F6) and then when you add objects in the next screen "Maintain Profile", you first need to activate the profiles in this screen and then use F3 to come back to screen 1"(Profile List) and activate again........

  • Preflight Help in InDesign CS5

    I am having a problem in InDesign with image errors in the preflight. It says, "content generates cyan, magenta, or yellow plate", it then says I must fix them to a CMYK. The company I am designing this for requires I use RGB images. So, my question is this, do I have to change these images, or are they fine in RGB? If not fine in RGB how do I fix them and what will this do to the fact that they need to be RGB?
    Thanks so much,
    Carmella Mae Dunkin

    That's only an issue if you are printing using Black ink only. Preflight presumes that you are going to print on a press where you have only CMYK and Spot inks available, so your RGB images would need conversion at some point in time. That conversion can be done before placing, during export, or in the Printer's RIP. This makes it not terribly helpful for RGB workflows as it won't differentiate between RGB conversion and "real CMYK" when looking at the sparations (plates) that would be generated.
    Below that check is one called Color Spaces and Modes Not Allowed that you could use to flag anything that's really in CMYK, but this is going to generate even more "errors" since everything defined as [Black] is in CMYK mode. It is safe to ignore those warnings, too, unless they apply to an element like a graphic or image that must be RGB (this is really the only way I know for Live Preflight to kick out warnings about CMYK images in an RGB workflow). The old preflight is still there (the first screen in File > Package is really the old Preflight), and it will list images, along with their color spaces, but won't tell you about native objects created in ID.
    The bottom line here is if your printer asked for RGB images, that's what you should send. All will be fine.

Maybe you are looking for

  • X-Fi XtremeMusic: Linux beta driver crashes on kernel 2.6

    First i uninstalled the X-Fi drivers, then i updated my kernel to version 2.6.26 and did a new install of X-Fi drivers. Installation was successful, but while booting i get some oops messages. Is it possible for me to fix this? And how long i have to

  • Show clickable icon in list instead of URL

    Hi there, I have a SharePoint Online list containing a hyperlink field. When users view the list, they see the full text URL for the hyperlink. I'd like to replace that hyperlink with a small icon, so that users do not see the URL, but can click on t

  • File Location in Folders

    When I add a file to an existing or new folder, that file goes to the bottom of the folder out of view, and the folder has a very long scroll bar. That file can be dragged up next to other files near the top of the folder. Or the files in the folder

  • Keyboard navigation with left right keys for a ring

    Hello, is it possible to use the left/right keyboard keys to control a ring? They do not appear in the keyboard-navigation properties. It has to work that way, that I can move with the keys through the ring-entries and select the desired entry with <

  • QuickTime export suddenly no longer works.

    Hello, We recently upgraded our new studio equipment from Final Cut Pro to Adobe Premiere Pro CC 2014 on a brand new, latest edition Mac OS. We have had a handful of problems but most I have been able to work out. However, this recent one has me stuc