Save pdf to the same location as the orginal .indd file that is exported from the

Hello!

I'm just starting to get my feet wet in Javascript scripts, and I greatly enjoy!

I am wanting to create a script that a PDF using a PDF export preset I set export and then I want to have the pdf saved in the same folder as the indesign file that was exported from. I already know how to export the pdf file using a "Preset" I already have. The only thing I do not know how to do is to indicate the pdf file to be saved in the same folder as the Indesign file that is exported from. Can someone help me please? I would be very happy!

I would also like to find a way to automatically name have the pdf named the same name as the Indesign file, it has been exported since.

If I need to clarify something more, feel free to let me know.

Thank you very much!

Try this code example

app.scriptPreferences.version = 11.0

myDocument var = app.activeDocument;

var myFileName.

If (myDocument.modified == false) {}

myFileName = myDocument.fullName + "";

If (myFileName.indexOf (".indd")! = - 1) {}

var myRegularExpression = /.indd/gi;

myFileNamePDF_Web = myFileName.replace (myRegularExpression, ".pdf");

}

{with (App.pdfExportPreferences)}

PDFJPEGQualityOptions.HIGH;

PdfMagnificationOptions.FIT_PAGE;

PageLayoutOptions.SINGLE_PAGE;

colorBitmapCompression = BitmapCompression.zip;

colorBitmapQuality = CompressionQuality.eightBit;

colorBitmapSampling = Sampling.BICUBIC_DOWNSAMPLE;

colorBitmapSamplingDPI = 300;

}

myDocument.exportFile (ExportFormat.pdfType, new leader (myFileNamePDF_Web));

} else {}

Alert ("save your file before you continue");

}

Thank you

Tags: InDesign

