1 Reply Latest reply on Sep 24, 2009 7:58 AM by Peder280370

    Image conversion (tiff -> jpeg)

    Larsito Level 1

      Hello,

       

      I need to convert all linked images in the document to jpeg. I have found a solution to iterate over the graphics collection and export each one of them using the exportFile method:

       

      graphic.exportFile(ExportFormat.JPG,graphicOutputFileJPG, false);

       

      Then, I exchange the old images with the new ones:

       

      var link = graphic.itemLink
      link.relink(graphicOutputFileJPG);

       

      Basicly, this works fine. But the images have white borders. I believe this is because they only use a section of the original image, the clipped parts are then left white. However, I would like to either crop those white spaces or take the full size of the original image!

       

      I have looked at the PDFExportPreset Object that be specified in the exportFile method, but I was unable to indentify the setting that will do the trick!

       

      Thanks for any hint!!