PDFSaveOptions - can't control file size

I am trying to automate the saving of all my layers as PDFs.  Yet, I am getting different results when I try to automate the saving process.  For example, I can save a file manually using "SaveAs..." in the menu, then setting my options using the tabs on the save as pdf window.  However, when I try to use the same settings in my code, it saves fine, but the file size is about 4 times te result of doing it manually.  I can set the "presetFile" for the SaveAs to use, but it causes the automatic process to stop and wait for input from me...which is the exact opposite of what one would want in an automation scenario.
Below are the save options I am using.  I have tried several different PDFEncoding types.  I've tried different downSample values.  I've tried different jpegQuality settings.  I've tried just about every combination of settings.  Nothing works!  I can never achieve the file size that I get from the same exact settings on the manual screen.  I am trying to just get my files to somewhere between 4 and 6 MB, but they keep ending up over 120MB.  No change I make has any real effect.
What am I doing wrong?
saveOpts = new PDFSaveOptions()
saveOpts.PDFCompatibility = PDFCompatibility.PDF16;
saveOpts.colorConversion = false;
saveOpts.destinationProfile = "U.S. Web Coated (SWOP) v2";
saveOpts.embedColorProfile = false;
saveOpts.optimizeForWeb = true;
saveOpts.profileInclusionPolicy = false;
saveOpts.encoding = PDFEncoding.PDFZIP;
saveOpts.downSample = PDFResample.PDFBICUBIC;
saveOpts.PDFStandard = PDFStandard.PDFX32003;
saveOpts.downSampleSize = 200;
saveOpts.downSampleSizeLimit = 250;
saveOpts.layers = false;
saveOpts.jpegQuality = 0;
var Panels = app.activeDocument;
Panels.saveAs(PDF, saveOpts, true,Extension.LOWERCASE)

