Compress files

Hello!
I have large pdf-batch files which are to be split into smaller files according to certain rules. The Adobe Acrobat SDK code is something like (performed in a loop):
pdDocNew.Create( );
pdDocNew.InsertPages( -1, batchFile, startpage, numberOfPages, 0 );
pdDocNew.Save( (
short ) Acrobat.PDSaveFlags.PDSaveFull | ( short ) Acrobat.PDSaveFlags.PDSaveCollectGarbage, ed.OutputFile );pdDocNew.Close( );
The problem is that the file size of each newly created file is too large (1 200 kb). If I instead, manually opens the batch file and performs an Extract Pages, the file created is much smaller (40kb) so some kind of compression takes place in the code behind. 
Is it possible to retrieve the functionality of the "Document => Extract Pages" menu item from within the Adobe Acrobat SDK in any way?
There will be about 18 milllions of files, so both new file size and compression rate are really important to me.
Is it possible to optimize the batch files with batch commands instead? (In some files it seams like the fonts takes about 90 % of the size and in some the streaming content does.)
Is it perhaps better to do this in a completely different way?

If you are using 10g, there is a UTL_COMPRESS package that might be useful. I'm not sure what a .LST file is, though, so I'm not sure how useful Oracle's compression routines would be.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • Problem in Compresses file.Not able to see the data in file

    Hi All,
    I am downloading file into application server.
    Using:
    OPEN DATASET file FOR OUTPUT FILTER 'compress'.
    OR
    DATA: l_command(100) type c.
       CONCATENATE 'compress ' p_file INTO lw_command SEPARATED BY space.
        ENDIF.
        CALL 'SYSTEM' ID 'COMMAND' FIELD lw_command.
    When I see the file content it contains junk characters.
    If I want to see the data Do I need to uncompress the file.
    con't we see the data without uncompressing the file?.
    Regards,
    vinod

    Hi,
    Uncompress is required to read the content of an Compressed file.
    OPEN DATASET DSN FOR OUTPUT FILTER 'compress'.
    OPEN DATASET DSN FOR INPUT FILTER 'uncompress'.
    The first OPEN statement opens the file so that the displayed data can be read into it in compressed form.
    The second OPEN statement opens the file so that the data is decompressed when it is read from the file.
    http://www.sapnet.ru/abap_docu/ABAPOPEN_DATASET.htm#&ABAP_ADDITION_8@14@

  • Problems with compressing  files with right hand click. it does not work.

    Problems with compressing files with right hand click.
    I am using the compress function in the Mac OS (File > Compress XX) from time to time. Today it does not work anymore. OS 10.5.6
    I get a message: The content list cannot be created for compressing.
    I tried it with files and folders and keep getting this message. Anybody any idea as to how to fix this

    Thanks I love my macbook!!!!
    I also got further problems such as copy-paste not working etc.
    so I fixed it just this morning by running Applejack 1.5 and am back up running noticing your post.
    thanks for helping though!

  • Reading a Compressed File from a ZIP File, which is an entry of ZIP File

    Hello, Experts,
    Would it be possible somebody to help me with code example for the following problem?
    I want to read a compressed file from a ZIP file, which is an entry of ZIP File, without extacting/writing files on file system. Is this possible?
    Lets say we have a ZipFile1. There is ZipFile2 inside ZipFile1. And inside ZipFile2 is FileA. The scenario is reading FileA without extracting on file system.
    Thank you in advance for your help.
    Cheers
    RADY

    The classes you want to be using are java.util.zip.ZipInputStream and and ZipEntry from the same package. Construct the ZipInputStream with the input you have for the outer zip. Loop with ZipInputStream.getNextEntry until you find the inner zip you're looking for - that method returns a ZipEntry, and you get the name of the zip entry with ZipEntry.getName. Read the ZipInputStream from that point into some buffer, and read that buffer into a new ZipInputStream - rinse and repeat until you have the contents of the file in the zip in the zip...

  • How to search for file within compressed file

    I hope i can explain this correctly, I apologize in advance.
    What is the command to search for a file that may/may not exist within another compressed file?
    Situation is that I have a cron job that compresses the files in a folder on a scheduled date. I now need to search for a file that may exists in one of the several compressed files, which was a result of the cron job.
    Thanks in advance

    There's an open source utility called zgrep. You can probably get it from http://www.sunfreeware.com/ .
    HTH,
    Roger S.

  • Export to disk compressed files only? bad bad bad

    When I select the export to disk under the share menu, it will only export compressed files. This is a drag because the only way to export an aiff is if you send it to itunes. Am I wrong about this, is there something that I am missing?
    Exporting to disk allows you to select a destination for the export and this is highly desirable because I don't like cluttering up my itunes library with snippets of songs or individual tracks.
    If this is the case than GB 3 has a serious design flaw. Export to disk is a basic function of all music software. To hobble this on purpose is beyond my understanding.
    Anyone out there know the answer?

    Garageband 1 and 2 have the same flaw. 8^) Exporting to iTunes is the "official" Apple way. I would create a special playlist for your GB exports so you can keep track of them and delete them as necessary.

  • File Share Search problem with Compress file

    I have a content source in SharePoint 2013 search which crawl files from a file share. Some of the files have "Compress contents to save disk" attribute set to true. 
    These files are being crawled as I can see them in Crawl logs. But when I search for these documents in search center, it only return the documents which don't have compression attribute set.  I have even tried searching document title. Any idea?

    Hi Rashid,
    What keyword did you use for searching the compressed file?
    As your description, I set a file as the below:
    Then I created a File Share content source pointed to the folder which contains the file, then start a full crawl.
    After crawling, I went to my search center, and searched, the result was:
    When you search the compressed file, check whether the item title returns a part of the content of the document.
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Permission denied - unable to "compress" file

    Hi I have a weird scenario which I would need help on.
    SunOS mysvr 5.10 Generic_127127-11 sun4u sparc SUNW,Sun-Fire-880
    I have a user "myuat" which belongs to a group "pc"
    # id
    uid=30008(myuat) gid=101(pc)
    and in /etc/group
    pc::101:otheruat,myuat
    I am running a compress command to compress a file in a directory and I get permission denied
    # cd /myprod/mycor/mycom/myarch
    # compress mytxtcom.20080804
    mytxtcom.20080804: Permission denied
    # ls -l mytxtcom.20080804
    ----rwx---+ 1 myuat pc 239268 Aug 5 00:23 mytxtcom.20080804*
    # getfacl mytxtcom.20080804
    # file: mytxtcom.20080804
    # owner: myuat
    # group: pc
    user::---
    group::rwx #effective:rwx
    group:hmis:r-- #effective:r--
    mask:rwx
    other:---
    # getfacl /myprod/mycor/mycom/myarch
    # file: /myprod/mycor/mycom/myarch
    # owner: root
    # group: pc
    user::---
    group::rwx #effective:rwx
    group:hmis:r-x #effective:r-x
    mask:rwx
    other:---
    I noticed that if I chown from:
    ----rwx---+ 1 myuat pc 239268 Aug 5 00:23 mytxtcom.20080804*
    TO:
    ----rwx---+ 1 root pc 239268 Aug 5 00:23 mytxtcom.20080804*
    then I will be able to compress the file, why? I wonder why "myuat" id is not able to compress file eventhough it belongs to same group?
    ----rwx---+ 1 myuat pc 42120 Aug 5 00:23 mytxtcom.20080804.Z*
    Any idea? Please help.
    Thanks

    Were you the root user when you compressed the file?
    It looks like the user 'myuat' does not have permission to write to the '/myprod/mycor/mycom/myarch' directory. You need to have write permission to the directory in order to compress a file in it, even if you have permission to write to the file itself.

  • How to check for a compressed file

    hi,
    I need to restrict the user to upload only compressed files (zip,sit etc.).
    how do u check whether the input file is compressed or not. is there any way to do that? or should i check only with the extension?
    Thanuja.

    Checking the extension is the best what you can do. You can also consider the java.util.zip API [1] to check if the file is decompressable, but that is rather expensive.
    [1] http://java.sun.com/j2se/1.5.0/docs/api/java/util/zip/package-summary.html

  • Passing a binary file to class outputing a compressed file

    Hi,
    Am i writing a program which gets passed a file to encode via "java compressor < <filename>".
    Compressor is a class with main method.
    what i have right now is simply:
    public class Compressor {
         * @param args the command line arguments
        public static void main(String[] args) {
            InputStream in = new FileInputStream ("");
            File f = new File ("");
            ByteArrayOutputStream out = new ByteArrayOutputStream (f.length());
            int i;
            while ((i = in.read()) != -1) {
                out.write(i);
            in.close();
            byte[] result = out.toByteArray();
            for (int j = 0 ; i < result.length ; j++) {
                byte a = result[j];
    } The program is suppose to read the input one byte at a time and treats each one as an instruction which encodes byte compressoring the file and finally outputing this newly compressed file. I'm not sure how the main method will take the filename i.e "java compressor examplefile", any guidance would help greatly.
    Thanks

    in the case above, the command line arguments are passed in the aaaaaaaaaaaaaaaaaaaaaaarggggggggggs array
    you probably want aaaaaaaaaaaaaaaaaaaaaaarggggggggggs[0] for the filenameAm not sure i understand, do you mean i must change the param of the main method to String[] args[0] as this resulted in error when i did so. Or do you mean at command line instead file simply being passed to the Compressor program as
    "java Compressor < examplefilename"
    It has to be "java Compressor < examplefilename[0]" ?
    If you could expand on this, would be grateful,
    Thanks.

  • Editing a compressed file

    So say I have a project in 1080i60 and i compress it down to an MP4 or just a smaller .mov at H.264. Then I delete the original 1080i60 but I need to change the volume level or cut out a small part of the movie. If I put the compressed file in FCP and export it...will it have the same compressed quality? I know obviously it wont be better quality....what is the best way to export it to maintain the quality...knowing that since it is already compressed?
    Or the basic question...should you even edit a compressed file or just take your loss and re-edit the original 1080i60?

    If all you are doing is cutting, then you probably will not be recompressing. An easy way to tell is how long it takes to export. It it looks like it will take a long time, then it is probably conforming and recompressing the video. That is bad. But it might be possible to cut out a portion, and save as a self-contained movie rather quickly.
    You could try doing that with QT Pro, as it is sometimes clearer than FCP about saving video versus compressing video. Some codecs require conforming in FCP if you look at them funny.
    As far as audio, I'm guessing you would be able to extract the audio and video tracks, modify the audio, and add the tracks back together. Again, I personally would feel better about this kind of track manipulation in QT Pro.

  • Reading a compress file in a jar.  JarFile or JarInputStream?

    I am trying to read a file out of a jar file. With the following code. Depending on where the file is I get different types of Objects returned. The file is quite big so I would like to compress it in the jar file. When I compress it I cannot use it. It works for the first two cases. On the third case I get an out of memory error. On the third case I tried to cast it as a ZipFile or ZipInputStream I get a runtime exception in the casting.
    What should I do to get this to work? I don't understand why Visual Cafe is telling me it is a ZipFile in the value section in the debugger.
    Object tin=(Object) getClass().getResourceAsStream(_cinfo.pbl);
    JDWC_customer.setSourceStream((java.io.InputStream) tin);
    CASE 1. File read off of disk.
    instance of java.io.BufferedInputStream(id=1089)
    CASE 2. File read out of a jar file uncompressed file.
    instance of java.util.zip.ZipFile$ZipFileInputStream(id=1089)
    CASE 3. File read out of a jar file compressed file.
    instance of java.util.zip.ZipFile$1(id=1417) File Compressed
    Does anyone have any sample code that does this?
    Thanks

    Since a jar file is a zip file, it doesn't make a lot of sense to me to compress the data twice. I would do one of these two things:
    1. Zip your data separately but do not include in your jar.
    Instead, provide the zip along with your jar file. Place a reference to your zip in the manifest of your jar -> in the Class-Path attribute.
    2. Let the jar zip your data up for you.
    Either way, I like to use the system classloader to grab data:
    InputStream is = ClassLoader.getSystemResourceAsStream("whatever.resource");-Ron

  • Context search in compressed files

    Is there any way of searching for content in compressed files?
    For example: if I have five text files in a zip file (and this zip is in iFS), iFS is able to make a context search inside those text files? In our application, the context search works great, but we faced this problem with the zip's.
    Thanks in advance,
    Fabio.

    Hi ,
    We too have the same problem apart from peformance problem.Looks like iFS API's need lot of improvements.

  • IMPORT & EXPORT from/to compressed files directly...

    for newbies a tip to import(export) directly to(from) compressed files using pipes . Its for Unix based systems only, as I am not aware of any pipe type functionality in Windows. The biggest advantage is that you can save lots of space as uncompressing a file makes it almost 5 times or more. (Suppose you are uncompressing a file of 20 GB, it will make 100 GB) As a newbie I faced this problem, so thought about writing a post.
    Lets talk about export first. The method used is that create a pipe, write to a pipe(ie the file in exp command is the pipe we created), side by side read the contents of pipe, compress(in the background) and redirect to a file. Here is the script that achieves this:
    export ORACLE_SID=MYDB
    rm -f ?/myexport.pipe
    mkfifo ?/myexport.pipe
    cat ?/myexport.pipe |compress > ?/myexport.dmp.Z &
    sleep 5
    exp file=?/myexport.pipe full=Y log=myexport.logSame way for import, we create a pipe, zcat from the dmp.Z file, redirect it to the pipe and then read from pipe:
    export ORACLE_SID=MYDB
    rm -f ?/myimport.pipe
    mkfifo ?/myimport.pipe
    zcat ?/myexport.dmp.Z > ?/myimport.pipe &
    sleep 5
    imp file=myimport.pipe full=Y show=Y log=?/myimport.logIn case there is any issue with the script, do let me know :)
    Experts, please have a look...is it fine ? (Actually I dont have Oracle installed on my laptop(though have Fedora 6) so couldnt test the scripts)
    I posted the same on my blog too. just for bookmark ;)
    Sidhu
    http://amardeepsidhu.blogspot.com

    actually, only the compression thing runs in the background. rest proceeds like normal only. just instead of giving normal file we use pipe as a file.
    nice article about named pipes
    Sidhu

  • I compressed Activity Monitor and deleted the compressed file in error. How do I get it back?

    In trying to reduce my CPU load, I compressed the Activity Monitor. Before I can use the compressed file, I mistakenly deleted it and now when I try to open it, I get the dreaded spinning wheel. After a long wait, I forced quit.
    What happened and how do I get Activity Monitor back?

    Never tamper with programs which come with the system. You could try downloading and applying the 'combo updater':
    http://support.apple.com/kb/DL1399
    However this won't help if Activity Monitor hasn't been updated since the initial release, which may well be the case. In that event you will need to reinstall Snow Leopard from your original install disks and then apply the combo updater again.
    Alternatively it may be possible to extract Activity Monitor from the installed disk by using Pacifist - no promises about that.

  • Compress files and folders in OS 10.6

    How do I compress files and folders in OS 10.6?

    If you have Compressor, there are many options to compress files.
    If you don't, there ere some QuickTime h,264 options available as well,
    But since you mention folders, I'm guessing that you're not referring to AV files specifically but to zipping generically. If so, right click and choose the Compress  option.

Maybe you are looking for

  • Can I have 2 Time Machines for 2 backups?

    I have an external hard drive that I use for my time machine. Recently I've been having some problems with my iMac that are hard drive related. I wasn't able to repair using disk utility and had to erase and reinstall Snow Leopard and then transfer e

  • Use of activating SAP default ATM window in DBACOCKPIT

    Hi Friends, As part of Glive implementation SAP asking us The SAP default ATM window is not configured/active. What is the use of ATM Configuration and Diagnostics. What are advantages of we activating SAP default ATM window using DBACOCKPIT. Please

  • Black and White Photos

    My husband recently tried his hand at setting his Canon OES (?) to the black and white picture selection for photos. The photos are okay but kind of flat...not a whole lot of "pop". Is there anything I can do within PSE3 to "fix" this? I've played wi

  • Im trying to install Photoshop CS6 and its saying the serial number is invalid?

    Im trying to install Photoshop CS6, and i recieved my serial number after entering my redemption code. But whenever i entered my serial number it told me it was invaild.

  • View Reports for individual Collections

    Hello, Is there a way to view Reports for individual Collections?  When I review my Usage Reports or look at Reports within the PSM I only get a break down of total user actions per day for the whole site.  I don't see a way to view data for just a s