Similar Questions

  • After the update, first any audio of MP4 files that I exported one day there first. Help, please!

    I capture video games using Youtube channel for a game, been working on it for 9 months now. Today, I've updated my Adobe Premiere, I use capture software AND the K-Lite Codec pack. I shouldn't have updated three of them all at once. Argh! Now, first will not import the old footage I captured with D3Dgear. The videos were AVI1 files with Fast V2 of MPEG - 4 codec. I can deal with that.

    This first is worse, and my biggest problem is, matter of mp4 files with audio files that I exported from first since last year. I use the "H.264 - HD Youtube720p" preset when exporting, as well as the audio is AAC Codec, 48 kHz, stereo. Why this can happen? How can I check / fix this?

    Any help will be appreciated.

    cansungur wrote:

    AND the K - Lite Codec pack.

    Not a good idea. Should not be installed in the first place. Codec Pack are known to spoil the codec on your computer.

    Folder rename images and try again.

  • To turn off the Recycle Bin so that the files that you delete from your hard disks have gone permanently without having to empty the trash, what should you do?

    To turn off the Recycle Bin so that the files that you delete from your hard disks have gone permanently without having to empty the trash, what should you do?

    Original title: help

    Hello

    Hold down the 'Shift' key when you delete and it bypasses the Recycle Bin.

    See you soon.

  • Cannot save pdf to the browser, not open directly

    I use Adobe Reader 10, Windows XP and Firefox. When I click on a link to a pdf file, I get a window popup asking where I want to save the file. I don't want to save it, I want to open it. I do not get this option. If I right click on the link, I just get 'Open link in a new tab... '. "Then the same save the message arrives. I used to be able to just click on the link and the file would open right in Adobe Reader.

    What version of Firefox?  From 19 of Firefox, it uses its own Viewer PDF, not the Adobe Reader plugin. See http://forums.adobe.com/thread/1158136

  • Cannot open a PDF file that is downloaded from the internet

    For the past two months, PDFs a lot (but not all) cannot be opened after being registered.

    The message is Adobe Reader could not open "Worlds most competitive cities IBM 2013.pdf" because it is not a type of supported file or because the file has been damaged (for example, it was sent as an attachment to e-mail and has not been correctly decoded).

    What is a solution that a layman can do?

    Jerry Hultin

    It is a Safari problem

    Go to: Mac/HD/Library/Internet Plugins

    Trash the files AdobePDFViewer.plugin and AdobePDFViewerNPAPI.plugin

    Empty the trash.

    Relaunch Safari and you can download a PDF file without error.

  • Recover files that were deleted from the Recycle Bin

    I need to recover a word file that has been deleted from the Recycle Bin.  An easy way to do this?

    It is not really easy, but it may be possible (depending on whether or not the file has been replaced and a number of other factors).

    If you have Vista Business, Vista Ultimate or Vista Enterprise, you can be lucky.  They have so-called saves shadow copies, which are deleted or modified files that can be recovered in case changes/deletions made by mistake.  http://www.Microsoft.com/Windows/Windows-Vista/features/shadow-copy.aspx more information about how to use this feature to: http://blogs.techrepublic.com.com/howdoi/?p=145.

    If you have Vista Basic or Premium of Vista, shadow copies is not available; However, there is an alternative that is free and the shadow copies feature called Shadow Explorer. http://www.howtogeek.com/howto/windows-vista/recover-files-with-shadow-copies-on-any-version-of-windows-vista/.  Although it will not help you this time, it could very well save you in case this happens again.

    In case this does not work (not all files are available through shadow - it occurs periodically), here are some additional free recovery programs that might help:

    http://www.r-TT.com/

    http://www.SnapFiles.com/get/DiskDigger.html

    http://www.SnapFiles.com/get/easusdfr.html

    http://www.SnapFiles.com/get/restoration.html

    http://www.SoftPerfect.com/products/FileRecovery/

    http://www.SnapFiles.com/get/undeleteplus.html

    http://www.Piriform.com/Recuva

    http://techpaul.WordPress.com/2008/06/23/how-to-recover-your-lost-files/

    The files are not really deleted until they are crushed (although they are no longer available through conventional methods).  If you decide to try these recovery programs, you should stop using your drive hard immediately in order not to replace the data that you are trying to recover.  He slave on another PC and launch the recovery of this PC.  Even now you have definitely lost some of them if you use the same PC.  If you can not do this (slave on another PC), you run the risk of overwriting the data with every action you do on the PC (but you may still be able to recover some or most or even all files - it's a matter of luck).

    Only you can decide if the data is important enough to take the PC to an expert data recovery to recover files (they will have better programs and hardware to do that none of us do, and I've provided above).  Do NOT go to the Geek Squad or one of these centers of store-, they generally don't know what they are doing - it take for expert data recovery.  It will cost you a little and they generally offer no guarantees.  The decision is yours.

    Good luck and I hope this helps!

    Lorien - a - MCSE/MCSA/network + / A +.

  • I would like to create an interactive pdf in Indesign - two guest on 1 page in Indesign that when exporting to adobe reader in pdf format, I can simply add new names that populate both copies and then be printable. Any help out there is how to make an ext

    Two invites on 1 page in Indesign that when exporting to adobe reader in pdf format, I can simply add new names that populate both copies and then be printable. Any help out there is how to make an invitation in Indesign, but now how to make 2 copies on a single page that someone else ie the customer can add their own names. So each field name must complete on both guest. Sounds simple, but is not really there to help. I think he called an interactive pdf. Thanks in advance.

    AutoFill is the easiest part, he lies. If both fields have the same name, they will have the same content: type in one and it appears in the other.

  • You can set display options specific to a pdf file that is linked from the HTMLResouces folder?

    You can change the display by default to 2-up pages face to face, or open it to a specific page in the pdf file?

    N °

    Neil

  • Why the html file that I downloaded from the internet will not open in Dreamweaver?

    I tested other pages to index and their linked pages and they opened in Dreamweaver.  I applied the same steps to this file, but it still not open.  All of this linked pages / index associated is open in Dreamweaver, but not the index page itself.  When I double click on the index.html file, it opens in the browser and the links work.  If the file is damaged in any way can it be repaired?  I checked the index.css file, but I see nothing wrong with it yet.  Can the html or css file contain code that prevents the files open in Dreamweaver, and yet still be opened in a browser?

    Of course, you have all the support files.

    Nancy O.

  • Remove files that are missing from the Photos app

    Hello

    I would like to remove missing files on mac Photos App. elements that "the volume of 'thumb_IMG_3008_1024.jpg' is not found."

    I tried to repair my library but it does not work for me. These items are still in my library.

    I also disabled the use as a Photo library system, but does not work.

    Guys do you have an idea how I can delete these items?

    Thanks in advance.

    This message is usually caused by you remove or move the originals of photos imported in reference mode (the preference to copy the items imported into the library of Photos being disabled - yo if it was unchecked in the past?)  -You can find all referenced photos with an album smart Photo is referenced - that will give you everything referenced photos - if you want (and I suggest that it) you can move to the photo library by using the file menu ==> consolidate command - a yu have consolidated the library pictures left in the referenced smart album should have a missing original

    LN

  • a file that is deleted from the Recycle Bin can be recovered?

    accidentally deleted the wrong file. the Recycle Bin has been emptied, and now I want to know if I can recover somewhere?

    accidentally deleted the wrong file. the Recycle Bin has been emptied, and now I want to know if I can recover somewhere?

    "Deleting" a file does not delete actually it brand just space be used. There are third-party programs that can sometimes recover deleted files. The problem is that the space used by the file is likely to be replaced very quickly, and this makes the unrecoverable file.

    So your chances of successfully recover this file are decent, if you try it again immediately after deleting it and quickly down. If it's been a while and you used the computer since then (for example to write this question and to read this response), your chances are very low now.

    But if the file is large enough, it's still worth a try. Stop using the computer in question immediately, if you haven't done so already. Download an undelete program (in here is one: http://www3.telus.net/mikebike/RESTORATION.html but there are many other choice; do a search) on a friend's computer (again, using your reduce your chances of recovering the file) and bring it to you on a diskette, CD, or drive to the thumb.

    If that fails, your only recourse is to bring or send the drive to a professional file recovery company. This kind of service is very expensive and may or may not work in your case.

  • "Please install the System86.dll file that is missing from the computer" during the installation of games

    Original title: "System86.dll"

    I'm having a problem during the installation of 3D games in window 7 ultimate

    Error code is: System86.dll

    I was using Window 7 Ultimate for a while, before a few days ago, when I tried to install the game in 3D (prince of Samuel), during installation, he gave me the message"Please install the file System86.dll which is missing from the computer" (sorry if my text is false I forgot the wording).

    Now, let me tell you what I did before: -.

    • I tried to restore my window
    • I sccaned my PC all a care as well as the microsoft essential security
    • What are malicious files had been found by Anti virus, they have all been deleted

    Can someone tell me how to get in touch with the support of microsoft agent?

    Thank you for reading my message, your response would be appreciated

    Take care of your self!

    http://social.answers.Microsoft.com/forums/en-us/w7repair/thread/d08707ca-D670-4dae-9E12-5936ef6fb486

    If your version of win has pre-installed support is done by the manufacturer of your PC, MS, other support that the critical updates, is paid for request for assistance, unless you have a commercial version of victory

  • Recover files that were deleted from the computer trash!

    Can someone help me? I was told you can always recover your deleted files after what they have been deleted from the Recycle Bin. Any suggestions on how to fix this? It was documents for a major project and it is urgent that _____.

    Stop using your computer immediately.  Don't do anything else with him except in execution of a recovery program.   I had luck with Recuva .

  • My files from my drive flash has been removed. How can I recover the files that where deleted from my flash drive? __

    After the files where deleted I had to format the flash drive.

    You the files deleted, then formatted the flash drive? They went.

  • Windows Media Player (32-bit Vista) has stopped working. It does not open when I click on a file that uses or from the main menu. I tried to download and re - install, but get the message "you already have the latest version of Windows Media Player.

    Windows Media Player does not work for music or videos (Vista)

    Hi Palmdoc,

    1 when was the last time it was working fine?

    2. did you of recent changes on the computer?

    You cannot uninstall and reinstall Windows media player in Windows vista, because it is integrated inside the operating system.

    This problem occurs because the Windows Media Player library database is corrupted.

    See the below Microsoft article and try the steps mentioned, check if it works.

    You cannot view, add, or delete items in the library of Windows Media Player 11

    http://support.Microsoft.com/kb/925718

    I hope this helps!

    Halima S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for

  • Messages send pictures

    I have an Iphone 6.  Cannot send pictures.  Do not know why. Help.

  • out of nine warranty W3 Acer lights

    Help, please. I just bought this new seal from a private seller. It lights up. Sometimes I see a slow flashing amber light on the power button. Anyone know what the problem is. Thanks in advance!

  • Dell order | Configure the utility crashing & empty INI files

    "I'm using the" Dell order | Set up' utility 3.0 (formerly called the "Dell Client Configuration Toolkit") to set the setting in the BIOS for all our Dell business machines.We have a mixture of models of desktop & laptop. The utility is of course mos

  • problem in installing audio device for thinkpad R61.

    Hello I changed my os from vista to win XP, nw im faced with the problem of sound card drivers, installing his media dat giving msg device not found... my laptop is lenovo R61 thinkpad... Please help me w/h I can download my sound card drivers and al

  • Keyboard shortcuts work too easily

    I just got a new laptop with Windows 7... I noticed that when I type for a reason, keyboard shortcuts begin opening in every sense things when I didn't hit all the shortcuts I know. Earlier, trying to this type (very slowly), I moved automatically to