Illustrator javascript save them to PDF - issue defining the values listed as a variable

Hello


I'm trying to figure out how I can use a variable as the target for a save as PDF option in Illustrator javascript. the work of fine variables where there is no value listed for the property that is opts.generateThumbnails but I can understand how to run opts.compatibility or other properties with the values using a variable as the definition listed.


Example code snippet below will always give an error "The enumerated value should" during the opts.colorCompression option even if the string is correct.

If I define chose him as opts.colCompression = compressionQuality.AUTOMATICJPEGHIGH then everythings works


Does anyone know how I can set the compressionQuality.AUTOMATICJPEGHIGH as a variable will work


TKS


Code snippet


OPTS = new PDFSaveOptions();

OPTS.Compatibility = PDFCompatibility.ACROBAT5;

opts.generateThumbnails = thumbnailValue;

opts.preserveEditability = editingValue

OPTS. Optimization = optimizationValue;

opts.colorCompression = colCompressionDefault;


default value is defined at the beginning of the script like: -.

var colCompressionDefault = "compressionQuality.AUTOMATICJPEGMAXIMUM";


Alert ("Options of Compression of color =" + opts.colorCompression);


for (x = 0; x < doc.artboards.length; x ++)

{


doc.artboards.setActiveArtboardIndex (x);

var artboardName = doc.artboards [x] .name;


If ((artboardName.match (/ ^ imprimé / i)))

{

opts.artboardRange = x + 1;

expFile = file (destFolder + "/" + "stringname" + "-" + doc.artboards [x] .name + ".pdf");

doc.saveAs (expFile, opts);      It is the privilege which fails

}

}


Close the open document

sourceDoc.close (SaveOptions.DONOTSAVECHANGES);

If you have information on how I should set...

I do it, I showed you how, in my previous post, Javascript is case-sensitive,

It does not exist

compressionQuality.AUTOMATICJPEGMAXIMUM

This is done

CompressionQuality.AUTOMATICJPEG2000MAXIMUM

Tags: Illustrator