I had trouble with the PDFSaveOptions too so I use scriptlistner.
function saveCopyAsPDF( file ) {
    var desc = new ActionDescriptor();
        var presetDesc = new ActionDescriptor();
        presetDesc.putString( stringIDToTypeID('pdfPresetFilename'), "Smallest File Size" );
        presetDesc.putInteger( stringIDToTypeID('pdfCompressionType'), 10 );
    desc.putObject( charIDToTypeID('As  '), charIDToTypeID('PhtP'), presetDesc );
    desc.putPath( charIDToTypeID('In  '), file );
    desc.putBoolean( charIDToTypeID('Cpy '), true );
    desc.putBoolean( charIDToTypeID('Lyrs'), false );
    executeAction( charIDToTypeID('save'), desc, DialogModes.NO );
saveCopyAsPDF( new File('~/Desktop/test.pdf'));

Similar Messages

  • Measuring thr control file size

    Dear Friends ,
    I know that , RMAN records are kept on the control file when I dont use recovery Catalog .
    Barring this , RMAN also keep database related informations . In this case my question is ,
    Is the control file size ups and down ? How can I measure or manage the size of the control file .
    I m using Oracle 10g , here in OEM I cannot find anything to see or manage the control file size .
    Plz help me ... ..

    Hi,
    Change Maxdatafiles, Maxlogfiles after Creating Database:
    1. Dump a trace of the controlfile.
    Use SQL*Plus (or Server Manager) and enter:
    SQL> alter database backup controlfile to trace ;
    2. Modify the created trace file (located in the user_dump_dest directory):
    a) remove from the first line to the line before "STARTUP NOMOUNT"
    b) remove line "ALTER DATABASE OPEN" to the end of the file
    c) change value of maxdatafiles, maxlogfiles and other parameters as desired
    d) rename the file to something .sql (such as cntl.sql)
    3. Shutdown the database.
    4. Backup the database.
    5. Run SQL*Plus (or Server Manager) and do the following:
    SQL> connect / as sysdba
    SQL> @cntl.sql (The SQL script that you created in step 2)
    SQL> alter database open noresetlogs ;
    Note:
    Beginning in Oracle8, when you issue CREATE DATABASE or CREATE CONTROLFILE
    statements, the MAXDATAFILES parameter specifies an initial size of the datafile
    portion of the control file. Later, if you add a file whose number exceeds
    MAXDATAFILES but is less than or equal to the value specified by the DB_FILES
    initialization parameter, the control file automatically expands to allow the
    datafile portion to accommodate more files. You will not need to recreate the
    controlfile in this case.
    Ps :- If your question is Answered mark the Appropriate Response / Reply
    - Pavan Kumar N

  • How can I control the size of a cell in the GridBagLayout?

    Hi,Swing Gurus
    I am developing a swing-based program using JBulider5 enterprise.
    It seems to me that the GridBagLayout is really a hard nut!
    How can I control the size of a cell in the GridBagLayout?
    It seems that I cann't control the size of a cell directly.
    But how the size of a particular cell is determined when I switch the layout manager from XYLayout to GridBagLayout?
    Thx in advance!
    Regards,
    Justine

    hi,i have not done what you are asking but there are fields like
    COLUMNWIDTH, MINSIZE, MAXGRIDSIZE, PREFEREDSIZE to which you can set the appropriate values and test for your need.hope this helped.bye martian.

  • How can I control the size of the af:InputText?

    Hi,
    How can I control the size of the 'af:InputText' on the UI, without using columns & rows attributes. Even though I am using width & height attributes, the changes are not getting reflected in the UI.
    Thanks,
    Rajesh.

    Hi,
    It is inside a 'af:PanelBox'. So, the parent container also determines the size of the child? Here I need a create a 'pidgin chat window' kind of an interface with a fixed size top-level container, inside which I willl put all my components. The code looks something like this:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" partialTriggers="it1">
    <af:messages id="m4"/>
    <af:form id="f1" partialTriggers="it1">
    <af:panelBox text="" id="pb1" background="dark" type="stretch"
    titleHalign="start" ramp="highlight"
    inlineStyle="width:350pt; height:500pt; margin:0.5pt; padding:0.5pt; border-width:0.5pt; "
    partialTriggers="it1">
    <af:spacer height="15pt" id="s1"/>
    <af:inputText id="ot1"
    columns="82" rows="25" wrap="hard"
    partialTriggers="it1"
    value="#{ChatClientBean.chatLog}"
    binding="#{ChatClientBean.outputChatTextBox}"
    visible="false">
    </af:inputText>
    <af:spacer height="27pt"/>
    <af:inputText id="it1" inlineStyle="width:200pt; height:100pt;"
    valueChangeListener="#{sessionScope.ChatClientBean.sendMessage}"
    autoSubmit="true" partialTriggers="it1"
    binding="#{ChatClientBean.inputChatText}"/>
    </af:panelBox>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Thanks,
    Rajesh.

  • In the metadata settings i can find the file size in pix. is it possible to see the size in inches?

    in the metadata settings i can find the file size in pix. is it possible to see the size in inches?

    Yes, that is one way to do it. But you can also do it by doing some simple math. For instance, let's say the you have an image that is 4000 x 6000 pixels. It doesn't matter whether resolution setting is in the file. The image is still 4000 x 6000 pixels. But you can decide what resolution you are going to export your copy. And you would do that for its intended purpose. If you are going for a high quality print then you would probably want 300 PPI in your export settings. With the example I've given the size print you can get had 300 PPI would be as follows:
    4000 (pixels) / 300 (PPI) = 13.333 Inches
    6000 (pixels) / 300 (PPI) = 20 inches
    So if you were really precise in needing a 300 PPI print you can get one that is 13 x 20".
    If you are preparing for display on the screen, the higher resolution isn't needed. Using the same math:
    4000 / 72 = 55.55 inches
    6000 /  72 = 83.33 inches
    By doing some simple math in your head you can determine the resolution that you need and the size that you need and set up your export accordingly.
    Technically speaking a digital image doesn't have a size other than pixel dimensions. Everything else has to be determined by the resolution that you need for the intended purpose of the final image.

  • I have a .mov file that is 59 gigs.  Is there a converter that can reduce the file size with minor resolution loss so I can import it into final cut express?

    I have a .mov file that is 59 gigs.  Is there a converter that can reduce the file size with minor resolution loss so I can import it into final cut express?

    Open the file in QuickTime Player. Then do Tools > Show Movie Inspector.  What does it say for Format and FPS?
    At 59GB, I suspect you have either a 4 hour DV video or a 1+ hour video that was converted to Apple Intermediate Codec.   If it's either of those, you can import it directly into FCE provided you select the appropriate Easy Setup first.  Your clips have to match the properties of the Easy Setup you are using.
    If it's neither DV or AIC then you need to convert it to one of those codecs.  (QuickTime/DV or QuickTime/AIC)  Many people in this forum rely on MPEG Streamclip (it's free and works great).

  • TFS Preview source control file size limit

    Is there a file size limit for adding large files to a TFS Preview project's source control..?   I would like to add some files to source control that are in the 20-30Mb range and the requests keep aborting.

    Hi Erich,
    Thank you for your post.
    I test the issue by adding .zip file to TFS Azure version comtrol, the size include 10MB, 20MB, 100MB, 2GB, i can add they to version control properly without any problem.
    In order narrow down the issue, here are some situations i want to clarify from you:
    1. What's the error message when TFS azure block the check-in process? Could you share a screen shot?
    2. Which client tool are you using? VS10 or VS11? Or other tools?
    3. Try to reproduce this in different network environment and see what will happen.
    4. Capture a fiddler trace which can help to check the issue.
    Thanks,
    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us

  • How can I display file size in Finder

    Hi folks,
    I am trying to figure out where 40GB of data is hiding. I would like to see file sizes in the Finder window associated with my folders in Mountain Lion 10.8.2..  I'm having, what seems to me, a strange problem. When I 'Get Info' on my Hard Drive, the disc space left is only 40GB out of 120GB (ie used being 80GB). My confusion is that when I painstakingly go through the files, I can only account for 48 GB with 'Get Info' on each folder. This is a rather combersome process and I am hoping there is a work around for viewing the file sizes within Finder and not having to open 'Get Info' on each and every folder like I have been.
    I have a MacAir 13 inch 2011
    Thanks!

    Thanks for your time and suggestions, dominic23.
    I looked through both links and sadly, none of these suggestions have worked. I have tried many on my own since posting trying to figure out why the volume is being doubled on my hard drive. I've deleted log files, and done a sweep with Onyx to no avail. Strangely, the option of seeing the volumes under 'About this Mac' and 'System' does not have a listing for storage. Weird. I am the only user/administrator on this computer and I don't have shared files.
    I'm just stumped.

  • And, in general, how can I control the size of the firefox window?

    The Firefox window has become bigger, even before I clicked "full screen."
    So again, how do I control the size of the window/screen?
    == This happened ==
    Every time Firefox opened

    when opening a link within a window, I want it to open smaller so I can see the window behind it. How can I control that?

  • Can using "Reduce File Size" in Acrobat Standard 9 effect DPI

    I'm sure the answer is no to this question, but before I wholeheartedly recommend this fantastic tool for use throughout our firm, I need to know if there is the possibility of a PDF's functional DPI being reduced in a scanned PDF by using Reduce File Size.  What I mean, I guess, by functional DPI, is the DPI in the PDF after running the tool.  Courts require 300 dpi on scanned PDFs, which is our standard, but once in a PDF it's impossible to determine (as far as I can tell) DPI in a file.  I notice no reduction in quality when using this tool, but want to make sure that we aren't circumventing court guidelines when using it to help reduce the size of files scanned at 300 dpi.

    Hi Anoop,
    I can share the graphic file, but not the pdf which contains it (as it contains confidential information) - thanks!

  • Can I add file size to spotlight window?

    Currently the only file information that displays is name, kind and last opened. I'd like to get the file size to display as well to help me ID which version of files I want. For that matter can I add other parameters to the sortable bar at the top of the file list (even if they're not searchable parameters).
    Thanks

    We get three and only three choices. Can't even have date created or modified, which are searchable criteria, we are stuck with Last Opened (who in the world is ever looking for that anyway????). If you think this is absurd, be sure to let Apple know:
    http://www.apple.com/feedback/macosx.html/
    Tell all your friends and relatives to do the same. Enough people complained about the downgraded powers of Stacks so that Apple brought back the Tiger functionality that had been eliminated. Perhaps if enough people complain about the crippled Spotlight GUI we will see some of its former functionality returned.
    Francine
    Francine
    Schwieder

  • Can't get file size, possibly because of charset problem

    I have an application that needs to recursively find directory sizes, I have a class extending java.io.File with an internal method to do this:
    private static long getSize(File file) {
                    long size = file.length();
                    if (file.exists()) {
                            if (file.isDirectory()) {
                                    File[] files = file.listFiles();
                                    for (int i = 0; i < files.length; i++) {
                                            size += getSize(files);
    } else {
    System.out.println("Problem checking size on \"" + file + "\", reported file size is: " + file.length());
    return size;
    It works (matches du -b output) with the exception of some problematic files I have.
    Output from ls:
    $ ls -l
    total 5461
    -rw-r--r--  1 xyz users    1003 Feb 16 22:06 FileWRS.class
    -rw-r--r--  1 xyz users     831 Feb 16 22:04 FileWRS.java
    -rw-r--r--  1 xyz users     489 Feb 16 22:07 FolderSizes.class
    -rw-r--r--  1 xyz users     198 Feb 16 21:23 FolderSizes.java
    -rwxrwxrwx  1 xyz users 5568138 Apr 25  2004 test.?.abcOutput from du -b:
    $ du -b
    5583203 .Output from my code:
    $ java FolderSizes .
    Problem checking size on "./test.?.abc", reported file size is: 0
    15065The character displaying as "?" is actually an accented e character ("�") and displays correctly in konqueror (my gui file browser).
    I don't really know why it can't pick up the character, but I'm more interested in just getting the file size and ignoring the character problem, any solutions/suggestions for places to look? Do I need to supply more information?

    Try:
    LC_ALL=en_US.ISO8859-1 java FolderSizes .
    Does this help?Yes, that does fix it for my terminal, but if possible I would like a solution that can determine this at run time and solve (so that when it's running on some other terminal, with some other charset, with someother file system charset it will still work).
    Any ideas for doing this from withing the VM?
    p.s. thanks for the fast reply.

  • Can imessage send files size over 1gb to other mac?

    I am trying to send a file size about 1gb to another a friend who has macbook by using imessage.  I would see an exclamation mark next to the file i am trying to send. Is there a way to send large files through imessage?

    Hi,
    Messages can have the iMessages account and other non iMessage "Accounts" from AIM (Or valid with AIM) and Jabber IDs (which include Googlemail ones).
    These non iMessage Accounts are the ones that used to be used in iChat.
    Messages is effectively an iChat+ app
    File Transfers via the older "iChat Style" Buddy lists can be larger than email limits in some cases.
    There is an issue if the device you are sending a file to over iMessages is Off line.  The File Transfer will appear in the File Transfer window (See Window Menu) but not download/Sync when the device is back On line again.
    10:06 PM      Thursday; September 6, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • I can't control the size of the video boxes

    Ever since I've updated to the newest version of skype, my video boxes have been acing up. it makes everyone very tiny and only enlarges them when they talk. It use to be able to enlarge each person when i clicked on them but i cant even do that anymore. how do i set it back to the way it was? thanks!

    All you have to do is toggle between Dynamic and Normal view when on a video call to see if that adjusts it or allows it to make changes that you are used to. http://blogs.skype.com/2014/09/18/how-to-adjust-video-size-on-skype-group-calls/ If after that change, there is no difference, then the option isn't available in the release of Skype that you are using.

  • How can I reduce the file size when saving a psd as a pdf

    I have a psd with graphics and text, it is 8.5 x 11, 300 ppi
    I flatten the image and go to save as .pdf I un-check all of the options in general.
    In compression, I have tried a dozen different combinations and the way I've found to get a document that is not pixelated or blurry is to use jpeg 2000 > lossless or jpeg > maximum.
    So I have a high quality document but the file sizes are around 900 kb.
    I have downloaded other people's documents of the exact same type and size (8.5 x 11, 300 ppi) that I am making and viewed them in Photoshop, they are not pixelated or blurry and their file sizes are 300 kb or even less than 200 kb
    How are they doing this?!

    Delete all unused, invisible layers.
    Sometimes zip compression is better than jpg compression (in the pdf output settings). Zip is lossless, and works better with non gradient colour or no images.
    Flattening the image before you save it to pdf can reduce the file size if you are using jpg compression.
    Post a preview of your pdf and we can comment further on how to reduce the file size.

Maybe you are looking for

  • FINALLY INPUTTING and OUTPUTTING Annotations!

    Ok, before everyone thinks that this is a very bad solution, I have to tell that I`m no programmer and my knowledge of PostgreSQL, Ruby or any other language is very poor. With useful help from Jamie Hodge, fbm and Nicholas Stokes (mainly) I could ma

  • Slideshow on mobile me gallery

    What is the easiest way to post a slideshow (with itunes music) on my mobile me gallery?

  • CSS transitions problems..

    I'm using this Page Visibility code in my project, it was perfect in the last version but the latest version not quite.. First off, when I tabbed out of the project on a web browser and when you tab back into it.. (On the previous version) It complet

  • Am i able to do this with the iphone 4s?

    My question is am i able to use an iphone 4s bought in singapore (with a line already), where we use gsm network and bring it to south korea where they use cdma network and activate a line with a carrier with the iphone 4s i brought from singapore? a

  • How to expose model node to other dc

    hi, now i want to expose model node to other dc. so i create data link from interface controller to model.in fact,the model node is exposed to other dc,but when i use it, i can not use it. please tell me the right way to do it.thanks