Export PNG error:

I want to export my *.indd in PNG. I tried the following code:

function ExportPNG("/c/test)
{
    try
    {
        app.activeDocument.exportFile(ExportFormat.PNG_FORMAT, File(filePath + '.png'));
    }
    catch(e)
    {
        alert(e);
    }
}

However, I get the following error:

Error: The specified object does not support the desired export format.

How can I fix?

Fix. myObj is an instance of pageItems (in the plural), and you can not export those. You probably meant it

myGroup.exportFile(ExportFormat.PNG_FORMAT, File(filePath + '.png'));
myGroup.ungroup();

but you must keep in mind that Javascript is not good to do what you really want to do, he can't do what you tell him...

Tags: InDesign

Similar Questions

  • How to export PNGS with 300 res using Applescript

    How to export PNGS with 300 res in Applescript

    I want to copy an art and paste in the new document and export in PNG to the location on the desktop & file name should be my previous doc were I copy file form. and the saved file must be filename_PNG.png

    the value ((path to desktop) saveLocation as string)

    Tell application "Adobe Illustrator"

    If not then turn on

    If (County documents) > 0 then

    the selection from the active document selectedItems value

    If selectedItems is not {}, then

    copy

    the active document color space the color value

    do the new document with properties {color space: color space}

    dough

    end if

    end if

    tell the end

    Tell application "Adobe Illustrator"

    tell document 1

    the value visible limits SelectedArt

    the rectangle value Board chart of the artboard 1 SelectedArt

    export the current document for the file newFilePath as PNG8 ¬

    with options {class: PNG8 export options ¬}

    , color County: 64 ¬, ¬ reduction: web color

    , ¬ dither dither: color model

    , prevaricate for cent: €50

    {interlaced: true}

    close the document assets registration No.

    tell the end

    tell the end

    You will need to set the 416,67% (both horizontal and vertical) scale. Default export at 100% will give you a 72 dpi PNG.

  • Illustrator for the Export PNG - without Anti-Aliasing/Bi-cubic interpolation

    There is something missing when you export PNG images in illustrator (file > export) so when the images that have been resized in illustrator get exported, get no not a subsampling anti alising/correct treatment.

    It is a scaling in illlustrator to 88% of the images. The first Image is a PNG export , while the second image is saved through Save for Web... the difference between the qualities of anti-aliasing is obvious:

    export.png

    save.png

    It is important to note that export a JPEG file and choosing 'Art optimized' in the anti aliasing tab gives deirable results but such an option does not exist when exporting png.

    Screen Shot 2013-07-04 at 3.54.05 PM.png

    ERMM...

    You sure?

  • Area to export PNG is not identical to the artboard

    I created a work plan at a certain size. I put some objects in the artboard. But the exported PNG is not the size of the artboard, but is only the size of the graphics on the artboard.

    As expected? Seems wrong.

    You use the use the work plan in the export png dialog box

  • ColorSync does not export png or jpg tiff after update to iOS 10.11.3

    Using ColorSync:

    Completed the update to iOS 10.11.3 yesterday, but acknowledged that, after the update, I have one more no *.tiff export *.jpg or *.png files.

    Many options for export has disappeared, that shouldn't be a problem, because the format png and jpg still appear in the list of options. But once I chose one of them I get an error if the name of the original file and the name of the export file are the same.

    Example:

    Open hearst.tiff in ColorSync and choose Save as.

    In the menu next, I clicked on "hearst" to use the name, but now I said "could not export the document.

    Looks like it was already possible to choose a file name by clicking on a file without actually replacing the existing, if the file type has been changed.

    What do you mean "using ColorSync"? Do you mean "color synchronization utility?

    Why would you use to convert an image file to another format? Preview is the default application for this.

    Utility color synchronization is not an image editor; It is intended to manage color profiles to ensure accurate reproduction of colors on different screens.

    Overview of the use.

  • iMovie Export / share error

    I used Mac for more than six years and created more than 100 iMovie on four different Macs.  I'm certainly not a professional, but do consider myself a novice more either.  Recently, I created three movies using iMovie.  With each one, I get the following error when I try and share/export the movie.

    The operation could not be completed. (error com.apple.Compressor.CompressorKit.ErrorDomain - 1).

    I have already created many films, using iMovie, on this computer.

    I "moved" the project to final cut pro and received the same error message.

    :-(

    Any suggestions?  I don't know where to go from here.

    Thank you

    Maybe some clips are corrupt, and you can check for this, although probably not on three different movies.

    I thought maybe that the clips were shot in 50 images per second that iMovie does not have 50 images per second, but I don't know if the CPF can return

    Your destination drive has enough space?

    I hope others will weigh in here.

  • PNG error in createEncodedImage

    Hey. In the code below, I try to read a PNG file system and put it in an EncodedImage to stagger on 4.6 phones. The 2nd last line of code produces the error/stacktrace illustrated in the screenshot. Advice on what Miss me?  TKS, J.

    
        private static Bitmap LoadBitmap(String uri) {
    
            InputStream in = null;
            FileConnection filecon = null;
            String exceptionText = null;
            byte[] bitmapBytes = new byte[1000000];
            boolean fileExists = false;
            int numBytes = 0;
            int newNumBytes = 0;
    
            try {
                filecon = (FileConnection) Connector.open(uri, Connector.READ);
    
                if (filecon.exists()) {
    
                    in = filecon.openInputStream();
    
                    bitmapBytes = IOUtilities.streamToBytes(in);
                    in.close();        
    
                    if (bitmapBytes != null) {
                        if (bitmapBytes.length > 0)
                            fileExists = true;
                    }
    
                }
            }
            catch (Exception e) {
                        String logMessage = e.getMessage();
                        if ( EventLogger.logEvent( 0x4c9d3452d87922f2L, logMessage.getBytes(), EventLogger.ALWAYS_LOG ) ) {
                            System.out.println("Log Successful!");
                        }
            }
    
            Bitmap bm = null;
    
            if (fileExists) {
    
                String imageExtension = uri.substring(uri.length() - 4); // e.g. .png or .jpg or .gif
    
                if (imageExtension.equals(".png")) {
    
                    //bm = Bitmap.createBitmapFromPNG(bitmapBytes, 0, -1);
                    EncodedImage image = EncodedImage.createEncodedImage(bitmapBytes, 0, numBytes, "image/png");
                    bm = image.getBitmap();
    

    I do not see where you define numBytes one value other than zero.

  • Premiere Pro CC 2015 export: unknown error when using many large jpegs

    Hello

    This is something that I remember reading about in older versions of first, but in the 2015 version, this always seems to happen. It is therefore more than a report bug to a question, because I have a workaround for it. If this isn't the right place to present this kind of info, please let me know.

    Scenario: I create a video project and import a large number of large JPEG images taken by a digital camera (12-20 Megapixel, 50 + photos).

    To help each other in the sequence and then try to export the video as file causes an unknown error during export times randomly, sometimes at the beginning, sometimes in the Middle, no mater which exit do format, bitrate, settings, etc.

    How I solved the problem: I resized pictures on about 4 million pixels - and viola - everything travels very well.

    I also noticed, that when the project contains only a few large images, it can work also still very good export, but if there are more than a few, the error starts occurring.

    Don't know which version of CC 2015 I used, I can check later.

    I hope this feedback is helpful for you guys

    Edit: the machined used is a quad core Xeon, 16 GB of RAM, nVidia GTX750, SSD + 2x1To Raid0

    It was never recommended to use ginormous stills in first. A batch resize in Photoshop or IrFanView for instance would take a few seconds and certainly ease the burden on your software and your hardware.

    Thank you

    Jeff

  • Export PNG with the correct name, for each layer, script file frame foreach

    Hello guys,.

    I am trying to find a script that exports each separately from the layer in PNG, for each image, with the correct name. By example, if the layer is named snail and lies in a forest of group name and is like 6, export this layer as a PNG named forest.snail.06.png (recursion if possible) and this for each layer, for each image...

    I found a software named Layerex, they speak here about layers export Flash | Global Facilitation network

    But I could not find... If you guys know how to do, it would be so awesome...

    Take care

    Simon

    Using jsfl.

  • Export PNG in CMYK or RGB. Changing colors.

    Short version: using Illustrator CC. I exported correctly a logo PNG in RGB (sent to the client), but the new PNG logo looks very different from the old PNG logo which has been exported properly in mode CMYK (sent to the client, a long time ago).

    Customer wants to know why PNG NEW logo looks so much different than the EPS logo and the OLD PNG logo (all from the same Pantone color).

    Long version:

    I recently sent logos to my client in different formats.

    I, eps, CMYK, pdf and png eps

    Before you create the PNG in Illustrator CC version,

    I changed the color of the Illustrator in RGB mode, then converted my colors Pantone to RGB (specific values by the Pantone book), then exported in PNG.

    This has created a very different blue than the eps CMYK version.

    Someone else on the side customer is working with my files and question why the blues look so different. The eps of Pantone vs the RGB version.

    Problem:

    In the past, the png was created correctly - they had been exported in CMYK mode without converting anything either in RGB and they are much closer to the EPS version.

    Now, they wonder why there is such a big difference.

    I've done the process correctly, I don't know how to answer this question. Why they look so different?

    J,

    On this basis since your post #7.

    They gave their web and me specific RGB values of the company for their logo.

    It seems that you will have to do exactly this. And you must use the RGB Mode for this appearance (to answer the question).

  • Is it possible to ignore white space when exporting PNG files. Not the background / work plan

    I have icons, which have white features, mask the other lines to create my icons. Instead of me will expanding the traits and then using pathfinder to create transparent traces to finally create a fill black "single", is it possible to simply export and ignore white? Is there a script that would exist? That would make my life so much easier.

    sBDN2fB.png

    Ignore the white on the smallest sprocket, but white on the cotyledon is necessary for the icon. To make this work, I would usually expand all items and use pathfinder to create my forms. It is a bit tedious doing lots of icons. I would like to know if there is an easier way to do it.

    Thank you!

    Make sure that 'White' is in the Swatch Panel, then choose white as "Transparent" and "8-bit" PNG in the color table.

    Or you can rework your works of art to be truly transparent.

    Or fix the PNG in Photoshop.

  • Rendering to PNG error

    A problem arose after the passage according to effect CC 2014; grabbing a frame as a PNG file fails with this error message: "support CEAP Plugin PNGIO: library PNGIO error: known profile sRGB incorrect (5027: 12).

    So, what the devil is that supposed to mean and how to fix it?

    Thank you

    In the output module settings, go to the "color management" tab and check "preserve RGB.

  • Exported PNG a too big pixel

    I created a PNG image in Indesign CS6 to the required size. When exporting, it became too big in the largest size a pixel. No idea why this happens and how I can fix, other than the PNG to open in Photoshop and lobbying in the distance a pixel? Thank you.

    There is no other way than to cut the line of pixels in PhotoShop (or a similar program).

    Could be something round in InDesign. Or else, even if you set your article on the page in an exact point x point raster. For example. a stroke applied to the object that goes beyond this grid slightly.

    Uwe

  • Export png for the retina display in 326 PPP.

    Hello!

    I did a layout for an iPhone application in Illustrator. When I export a graphic board with a size of 160 x 90 px PNG with 326 DPI, the size ot the picture I get is 724 x 408 px with 326 ppi. If I copy and paste the object to Photoshop it also has the same growth.

    I would like to do pixel-sharp design, so what is the best way to do it?

    If you want something to be 160 x 90px, make it 160 x 90px/points (same thing in illustrator) and export at 72. as mylenium says, pixels are pixels; inches don't have much to do with anything here.

  • Export PNG file naming

    When I export in PNG, the file is automatically assigned 01 file name.  I need to eradicate that and a bit more to write the existing file.  How to make this happen?

    Save for Web--> avancΘs

    Mylenium

Maybe you are looking for

  • TouchPad has stopped lighting up on top of my laptop satellite

    Hi all I have Satellite A series for the last two weeks, that my touch pad has stopped lighting upward. After looking into it, I can't find a driver for touchpad to set the touchpad settings. The mouse settings are there but no details of the touchpa

  • error on the new hp envy 5536 does not move

    I wanted HP new 5536 when installing, I followed all the steps but after inserting the cartridge and the stage next, an error has occurred... Cannot move the print carriage. Open the door to accsess ink cartridge, remove any jammed paper or obstructi

  • Is this possible? Should I worry or not?

    Hi I have chosen in error Vista Home Premium instead of base. How can I change this info in my computer? Thanks in advance.

  • I can't restore the default scale (96 DPI) after editing it in custom scale (144 DPI) via Control Panel

    On my LG, running OS Vista business notebook, I tried a larger screen, through control panel\personalization, font then decided I preferred the default size after all, but after changing the size of return, by clicking OK and then by restarting the m

  • IPS of ASA journals collection

    Hello How can I collect newspapers of the IPS of the ASA? My firewall is ASA 5515 x, 9.1 (5) with module version IPS 4,0000 E4. Please let me know the commands to view the logs of IPS, also, how can I monitor these logs? Kind regards Martin