Similar Questions

  • I have a new computer with Windows 7 Professional, Office 2007, Adobe XI. I just created a word document and tried save it in PDF format, but the PDF option does not appear in the menu dropdown. Any ideas please? Thank you.

    I have a new computer with Windows 7 Professional, Office 2007, Adobe XI. I just created a word document and tried save it in PDF format, but the PDF option does not appear in the menu dropdown. Any ideas please? Thank you.

    What is "Adobe XI" - Reader or Acrobat?

    But, "Save as Adobe PDF" is a function of Word, independent of this Adobe software, you have installed.

  • Save the value of a Boolean variable

    How can I save the value of a Boolean variable, so that when I open the file, it can be with the parameters in which I left?

    I created the variable to the top of the frame:

    var audio:Boolean = true;
    

    And I added the conditions for the buttons:

    if(audio == true) {
        Sound.play();
      }
    

    But whenever I open the application preferences is reset to true, wanted to leave with this preference be saved in the case of boolean, true (enabled) or false (disabled).

    can someone help me? Please, I beg you.

    Thanks in advance!

    A sharedObject is always appropriate for a local application. The only reason to use anything else would be size of storage needs.

  • How I have underlying wothout save documents or pdf files in the memory of the device inrernal, I have the files in the external SD card and I want to keep them there. I just want to be able to write about them. Thanks for the information

    How can I underlying without save documents or the pdf files in the memory of the device inrernal, I have the files in the external SD card and I want to keep them there. I just want to be able to write about them.

    Thanks for the information

    Hello

    When we try to edit any PDF file that is stored on a MicroSD card, then, first of all, the file must be saved in the internal memory to cause permissions defined by Android for external storage.

    Due to limitations set by Google in Android 4.4 and above, it is not possible to change files that are stored on the SD card in system no App.

    Thank you

    Abhishek

  • "Save as Adobe PDF" missing from the dialog box print from Mac

    I've just upgraded to a new machine, and the "Save as Adobe PDF" option is missing in the PDF menu in the print dialog.  I'm on Mac OS 10.8.3 and SC 6.  I think that Acrobat X is supposed to automatically install this option in the main print dialog box; What can I do to get it installed if he stays out of the initial CS6 displays?

    I don't think that the Automator application is obsolete. It works for me on two computers that are running the latest version of Mac OS X 10.8.3 and Acrobat Pro XI. Maybe there is a problem with Acrobat X Pro and Mac OS X 10.8.3.

    You can try to uninstall Acrobat X Pro and reinstall to see if the Automator application works.

    Additionally, make sure that you update Acrobat X Pro to the last update.

  • Defining the value of attribute inferred in analysis

    Hi all

    Given that I have under rules,

    It's nice if

    an and

    b

    As long as I have a lot of logic under A conditional and well tested.

    Now, I want to test the conclusion "it is beautiful" but I don't want to retype all THE related condition A Base attribute.

    How can I simply define A to be true and vary B conditional logic and test?

    Thank you very much.

    Update: It works in OPM cloud!

    I just tested and was able to set the value of an attribute inferred in What-If in the clouds of the OPM.

  • Dynamic action - defining the value of affected parts

    Hello

    I'm a little trouble trying to set the value of several items affected in dynamic Action (refresh the number of the part to Page 2). Page 2 I want the user to select the order number and fill in the items combines automatically, for example part number Descr. I can make it work for Part_Number, but the same value appears when I add P2_DESCR to items assigned to set the value. I'm probably doing something really stupid!

    http://Apex.Oracle.com/pls/Apex/f?p=11536:2

    Kind regards

    Mickey

    Hi Mickey,

    It is not as easy as it should be, even. You certainly do not make something stupid at all!

    Currently the action 'Set value' support only 1 distinct value. You might have other 'Action' within the same dynamic action that returns the other element you want, but it's inefficient, you need to make 2 round trips to the server to retrieve each value. We are looking for the opportunity to put multiple values without needing more trips to go back out of the box in a future release, but for now I think the best approach is to use a custom mix of dynamic measurements, JavaScript and a level of page AJAX callback.

    For this example, I use the EMP table, where the user selects the number and the name of the employee and employment are returned, but the technique can be used for your situation.


    1. Add a page 'AJAX Callback' called 'GET_EMP_INFO', make the type "PL/SQL" with a "Point of process" of "On Demand - run this process when requested by AJAX ' and add the following code:

      begin
          for c in (select ename, job from emp where EMPNO = to_number(:P1_EMPNO)) loop
           apex_util.set_session_state('P1_ENAME', c.ename);
              apex_util.set_session_state('P1_JOB', c.job);
              /* Add more set_session_state calls here if you want to return more item values */
          end loop;
          apex_util.json_from_items('P1_ENAME:P1_JOB');  /* Add more here for returning more values */
      end;
      

    2. Create a dynamic action "Advanced" (because we need to use the action "Run JavaScript Code"), with the following attributes:

      • 'Change' - to the fire of the dynamic action every time the number value used change event.

      • Selection of Type 'Article (s)' - to be able to select the element of page employee number.

      • Article (s) "P1_EMPNO" - the page employee number element.

      • Real Action "to execute JavaScript Code. If you want details on the loading of the page as well, make sure that the 'Fire when loading the Page' checkbox is checked. Add the following "Code":

        var get = new htmldb_Get(null, $v('pFlowId'), 'APPLICATION_PROCESS=GET_EMP_INFO', $v('pFlowStepId'));
        get.add('P1_EMPNO', $v('P1_EMPNO'));
        gReturn = get.get();
        json_SetItems(gReturn)
        get = null;
        





    So, basically, that's all. I recommend this approach for now, until better support us in native mode to set multiple values, or a plug-in dynamic action arises that does just that!

    Hope that helps.

    Kind regards
    Anthony.

  • Scan save them in PDF format

    I recently bought a HP 7500 E910

    I am trying to scan a document and save it as a PDF.

    Whenever I scan and save it, I opened the PDF document and that is to say the file has been damaged and there is a blank document.

    Any help?

    He recorded in a JPEG ok

    Nitro 6.2.3.6
    Tried with adobe and it works
    I'll try to update the nitro and see if that works, if not guess I'm using adobe.
    Thanks for you advice

  • Windows fax and scan save them in PDF format

    Original title - Windows fax and scan

    Forced to use the fax windows and scan instead of the HP Toolbox and cannot save a scanned as pdf document. Product of much less than the HP Toolbox. Any plans for windows of difficulty?

    Scanning to PDF is an advanced feature of the HP drivers / software.  Unfortunately, HP has judge do not allow this for your printer.

    You might be able to use the Windows fax and scan can install a "print to PDF".

  • can I remove the drm and save them in pdf format

    Hi I just got a book on google and then discovered that I need to install digital adobe to be able to read it offline. I use linux and now I can not read the book offline, unless I use a windows box... uh boring. Can I remove the drm, and save the book in pdf format, so I can read it on my computer laptop linux? Any help appreciated

    Found something... How to remove the DRM with Calibre ebook | TechRadar

    Need to recover the file with adobe waste, then install calibre so then install an addin for caliber to be able to open DRM shit and then save it as a pdf DRM crap. What a pain in the anus when I lost a lot of money to buy the book. That's why people just download the dubious in the first place? Now I can read the book I brought legit on my portable linux using calibre.

  • How do I select certain parts of web pages and save them in PDF format?

    fix my problem...

    It's all or nothing, and PDF is not useful for editing. Then find a tool to download HTML, change it to remove what you don't want and convert to PDF format. You can sort it to yourself.

  • How can I save/import a pdf file received the email on an Ipad in MyAssets (cloud creative) so I can edit it in Adobe Sketch?

    I need to edit pdf files (scanned) from different people, change in Adobe sketch and e mail the PDF with changes in return. This must be done using only an Ipad.

    The problem is that I can't do so only using an Ipad, because I do not know how to open the mail PDF in Adobe Sketch. So I need a computer to place the PDF in MyAssets on creative cloud first. I also installed dobe CD player and placed the file in the clouds of the Document, because I thought that the Document and the designer Cloud cloud would somehow between them. But no luck so far.

    If I ask someone who knows a way to do it, to explain it to me.

    Thank you

    Hi Lukearh,

    my penny on this issue. I'm starting to a point that the file is easily traceable. Like a sketch of a logo or something.

    The pdf file arrives on an ipad, right? So, open the PDF and take a screenshot of the file if it is open (which is done by clicking at the same time the sleep button on the top and the button on the screen of your ipad at home). Then you will have your PDF saved in your camera as an image.

    Once on film, then open adobe sketch and use use the icon to import an image second icon to the left, in the sketch menu, it looks like a picture with two mountains and the Sun). Resize the screen and work top of tracing.

    Now I could give you a very naïve solution, but the only way I could find to solve your problem if you really work on iPad only

  • Is it possible to import the same JavaScript document into several PDF documents at the same time

    I have a recurring project where I disable advance click into individual PDF by using a JavaScript document. Is it possible to import this script into several PDF files at once rather than having to manage it at the same time?

    You can create an Action that adds the script. Curiously, the Action would be a JavaScript that uses the doc.addScript () method.

  • error-could not define the value of the internal "HTML" property object is null or undefined code 0

    Cannot re - install the latest version of flash. I get this error during installation.

    Recently istalled Firefox, and had problems with the Flash plug-in. I uninstalled flash and re-installing trired

    Flash so he could work on every browser, now I can't get Flash back on my system.

    Windows Vista Home Premium 32 bit.

    Try to use installers off https://helpx.adobe.com/flash-player/kb/installation-problems-flash-player-windows.html#ma pars_text_4 line (under the heading always of problems?)

  • Issue using the presentation as filter condition variable in reports

    Hello

    I have a problem using the variable presentation as a condition of filter in my reports, the details are the following:

    Details:
    --------------
    We want to implement the Max and Min variable through variable presentation only.we are unwilling to apply it in this case through session variables.
    We have two variables MIN and MAX to be used as Variables of presentation, to a column of the report (which is a quantity), so that the user wants to see the data in this column in a particular range.i.e the Min and the Max.This part was well put in place. The question is when the user wants to see comprehensive data. In this case we will spend not all values of these two variables of presentation or in other words we do not limit the data in the report so we do not any value to the variables, it's when the report is throwing the error. We want to leave this empty variables in this case.but is in error.

    Please suggest how can I overcome this problem.


    Thanks in advance.

    Kind regards
    Praveen

    Hello
    Don't forget to assign points before closing the thread

    Thank you
    saichand.v

Maybe you are looking for