Need a script to the first page as a resized jpg output

Does anyone know a script where I can exit the front cover/first page of an indesign document as a tiny thumbnail jpeg?  Easy enough to do by hand, but a script would save a lot of time.

Try this,

var doc = app.activeDocument;
    w = doc.documentPreferences.pageWidth;
doc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.pixels;
doc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.pixels;

app.jpegExportPreferences.jpegExportRange = ExportRangeOrAllPages.exportRange;
app.jpegExportPreferences.exportResolution = 300/w*72;
app.jpegExportPreferences.pageString = doc.pages[0].name;
doc.exportFile(ExportFormat.JPG, new File(doc.fullName.toString().replace(/\.indd$/i,".jpg")), false);

Kind regards

Cognet

Tags: InDesign

Similar Questions

  • Script to send the first page of the PDF.

    Currently I have the following script at the end the complete PDF in an e-mail.

    this.mailDoc ({bUI: true, cTo: cToAddr, bassujetti: cSubLine, CMSG: cbody});

    Is it possible to modify it so it sends only the first page and not the complete PDF.

    Thanks for your time and your expertise.

    With the help of try67, we determined that the file was corrupted and would not even extract pages when just clink on the page thumbnails. I reworked somethings and now it works fine with the above code.

    Thank you

  • Jump to the first page of forums added

    Hello

    I have a form where there is a button that allows the user to add a new set of four pages of the form. The cursor automatically based on the script sets the focus to the first field in the first page of the new series of 4 pages. That everything works fine. This allows the end user to add as many sets of 4 pages as needed.

    The owner of the form, now wants to be able to jump to the first page of the any of the added games. I know how to script to access a specific page when there are a certain number of pages, but I do not know how to jump to the first page of a game that has not yet been added. I'd appreciate any help that is offered.

    Thank you

    MDawn

    Ahh, I think I already found what you want to do.

    Use this script for the addNestedTerm button.

    _pages1_3.addInstance(1)
    xfa.host.setFocus(xfa.resolveNode("pages1_3[" + (_pages1_3.count - 1) + "]").spot.TextField9.somExpression);
    

    To set the focus to go to other nested term button use this script.

    var i = this.parent.parent.index;
    if (i < _pages1_3.count - 1) {
              xfa.host.setFocus(xfa.resolveNode("pages1_3[" + (i + 1) + "]").spot.TextField9.somExpression);
    }
    

    I hope this helps.

  • Markers of script on the Master Pages

    On the Master Page to a document ID6, I have the < firstlast_ buisness > header that is labeled with the script editor. This is necessary for the entry of the first and the last company appears in the header. Example: The following data appear on the page... Business_Name > Person_Name > address etc. I want the Business_Name to appear in the header. I am running a CMS data and the "Business_Name" is mapped to the stylesheets through tags and in the body appears correctly. My question how to make the 'Business_Name' appear in the header? I inherited the model and currently I have the 'Person_Name' which appears in the header, I need to change but can't find where?

    I don't know how you would do this with scripts, but usually, I had simply use a pair of variables in the header running with for the paragraph style, a game on the first page, the other game to last.

  • Place items only on the first page

    Hi Forum,

    I m wondering if I can place my library assets.item (0) only on the first page.

    Because the script below place assets in the library, when I click on a particular page...

    Instead, when I run the script, the assets must be placed on the first page...

    Is this possible... I tried this way... but does not work...

    PG = app.activeDocument.pages.item (0);

    myRect = pg.rectangles.add (); (I tested with the addition of rectangles on the first page, it works)

    var Lib = app.libraries [0] .assets [0] .placeAsset [pg] [0];

    Thanks for the help forum...

    Shil...

    need to select as you have already saved the obj in myObj

    var currDoc = app.activeDocument;

    var myObj = app.libraries [0] .assets [0] .placeAsset (currDoc) [0];

    myObj.move(currDoc.pages[0]);

  • Loop for stop the iteration to the first page

    I have a loop to apply a paragraph style, but it stops the iteration to the first page of the document.

    I need to apply the style to all of the document... can not understand why it does not work.

    Here is my script:

    myDocument var = app.activeDocument;

    var myParagraphStyle = myDocument.paragraphStyles.item ("paragraph Style");

    myDocument.pages.item (0).textFrames.item (0).paragraphs.item (0) .appliedParagraphStyle = myParagraphStyle;
    paragraphs var = myDocument.pages.item (0).textFrames.item (0) .paragraphs

    for (i = 0; i < paragraphs.length; i ++)
    {
    var point = paragraphs.item (i)

    paragraph.applyParagraphStyle (myParagraphStyle, true);
    }

    Thank you

    Thanks, I've cleaned up the script, but it always stops after the first page.

    Yes, because you talk to paragraphs in a (first) special textFrame and not to the story.

    You must change your third line or replace it with that:

    var  myParagraphs = myDocument.pages.item(0).textFrames.item(0).parentStory.paragraphs;
    
  • Open the first page in English, then the following pages in Greek

    When I open Firefox, using Google.co.uk as my default page, the first page in English, all following pages open in Greek. I am running Windows XP Pro.

    Hi Greg, you hear each subsequent page on Google, or if you click on one of the results of the research?

    If it's on Google, you might accidentally change your language on Google and have to change in their settings. If this is the case on other pages than Google you need to adjust your language settings in Firefox. Find you them in the window settings, under 'content '. Then follow the simple guide here: https://support.mozilla.org/en-US/kb/settings-fonts-languages-pop-ups-javascript?esab=a & s = language & r = 2 & as = s #w_languages

    If none of this helps, you can also reset Firefox. The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information. Note: This will make you lose all the Extensions, open Web sites and preferences.

    To reset Firefox, perform the following steps:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the button 'Reset Firefox'.
    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.

    Information can be found in the article Firefox Refresh - reset the settings and Add-ons .

    This solve your problems? Please report to us!

    Thank you.

  • Start numbering pages on other than to the first page

    I'm on a 2009 MacBook Pro, Yosemite 10.10.5, with Pages 5.6.1

    As a novelist, I start each document with a title page, followed a warning of fiction page. The real story starts on page three.

    I need to start my pagination with 'Page 1' on page three, but have been unable to find a way. [It was so simple in Word...]

    You will have a separate section for your title page, your warning of fiction page, and then a third section to start numbering pages at 1.

    When you insert a page number in section 3, it will be to see the 3 pages. You visit the toolbar of the Document element and select the tab of the Section from it. On the tab of the Section you want to uncheck Hide on the first page of the article if it is checked and in the numbering of the Page, uncheck the box continue on the previous article and set at: 1.

  • I want a fax confirmation showing the first page of the fax

    When I have something fax above, I get a fax confirmation indicating that the fax was sent.  I'm looking to capture the first page of the image with this fax confirmation.  I was able to do it on my other officejet pro 8600 all in one, but now I am unable to do it with this replaced machine which was covered by my warranty.

    Hi rubenm,

    I understand that you have a 8600 Officejet you wish to turn on the image for the fax confirmation report. I'd be happy to help you with this.

    I must say though, it was frisk me throughout this menu from the printer! What you need to do is:

    1. Press (right arrow) and then press Setup.

    2. press on the Fax Menu (can say Fax Setup)
    3. press on the reports of fax and then touch Fax of Confirmation.
    4. tap on (fax) or we (send and receive).
    5. press on the Fax Confirmation with the image.

    Then when you get a Fax Confirmation it should the page it should have this small image of the first page.

    Hope this helps, have a nice day!

  • OE print cut 2 inches to the right on the first page

    OE6 in XP.  When printing, the right to 2 inches from the first page is cut off.  Checked margin setting in IE, they are all set to 0.75.

    Hello

    1. have you made changes on the computer recently?

    2. How is like print preview?

    3 is this problem limited to Microsoft Outlook Express?

    Method 1.
    Check if you can print successfully in the boot. Maybe there is a third party application that is causing the conflict.
    You need to perform a clean boot to find the program that is causing and then disable or remove.

    How to configure Windows XP to start in a "clean boot" State
    http://support.Microsoft.com/kb/310353/en-us

    Note: When you are finished troubleshooting, follow the steps as explained in the article to reset the computer to start as usual.

    Method 2.
    Try the procedure described in the articles below and check.

    When you print an e-mail message in Office Outlook 2003 or Outlook Express, the printed message is so small that it is unreadable
    http://support.Microsoft.com/kb/932538

    List of fixes included in Windows XP Service Pack 3
    http://support.Microsoft.com/kb/946480

     Description of an update for the issues that are described in articles 898122, 898123, 898124, and 898125 with Outlook Express 6.0 running on Windows XP
    http://support.Microsoft.com/kb/900930

    I hope this helps.

  • Windows fax and scan only saves the first page

    When I use the windows fax and scan pages to analyze. You can get an overview of all the multiple pages scanned, but what emailing or save you then cannot see the first page.

    Hello

    If you're using a scanner with a charger of documents and Windows Fax and Scan, you can scan multiple pages into a single file of scanning to the TIFF (.tif) file format. For more information, see:


    Scan a document or photo with Windows Fax and Scan
    http://Windows.Microsoft.com/en-us/Windows7/scan-a-document-or-photo-with-Windows-fax-and-scan 

    If you use Windows Fax and Scan and a flat bed scanner, you can scan multiple images to separate files probably. Not all scanners flat have this ability, so you may need to contact the manufacturer of the scanner to get a driver so that your scanner flat may offer this option.

    Reference:

    Scanning: Frequently asked questions
    http://Windows.Microsoft.com/en-us/Windows7/scanning-frequently-asked-questions 

    Kind regards
    Afzal Taher
    Microsoft technical support engineer

  • Denial of world App because of icon and app stuck on the first page

    I recently submitted my application for approval, but I got the same problems of feedback twice now:

    -After the installation of your application on BlackBerry Z10, Q10, Z30, there is the icon of the application is / mark questions. If you use our Eclipse plugin, please check your BlackBerry_App_Descriptor.xml file and make sure that you correctly specify your custom application icon
    -When typing your app, application pasted on the first page. Please make sure that your app work correctly.

    I have included a custom icon specified in the configuration file with the .

    I have also run the application on my device dev-alpha with no problems. The screenshot that I received the first time in support of BB showed no bar to future Action to exit the splash screen; However, when I run the app on my dev-alpha device I am able to see the action bar and navigate to my three monitors.

    Someone else has experience this problem?

    There is no such thing as all my code to inspect at github

    Thanks in advance for the help.

    Hello

    What version of OS are you running on your device?

    The action bar is probably due to an outdated version of bbUI.js be used. Currently using:
    https://github.com/InnovateorDieOnline/Bote/BLOB/master/index.html#L11

    Which is: bbUI VERSION: 0.9.6.15

    So that the most recent:
    https://github.com/BlackBerry/bbUI.js/BLOB/master/pkg/BB10/BBUI-min.js

    Is actually: bbUI BB10 version: 0.9.6.889

    There are a number of BBUI updates that were needed to support future versions of 10.1 and 10.2. Probably an update to your library BBUI is necessary.

    Regarding the app icon, I don't know exactly. If you are ready to send me your record of BAR ([email protected]), I can verify that the config.xml file / BAR descriptor are configured correctly.

  • Display different header in the first page

    I display a table in the header (not a header header but MS word identified as something above <? start: body? > tag) rtf model. This table has 3 rows, I need to display one of these lines in the first page and not in the other pages.

    I have not found any method on the questioning of the page number. So, I used a flag in the following way: (in this case, text with red color denotes an RTF). Here's what my RTF file looks like:

    Header 1 Header 2 Header 3
    init_fieldThis is the line to be included on all pages
    if_fieldThis line should not be indicated on the first page.end_if change_variable

    <? Start: body? >

    other stuff

    <? end body? >

    Where,

    init_field

    <? If: (xdoxslt:get_variable($_XDOCTX,'FLAG')! = 'NONFIRST')? > <? xdoxslt:set_variable($_XDOCTX,'FLAG','FIRST')? > <? end if? >

    if_field

    <? If: (xdoxslt:get_variable($_XDOCTX,'FLAG')) = 'FIRST'? >

    end_if

    <? end if? >

    change_variable

    <? xdoxslt:set_variable($_XDOCTX,'FLAG','NONFIRST')? >

    BUT I still see all the rows in all the pages. It seems that the value of the "FLAG" variable is not preserved between pages. For me, it seems, header is generated once and same header is used in all pages

    Don't know if this is exactly what you are looking for, but why not just place the second line which must be on the first page only after the

    Header 1 Header 2 Header 3
    init_field This is the line to be included on all pages

    if_field This line should not be indicated on the first page. end_if change_variable

    other stuff

  • Footer text on the first Page only

    Hi all
    I need assistance with the addition of the text on the first page of my .rtf in the footer only. I searched the forum and I have not found exactly what I'm trying to implement. There is a wire that has
     <?start@first-page:body?>footer text <?end body?>
    but once this syntax is added, I get an error message. My end user want that the text on the first page of the footer, the model may be one of many pages once presented as a preview. Any information or help is appreciated.

    You can use different first page option in ms word, then you will get a single footer on the first page.

    go to your header or footer double click then you go in the upper msword option another first page check only option so that you can get the footer that you need.

    http://winrichman.blogspot.com/2008/08/different-page-header-and-footer.html

  • Save the document to the first page

    Is there a simple way to define a document when it is saved in a script so that when it is opened in InDesign, it opens to the first page?

    My script generates a number of pages, and then saves the document. It always opens to the last page, I understand because it was the last page set. Can I make it open on the first page?

    Thank you!

    Hello

    with (app.activeDocument.layoutWindows[0]) {
              screenMode = ScreenModeOptions.PREVIEW_TO_PAGE;
              activePage = app.activeDocument.pages[0];
              zoom(ZoomOptions.FIT_PAGE);
              }
    

    ... and now save it.

    Have a look here: http://jongware.mit.edu/idcs5/pc_LayoutWindow.html

    Jarek

Maybe you are looking for