Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

how to export selection to jpeg

Community Beginner ,
Oct 16, 2017 Oct 16, 2017

i need to export only the selected objects to jpg instead of whole page.

TOPICS
Scripting
4.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 16, 2017 Oct 16, 2017

Try the "byLFC_export selection" script.

http://lf.corullon.com.br/scripts_id_lfc/index_enus.htm

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Oct 16, 2017 Oct 16, 2017

Try the "byLFC_export selection" script.

http://lf.corullon.com.br/scripts_id_lfc/index_enus.htm

The link ain't working: '404 not found' error.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 17, 2017 Oct 17, 2017

I'm sorry!

http://lf.corullon.com.br/scripts_id_lfc/index_enus.html

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 17, 2017 Oct 17, 2017

Still link not opened

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 17, 2017 Oct 17, 2017
LATEST

My God, what's going wrong?!

Did you tried http://lf.corullon.com.br/scripts_id_lfc?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 16, 2017 Oct 16, 2017

try this,

app.selection[0].exportFile(ExportFormat.JPG, new File(app.activeDocument.fullName.toString().replace(".indd",".jpg")));

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 16, 2017 Oct 16, 2017

This is working, but how to export multiple selection in a single jpg file

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 16, 2017 Oct 16, 2017

for(var i=0;i<app.selection.length;i++)

{

        app.selection.exportFile(ExportFormat.JPG, new File(app.activeDocument.fullName.toString().replace(".indd","_" + i +".jpg")));

    }

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 17, 2017 Oct 17, 2017

Sorry, I missunderstood your question, try now.

var doc = app.activeDocument;

app.doScript(exportJPG, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT);

function exportJPG()

{

        var obj = [];

        for(var i=0;i<app.selection.length;i++)

        {

                obj.push(app.selection);

            }

        var grp = doc.groups.add(obj);

        app.select(grp);

        grp.exportFile(ExportFormat.JPG, new File(app.activeDocument.fullName.toString().replace(".indd",".jpg")));

    }

try{doc.undo();}catch(e){}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 17, 2017 Oct 17, 2017

"This is working, but how to export multiple selection in a single jpg file"

  1. duplicate
  2. group
  3. export the group
  4. remove the group
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 17, 2017 Oct 17, 2017

Hi,

Hope this helps!!!

Re: exportFile for multiple selection

Thanks,

Prabu

Thanks,
Prabu
Design smarter, faster, and bolder with InDesign scripting.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines