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

  • Home
  • SEARCH
  • 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 8536525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:41:18+00:00 2026-06-11T10:41:18+00:00

How should I use CS5 scripting to convert the current InDesign page to an

  • 0

How should I use CS5 scripting to convert the current InDesign page to an image and place it, tagged on that same page.

I have downloaded to reference and if provided pointers to a couple of the methods to use I could suss it out myself thereafter.

Edit

  • Place back into the current page (if your pages are numbered normally)
  • Export to the current user’s application directory
var doc = app.activeDocument;

app.jpegExportPreferences.properties = {
   antiAlias: true,
   embedColorProfile: true,
   exportResolution: 150,
   // exportingSpread: true, // Uncomment if spreads
   jpegColorSpace: JpegColorSpaceEnum.rgb,
   jpegExportRange: ExportRangeOrAllPages.exportRange,
   jpegQuality: JPEGOptionsQuality.maximum,
   jpegRenderingStyle: JPEGOptionsFormat.baselineEncoding,
   useDocumentBleeds: false,
   simulateOverprint: false,
   pageString: app.activeWindow.activePage.name // Page(s) to export, must be a string
}

var userFolder = Folder ( Folder.userData.absoluteURI + "/Brilliant" );

if (!userFolder.exists) userFolder.create();

var tempFile = File(userFolder+"/page.jpg");

doc.exportFile(ExportFormat.jpg, tempFile);

var pageNumber = parseInt(app.activeWindow.activePage.name)-1?parseInt(app.activeWindow.activePage.name)-1:0;

var pageToPlace = doc.pages[pageNumber].place(tempFile);

tempFile.remove();
  • 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-06-11T10:41:19+00:00Added an answer on June 11, 2026 at 10:41 am

    Here’s a sample that might do what you are looking for. There’s no easy way to save a jpg directly in an InDesign document, but you can export it to a temporary file and then place it back in. You might have to tune things a little bit to get things right but something like this should do the trick.

    var doc = app.activeDocument;
    
    // Set JPEG export preferences
    app.jpegExportPreferences.properties = {
       antiAlias: true,
       embedColorProfile: true,
       exportResolution: 150,
       // exportingSpread: true, // Uncomment if spreads
       jpegColorSpace: JpegColorSpaceEnum.rgb,
       jpegExportRange: ExportRangeOrAllPages.exportRange,
       jpegQuality: JPEGOptionsQuality.maximum,
       jpegRenderingStyle: JPEGOptionsFormat.baselineEncoding,
       useDocumentBleeds: false,
       simulateOverprint: false,
       pageString: "1" // Page(s) to export, must be a string
    }
    
    // Make a temporary file
    var tempFile = File("/Users/home/Desktop/temp11111.jpg");
    
    // Export an image of the page to disk
    doc.exportFile(ExportFormat.jpg, tempFile);
    
    // Place the page image back on the page
    var pageToPlace = doc.pages[0].place(tempFile);
    
    // Remove the temporary file from the disk
    tempFile.remove();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have homework that should use fork() and wait() system calls: 1) Write two
I understand that I should use mod_wsgi to run Python, and I have been
I have a bat file that I should use to delete a part of
Why sometimes I should use block and other times &block inside functions that accept
I don't know which title I should use for this question. I have a
I heard that static methods should use only static variables in java. But, main
In what cases I should use Array(Buffer) and List(Buffer). Only one difference that I
I know that I should use git add after the conflict is resolved. I've
I have started to use Dreamweaver CS5 for PHP coding. The PHP syntax highlighting
Our users should use Ctrl+Shift+J shortcut in web application. We have tried Chrome switchers

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.