ZIP file

I developed a 1 page Xmas comic using 'comic life' and photos dragged from iPhoto. I exported it to PDF so it was easier to email to people. The size of the PDF is 12 Mb. However when I tried to compress it using the inbuilt leopard features, the zip file remained at 12Mb. Any clues would be most welcomed as to why it did not compress and how I maybe able to do it better in the future.
Andrew

The simple answer is here ...
http://docs.info.apple.com/article.html?path=Preview/3.0.1/en/pv1037.html
The more complex answer is that there is a usually trade off between quality and compression ratio. There are various options available depending on what you want to do and how much loss you will tolerate. One option is to using something like Photoshop and compress the resulting image file. PDF uses its own compression method for optimizing the size. If you want high quality, you may not be able to compress it much more than what you already have, but do a web search on file compression if you want more background.

Similar Messages

  • Unable to unarchive ZIP file Error - 1

    Every time I try to archive a ZIP file, i get the message "Unable to archive (Error - 1)" How can I fix this?

    I have to agree, the most likely scenario is a bad file. As I mentioned earlier, I don't think there are any Mac utilities for attempting a repair. "Repair" is somewhat vague. If a file is bad it is missing data, and likely this data is critical to the running of the file. If you could repair this file (say, on a PC) you still might end up with a corrupt movie file which might refuse to play. Even if the movie plays it might end early or something.
    Could this possibly be part of a multi-part archive set? The file extension is totally wrong for that but the "05" suggest more than one of something.
    I have also read there are some obscure utilities that do flavors of zip that can't be opened on Macs.

  • I can't update Fiefox since update 10.o1 or 10.02. Every time I try to I get the same message, "7 - ZIP File is missing" I don't know how or where to correct this problem. I'd really appreciate any help that corrects this problem. Thanks sovery much,

    Missing "7-Zip File"
    Hello,
    I haven't been able to update Firefox since 10.01 or 10.02 because every time I try I get the same message the "7-ZIP File" is missing. Then the update fails. I've submitted this problem to Mozilla Firefox and, got an immediate reply of " they are researching your problem".
    Well, you can tell how long that has been. Is there anything I can do, or any where I can go to get the file I need?
    Any constructive help would be very much appreciated! I'm not sure If I'll ever be able to find where this is located. But I do appreciate help just the same.

    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files by Firefox.<br />
    Disable your anti-virus software temporarily to see if that makes installing work.
    Download a fresh Firefox copy and save the file to the desktop.
    *Firefox 11.0.x: http://www.mozilla.org/en-US/firefox/all.html
    Uninstall your current Firefox version, if possible.
    *Do NOT remove personal data when you uninstall the current version or you lose your bookmarks and other data because all profile folders will be removed.
    Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.
    *It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    *http://kb.mozillazine.org/Uninstalling_Firefox
    Your bookmarks and other profile data are stored elsewhere in the Firefox Profile Folder and won't be affected by a reinstall, but make sure that you do not select to remove personal data if you uninstall Firefox.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Profile_backup
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

  • Error reading zip file in Java 6

    We have a bespoke installer program that fails, intermittently, in Java 6 on Windows. After installing some files, it then fails with a stack trace like this:
    java.util.zip.ZipException: error reading zip file
         at java.util.zip.ZipFile.read(Native Method)
         at java.util.zip.ZipFile.access$1200(ZipFile.java:29)
         at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:447)
         at java.util.zip.ZipFile$1.fill(ZipFile.java:230)
         at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at com.XXXX.trent.installer.Installer.writeStreamToFile(Unknown Source)
         at com.XXXX.trent.installer.Installer.installFile(Unknown Source)
         at com.XXXX.trent.installer.PatchFileInstaller.installFile(Unknown Source)
         at com.XXXX.trent.installer.PatchFileInstaller.installFiles(Unknown Source)
         at com.XXXX.trent.installer.UpgradeInstaller$TpfAction.run(Unknown Source)
         at com.XXXX.trent.installer.UpgradeInstaller.runActions(Unknown Source)
         at com.XXXX.trent.installer.UpgradeInstaller.install(Unknown Source)
         at com.XXXX.trent.installer.TrentInstall$SoftwareInstallStage.install(Unknown Source)
         at com.XXXX.trent.installer.TrentInstall$UpgradeInstallWorker.install(Unknown Source)
         at com.XXXX.trent.installer.PatchInstall$InstallWorker.construct(Unknown Source)
         at com.XXXX.trent.utils.SwingWorker$2.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:619)The same code works in Java 5 on the same environments that it now fails in Java 6 (1.6.0_16).
    Any ideas?
    Thanks.

    gimbal2 wrote:
    it is not weird, it is a bug in the application. Don't let the upgrade from Java 5 to Java 6 make you believe otherwise.It's a singularly bad exception message though. I would have thought that something from java.util might be a bit more explicit about what the problem is.
    Winston

  • Error reading zip file containing an excel file

    Hi all,
    Using servlets I am able to zip an excel file using java.util.zip package. The excel file is created using POI API.
    While I save and extract the zip file on my machine and then open the file in MS Excel. Excel pops a message saying "MS Office Excel has encountered a problem and need to close" and it gives me an option to "Recover my work and restart MS Office Excel". I select the option and then MS Excel does a document recovery and I am able to view my data. I get an excel repair log file saying as follows
    "Microsoft Office Excel File Repair Log
    Errors were detected in file 'C:\Documents and Settings\JohnDoe\Desktop\excel\test.xls'
    The following is a list of repairs:
    Damage to the file was so extensive that repairs were not possible. Excel attempted to recover your formulas and values, but some data may have been lost or corrupted.
    I have attached my servlet code down below I suspect there is a problem with PrintWriter to output or do I need to use OutputStream to write excel data.
    Below is my servlet code:
    import java.io.*;
    import javax.servlet.*;
    import org.apache.log4j.Logger;
    import java.util.*;
    import java.util.zip.*;
    import java.net.*;
    import org.apache.poi.hssf.usermodel.*;
    import org.apache.poi.hssf.record.*;
    import org.apache.poi.hssf.util.*;
    public class ZipServlet extends HttpServlet {
         * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest,
         * javax.servlet.http.HttpServletResponse)
         public void doGet(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException {
              makeZip(request, response, "GET");
         * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         protected void doPost(HttpServletRequest request, HttpServletResponse response)
                   throws ServletException, IOException {
                   makeZip(request, response, "POST");
         public void makeZip(HttpServletRequest request, HttpServletResponse response, String methodGetPost) {
              Logger logger = Logger.getLogger(ZipServlet.class);
              try
                   int id=1;
                   ServletContext sc = getServletContext();
         HttpSession session = request.getSession();          
                   ConnectionPoolManager cpm = (ConnectionPoolManager)sc.getAttribute("CONNECTION_POOL_MANAGER");
                   ConnectionPool cp = cpm.getConnectionPool(id);
              createTestExcelZip(request,response,methodGetPost,session);
              } catch (Exception e2) {
         public void createTestExcelZip(HttpServletRequest request, HttpServletResponse response,
                   String methodGetPost,HttpSession session
                   )throws ServletException, IOException
              Logger logger = Logger.getLogger(ZipServlet.class);
              try
              {      //Create an Excel Workbook and placing value "Test" in the first cell
                   HSSFWorkbook wb = new HSSFWorkbook();
                   HSSFSheet sheet = wb.createSheet("new sheet");
                   HSSFCell cell=null;
                   HSSFRow row = sheet.createRow((short) 0);
                   short column = 0;
                   cell = row.createCell(column);
                   cell.setCellValue(new HSSFRichTextString("Test"));
                   HSSFCellStyle fontStyle = wb.createCellStyle();
              HSSFFont f = wb.createFont();
              f.setFontHeight((short) 200);
              f.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
              fontStyle.setFont(f);
              cell.setCellStyle(fontStyle);
              response.setContentType("application/zip");
                   response.setHeader("Content-Disposition","attachment; filename=zipExcelRecordFiles.zip;");
                   int BUFFER = 2048;
                   byte buf[]=new byte[300000];
                   ByteArrayOutputStream baos = new ByteArrayOutputStream();
                   ZipOutputStream zos = new ZipOutputStream( baos );
                   ByteArrayInputStream is = null;
                   BufferedInputStream origin = null;
                   byte[] b = null;
                   String fileName = null;
                   b = wb.getBytes();
                   fileName = "testExcelRecords.xls";
                   try
                   is = new ByteArrayInputStream(b);
                   origin = new BufferedInputStream(is, BUFFER);
                   zos.putNextEntry(new ZipEntry(fileName)); // Add ZIP entry to output stream.
              int count;
              while((count = origin.read(buf, 0, BUFFER)) != -1)
              zos.write(buf, 0, count);
              zos.closeEntry(); // Complete the entry
                   is.close();
                   }catch(Exception e)
                        logger.error(e);
                   zos.close();
              PrintWriter pr = response.getWriter();
                   pr.write(baos.toString("ISO-8859-1"));
                   pr.close();
              catch(Exception e)
              logger.error(e);     
         * @see javax.servlet.GenericServlet#destroy()
         public void destroy() {
    Any help would be appreciated.
    Regards
    jdcunha

    Jdcunha,
    I am new to the field but encountered the same problem and recently found a solution. Hope this helps.
    For my project I wanted to create individual Excel 2003 workbooks for each file I created. Excel would give me the same error it gave you when I used the same HSSFWorkbook object. I tried creating a new Workbook object each time, but ran into the same issue.
    I ended up fixing the error by creating a new instance of my write-to-excel class each time I wanted to create a new workbook, instead of just recreating a new HSSFWorkbook object. It works perfectly and the Excel errors don't show. It may also be important to note I used OutputStream, I did not try it with printwriter.

  • How to exreact multiple pdf files from a zip files from application server to presentation server

    Hello exprts,
    I am passing one pdf file and one text file to zip file in apllication server through my custom program and then downloading it using standard function module to my desktop. its working fine. Then I added  another pdf file to my zip file. But only single pdf file is getting download . So can you please help me regardiong this issue? 

    Dear Experts ,
    I finded out the way to extrcat pdf files in presentation server. But now my problem is that I am not able to add multiple pdf files in a zip file. When I am adding new pdf file then older one is not coming in read data set. So please kindly tell me how can I add multiple pdf file in my zip file and again I can get all the pdf files from here.

  • Problem on windows xp with downloaded zip file

    Hi,
    I have written a JSP to download file which is as follows
    try
    response.setContentType("application/download");
    response.setHeader("Content-Disposition","attachment;filename=<FileName>");
    int iRead;
    FileInputStream stream = null;
    try
    File f = new File(<FilePath>);
    stream = new FileInputStream(f);
    while ((iRead = stream.read()) != -1)
    out.write(iRead);
    out.flush();
    finally
    if (stream != null)
    stream.close();
    catch(Exception e)
    //out.println("Exception : "+e);
    After downloading zip file, could not extract files on windows XP by using any tool or built-in extractor i.e. compressed(zipped)folders (error: compressed folder invalid or corrupted).
    But this works on win2k or win98
    How can i work with it or can anyone tell me a solution to handle such a problem.
    Thanks in advance.
    Rajesh
    [email protected]

    This could be a problem with the built-in ZIP program in Win XP - it's possible that the ZIP you are downloading (uploading?) is simply incompatible with the XP program. In Win 98 & 2000, you would have to use your own ZIP program, e.g. Winzip, and that can handle more formats that the XP program.
    Try installing the same ZIP program that you have on w98/2k on your XP machine, and see if you can open the uploaded file using it.

  • IPad: Open AES-encrypted zip files?

    Is there an app which allows one to open zip files that were encrypted with AES-128 or AES-256?  There was a discussion last year (https://discussions.apple.com/message/12429143) saying that there were none at the time, but I'm hoping for some progress since then.  GoodReader, Filer LIte, and USB Disk Pro all failed to read files encrypted with either algorithm.  Thanks,
    John

    Is there an app which allows one to open zip files that were encrypted with AES-128 or AES-256?  There was a discussion last year (https://discussions.apple.com/message/12429143) saying that there were none at the time, but I'm hoping for some progress since then.  GoodReader, Filer LIte, and USB Disk Pro all failed to read files encrypted with either algorithm.  Thanks,
    John

  • Why does a link to zip file on server open a blank web page?

    Using CS6, I created this page:  J & B Computers - Projects I've uploaded 2 zip files and linked them from this page with this code:  <a href="Zip Files/CheckIPApp.zip" target="_blank">Download a zip file of the IP Checking utility</a> When this link is clicked, it opens up a blank tab instead of prompting for a download. I've tried it with and without the target=blank, I've also tried target=new... I've tried it in Chrome and Firefox. I've tried it on different computers. I've searched for an answer for hours...  what the heck is going on? I want the link to open up the save/download box and it just won't... TIA if you have a resolution!

    Since it's a file download, there's no reason to add the target="_blank", I'm guessing your file is 404 for some reason which would give you a blank window per the target.
    Make sure the case structure of the file and link are identical. Servers are case sensitive, a server sees CheckIPApp.zip and checkIPApp.zip as totally different files. Your local OS sees them as the same thing so during local testing it will work, when uploaded, it won't.
    Make sure you've loaded the file onto the server at the exact location specified by the link. It should be in a folder called "Zip Files" that resides on the same directory level as the page that the link is on.
    You may also want to normalize your file names. They should be all lower case alpha-numerics without any spaces (use hyphens or underscores instead) and without special characters ($%&*). You can use DW's Files window to change names and DW will fix the links automatically.

  • Read a zip file from Application server.

    Hi,
    Is there a way to read a zip file from the applicatoin server to internal table in ABAP program?  The operation system is running MS windows server.  The zip file contains only 1 text file.  I tried to use open dataset 'uncompress', and use read dataset, but read dataset gave me sy-subrc = 4.  Any feedback is greatly appreciated.
    Thanks.

    hi,
    to convert xstring to text you can use this:
    DATA unzipped_data TYPE xstring.
    DATA text_data TYPE string.
    DATA conv_x2c TYPE REF TO cl_abap_conv_in_ce.
    conv_x2c = cl_abap_conv_in_ce=>create( ).
    conv_x2c->convert( EXPORTING input = unzipped_data IMPORTING data = text_data ).
    moreover, if you want to split your text at "end of line" (CR LF in microsoft windows) into lines:
    DATA text_lines TYPE TABLE OF string.
    SPLIT text_data AT cl_abap_char_utilities=>cr_lf INTO TABLE text_lines.

  • Problem with Java and Zip Files

    Hello there everyone. I have a problem with trying to zip up directories with empty folders in them. They zip fine with my code, but according to winzip, the number of files in the archive is incorrect. It's supposed to have a total of 288 files in it, but when it's zipped up, it only says 284. I mention specifically the "empty directories" note because the zipping works fine without empty folders.
    Below is the code for the zip method:
    public static void zip(File[] list, File zipfile, File zipRoot)
         throws IOException {
          if (!zipfile.exists()) {
                   zipfile.createNewFile();
              else if (!zipfile.isFile()) {
                   throw new IOException("The zip file, " + zipfile.getAbsolutePath()
                             + " is not a file.");
              if (list.length == 0) {
                  LOG.error("The list of files to zip up is empty.");
              for (int i = 0; i < list.length; i++) {
                   if (!list.exists()) {
                        throw new IOException("The file or directory, " + list[i].getAbsolutePath()
                                  + " does not exist.");
              FileOutputStream fos = new FileOutputStream(zipfile);
              ZipOutputStream zos = new ZipOutputStream(fos);
              for (int i = 0; i < list.length; i++) {
                   if (LOG.isDebugEnabled())
                        LOG.debug(i + ": " + list[i].getName());
                   String entryName = getRelativeName(list[i], zipRoot);
                   if (list[i].isDirectory()){
                        if (list[i].listFiles().length == 0){
                             ZipEntry entry = new ZipEntry(entryName + "/");
                             zos.putNextEntry(entry);
                   else {
                        ZipEntry ze = new ZipEntry(entryName);
                        zos.putNextEntry(ze);
                        byte[] buffer = new byte[8096];
                        FileInputStream fis = new FileInputStream(list[i]);
                        int read = 0;
                        read = fis.read(buffer);
                        if (LOG.isDebugEnabled())
                        LOG.debug("\tFound " + read + " bytes.");
                        if (read == -1){
                             //empty file, but add it for preservation.
                             //zos.write(buffer,0,0);
                        while (read != -1) {
                             zos.write(buffer, 0, read);
                             read = fis.read(buffer);
                        fis.close();
                        zos.closeEntry();
              zos.close();
    The files look like they're there, but I need the system to be able to determine the number correctly. 
    Here's the interesting thing:  It zips the files, and then when I use the size() method for zip files in java, it says 284 files.  But when I unzip, it says 288 again.  It's like there's files missing when compressed, but when decompressed, they return.  Note that the files are actually there.  If I open the archive in a third party app such as Winzip AND Winrar AND IZarc, they all show 288 files.  Any idea what would make the number of files appear incorrectly in a zip file when zipped by java with the code above?  Thanks in advance.
    - Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I figured out the problem. When zipping files in windows using winzip, it doesn't explicitly count folders as a "file/folder" as a file in itself. It will create the folders for files to go in, but the folder itself will not be 'counted' when you query the info of the file itself. You have more control of the zip file in java, and can count the folder as a file or not.

  • I am trying to save a document with the new pages and it will only save as a zip file any ideas on how to change this?

    I am trying to save a document with the new Pages and it is only saving as a ZIP file anyone know how to fix this or choose a different file type?

    Take a look at the FileSelector
    First make sure the FileSelector is expanded so you can see the directory and sidebar. That's what the little disclosure triangle up by the filename is for. Once the FS has been expanded to look like the above picture, look to see what subdirectory has been selected. Use the SideBar to select an appropriate one.

  • I am trying to import BPM Project.zip file into Oracle enterpriserepository

    I am trying to import BPM Project.zip file into Oracle enterpriserepository from admin tab.
    I am getting the following exception. please help if any one know the solution.
    Performing import...
    Import Failed: Error [100]: An unknown server-side error occurred. Please record stack trace (if available) and contact technical support.
    com.flashline.exception.LoggableException: trouble parsing file in import bundle: SampleWScall/activityGuide.agdl
         at com.flashline.cmee.openapi.service.subsystem.impexp.XMLTranslator.decode(XMLTranslator.java:157)
         at com.flashline.cmee.openapi.service.subsystem.impexp.ImportJob.doJob(ImportJob.java:74)
         at com.flashline.cmee.openapi.service.subsystem.impexp.AbstractJob.perform(AbstractJob.java:75)
         at com.flashline.cmee.openapi.service.subsystem.impexp.JobThread.run(JobThread.java:41)
    Audit results stored in:
    C:\Users\AVINAS~1.YEL\AppData\Local\Temp\import-4705112223687937017.log
    Audit for [Import job.] created on [2012-09-24 11:53:59 IST].
    2012-09-24 11:53:59 IST - Adding Import job with ID=[50403] to job queue.
    Thanks in Advance.

    Hi
    Why are you trying to import BPM zip file are you trying to configure the out of the box workflows?
    They are something that need to be deployed from the process admin on BPM.
    There would be the .exp file you would need as its BPM 10g that you would need to use.

  • Unable to find ODI_SAmple_DATA.zip file to work with oracle profiling.

    I am unable to find ODI_SAmple_DATA.zip file to work with oracle profiling.Any help regarding profiling???Do i need to
    copy it from sw installation folder.?How profiling is different or related to odi data quality???Do we take source data twice -
    1) For ODI target load
    2)For profiling into entities.

    Try:
    http://www.oracle.com/technology/products/oracle-data-quality/pdf/oracledq_sample_data.zip
    and
    http://download.oracle.com/otn/nt/ias/101340/oracledq_sample_directory.zip
    Hope this helps.
    G

  • NCS reports email as zip files

    I recently migrated from WCS to NCS and since the migration all the reports are being sent inside a zip file.  I remember having this issue when I first installed WCS many years ago, however I am unsure what was done to correct it.  I have checked the Administration section of NCS to try and find the setting but no luck or within the Report Launch pad on any of the migrated reports or the new reports.
    I don't want them sent as zip files but as either native CSV or PDF as specified within the appropriate report.  The reports are never that big to need compressing into a zip plus the mail server they send through will accept up to 20-25MB attachments which is much greater than the native size of any of the reports generated through NCS or WCS.

    I agree, I email quite a few csv reports and the file size is typically under 1k. It is strange they don't making the zip file an option instead of doing it mandantory with every e-mail. I find it very cumbersome when dealing with 10 - 12 reports and having to unzip every file first.

  • Zip file as a SOAP attachment problem

    I have an application that sends a zip file as an attachment. I have the file stored on the server and before I send it, I delete and/or add some files in the archive. I use the zip util packages for the zip file editing. I encode it to base64 and then send it as an attachment using SAAJ.
    On the receiving end, I decode it and write it out to disk. Winzip opens the file ok, but when I try to open individual files I get either corrupted data or wrong crc errors. Some files open ok.
    For debugging right before I encode and send it, I write it out to a temp file. Using Winzip, I can open and access any file ok. When I compare this temp file with the response version, they match up. The file properties (size, compressed size, crc) match for those files I can't open.
    I use the com.sun.mail.util.BASE64EncoderStream and com.sun.mail.util.BASE64DecoderStream classes for the base64 operations.
    The errors are:
    1) Warning: the size of the extracted file (570) does not match the uncompressed size (63) recorded in the zip file
    or
    2) Error: invalid compressed data to inflate
    Any help would be greatly appreciated, or general advice for sending zips as SOAP attachments.

    Would you mind, can u send the code pls...

Maybe you are looking for