Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6538631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:45:31+00:00 2026-05-25T10:45:31+00:00

Is there a way to export a page as a png with InDesign server?

  • 0

Is there a way to export a page as a png with InDesign server?

The following code works for a text frame. How do I do the same for the complete page contents?

var theDocument = app.documents.add();
var thePage = theDocument.pages[0];
var theTextFrame = thePage.textFrames.add();
theTextFrame.geometricBounds = [5,5,40,40];
theTextFrame.contents = TextFrameContents.placeholderText;
theTextFrame.exportFile(ExportFormat.pngFormat, File("c:\\test.png"));
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:45:32+00:00Added an answer on May 25, 2026 at 10:45 am

    if you can export as JPG, something like this should work:

    //set which page you want to export:
    app.jpegExportPreferences.pageString='1';
    
    //export that page from the document:
    var myFile = new File('C:/test.jpg');
    theDocument.exportFile(ExportFormat.JPG, myFile);
    

    I’m not sure if setting the jpegExportPreferences.pageString would still work or not with exporting as a PNG, but you might be able to test that. Hopefully this at least gets you on the right track!

    Note that if you want to export as a PNG, use this export format:

    ExportFormat.PNG_Format
    

    EDIT:

    Looking at this article from the Adobe Forums, it states that InDesign can export as PNG but doesn’t include any options, so it has limitations other than specifying the format. So, if the above code example won’t help, maybe try something like this:

    app.activeDocument.selection[0].exportFile(ExportFormat.PNG_FORMAT, File(new File("c:\\test.png")));
    

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to export a simple HTML page to Word (.doc format,
Is there a way to export a wiki page to a MS word document
Is there a way to convince Crystal Reports to export a page / group
Is there a way to easily export R tables to a simple HTML page?
Is there a way to export files/folders from Source Safe? (i.e. getting rid of
Is there a way to export table data to a MIME Resource (Flex3 component)
Is there a way to export the settings defined in Window > Preferences Dialog
Is there a way to export all of TFS 2008 Groups and Permissions for
Is there any way to export RDLC reports in HTML format in visual studio
I was wondering if there's a way to export package information from Cognos 8

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.