2 Replies Latest reply on Nov 7, 2011 12:29 PM by Liphou

    [JS] unzip to idml ...

    Liphou Level 1

      Hello,

      Is it possible with JS to unzip a file. DOCX, IDML, ePub, and so on. (control terminal?) (Mac OS X 10.6).

      AND zip (rebuild) the file IDML?

      With all the JS?

      thank you

      translation

       

      Bonjour,

       

      Est-il possible avec JS de dézippé un fichier .DOCX, IDML, ePub et etc. (pilotage terminal?) (Mac OS X 10.6).

       

      ET zippé (reconstruire) le fichier idml?

       

      Tous sa avec JS?

       

      Merci

        • 1. Re: [JS] unzip to idml ...
          absqua Level 4

          For IDML, you want to use app.unpackageUCF() and app.packageUCF(). The .idml archive has to be put together in a specific way (see the IDML Cookbook in the SDK), and this makes using generic zip utilities a little tricky.

           

          I don't know if .docx or ePub files have similar constraints, or if they can be straightforwardly zipped and unzipped. Hopefully someone else here knows.

           

          See this thread about using a pure JavaScript zip library. (I would call out to a system utility using Applescript rather than use that though.)

           

          Jeff

          1 person found this helpful
          • 2. Re: [JS] unzip to idml ...
            Liphou Level 1



            OK great for app.unpackageUCF () for file. IDML,. Epub and. Docx.

            For app.packageUCF (): ok for. IDML and epub for docx make a mistake in the opening word corrects and goes!


            But most important is the opening. Docs. IDML and redo the IDML.

             

            Translation from French

             

            Traduction du français

             

            OK super pour le app.unpackageUCF() pour les fichier .idml, .epub et .docx.

             

            Pour le app.packageUCF(): ok pour .idml et epub pour le docx fais une erreur à l'ouverture dans word il corrige et passe!

             

            Mais le plus important c'est l'ouverture du .docs, .idml et de refaire l'idml.