9 Replies Latest reply: Aug 20, 2012 12:06 PM by -hans- RSS

    Exporting graphics/images at full-resolution?

    jeffmlevy Community Member

      Good morning.

       

      So, I've got a series of indesign documents, all of which contain various different types of placed graphics; eps, png, jpg, ai, psd, and the like.

       

      I know that I can export these graphics from Indesign server, via script, by iterating allGraphics, or, splineItems, just to name a few.

       

      What I noticed, though, is that the exported file is sized to the frame it was placed in.  In other words, if I placed a 3000x2000 px jpeg into a 320x240pt box, did some fitting options on it (say, fill Proportionally), then the exported image will be just that, 320x240.

       

      How do I go about exporting these Graphics at full-resolution? IE: I want my exported PNG to be 3000x2000.

       

      Suggestions?

       

      Thanks.

        • 1. Re: Exporting graphics/images at full-resolution?
          Muppet Mark Community Member
          An odd way to use ID… Why not just collect them instead…? *.ai & *.eps may not have any given resloution so to speak…
          • 2. Re: Exporting graphics/images at full-resolution?
            stephen0218 Community Member

            If you placed a 3000 x 2000 px jpeg into InDesign, why not just use that image? Why try to export something new out of InDesign? Even if you are successful, you will typically lose quaity whenever you change the format or resolution of graphics data.

             

            If this is really a display quality issue that you're having, note that the graphics display quality is controlled by View > Display Performance > High Quality Display.  And make sure that you haven't lost the links to the original graphics ... see the Window > Links panel.

            • 3. Re: Exporting graphics/images at full-resolution?
              Muppet Mark Community Member

              The OP mentioned ID server ( i thought that was GUIless )… There are no ways to export *.ai or *.psd anyhows… Loop the links and copy the files as is…

              • 4. Re: Exporting graphics/images at full-resolution?
                jeffmlevy Community Member

                "An odd way to use ID…" -- That brought a smile to my face. Perhaps, odd, yes, but I've done worse, believe me.

                 

                There is a valid reason I have for not doing a collection, and pulling out the orginal assets/Links. I require them to be PNG.

                 

                InDesign server does a bang-up job at converting all EPS or AI or PSD files into PNG when I ask it to, but, it does so at a cost: It shrinks the exported/converted files to fit the size of their containing frames. Poo.

                 

                Here's a snipperoo of what I'm doing. Perhaps someone else has done the same, and figured out the full-size problem I'm facing.

                 

                 

                This is part of a larger script, I've trimmed fat for brevity

                 

                 

                (function(){

                    var graphicExportDir = new Folder(source.path+"/graphics");

                    graphicExportDir.exists||graphicExportDir.create();

                 

                    d.allGraphics.each(function(graphic){

                        // Can I do something, here, to get my pal InDesign server to export at full-res?

                        graphic.exportFile(ExportFormat.PNG_FORMAT, File(graphicExportDir+"/"+graphic.itemLink.name+".png"));

                    })

                })();

                • 5. Re: Exporting graphics/images at full-resolution?
                  Muppet Mark Community Member

                  Got to say… I think you are using a sledge hammer to crack a nut… Have you no other apps at your disposal?

                  • 6. Re: Exporting graphics/images at full-resolution?
                    [Jongware] CommunityMVP

                    > ..converting all EPS or AI or PSD files into PNG when I ask it to ..

                     

                    You are NOT asking that from InDesign. You are asking it to export "any object" to a PNG. ID simply renders the object at screen resolution and exports that. It has nothing to do with 'original' rez (which, as has been noted, is a meaningless concept for an EPS and AI anyway).

                     

                    Exporting as PNG is not limited to images; you can export anything as a PNG, from a single line and a text frame up to an entire page.

                     

                    It appears you are attempting to use ID to "convert" your images to PNG format -- well, there are lots of better programs for that -- and it's easier as well, up to and including setting its resolution. Photoshop can save PSD images as PNG at "their native resolution" when asked; for EPS and AI you can use Save For Web in Illustrator, and then you have to decide what its "native resolution" would be.

                    • 7. Re: Exporting graphics/images at full-resolution?
                      jeffmlevy Community Member

                      Yes, I have some other apps at my disposal, namely, ImageMagick. However, I don't want to use it. Notice the choice of words, "Want". I 'want' to do all my image processing on the indesign server.

                       

                      Anyway, I found a solution, which works perfectly.

                       

                      This is from a basic testcase, but obviously the code can be cleaned up.

                       

                      d.allGraphics.each(function(graphic){

                       

                          var path = graphic.itemLink.filePath;

                          var parent = graphic.parent;

                       

                          try {

                              graphic.remove();

                              parent.clearFrameFittingOptions();

                              parent.place(File(path));

                              parent.fit(FitOptions.FRAME_TO_CONTENT);

                              parent.graphics[0].exportFile(ExportFormat.PNG_FORMAT, File(gf+"/"+parent.graphics[0].itemLink.name+".png"));

                       

                           } catch (error){

                              alert("drink a beer.");

                           }

                      });

                      • 8. Re: Exporting graphics/images at full-resolution?
                        Muppet Mark Community Member

                        You drink beer on error… Now that's all wrong… Coffee n *** try again on sucess… Have a beer…

                         

                        Oooops… F A G ( different meaning in uk ) not allowed a cigarette then…

                        • 9. Re: Exporting graphics/images at full-resolution?
                          -hans- Community Member

                          Hi,

                           

                          until 5.5, don't know for 6.0, you can set export settings for jpg, swf, pdf, eps. here it ends up for graphics! Use one of them or switch to third party programms ...

                           

                          You may make use of bridgetalk to handle links of ID and send them to AI or PSD to keep InDesign Server involved ;-)