PDDocSaveWithParams saving files of little to no size

Hi there,
From my Reader-Enabled Plugin, I am trying to save a copy of a document to the user's temporary directory using PDDocSaveWithParams
This works fine, about 90% of the time. The other 10% I get either a 0byte file or a file of very small size  (i.e. 275 bytes instead of 81.4kB)
This occurs in Reader with Protected mode either on or off. Using PDDocSave returns "An Unimplemented or Obsolete function was called".
I am at a loss as to why this happens only every now and then, I have tested on multiple machines with the same result.
Code below, saveFilePath points to the users temp directory.
ASFile asFile = PDDocGetFile(doc);
ASFileSys fileSys = ASGetDefaultFileSysForPath(ASAtomFromString("Cstring"), saveFilePath);
ASPathName pathName = ASFileSysCreatePathName(fileSys, ASAtomFromString("Cstring"), saveFilePath, NULL);
PDDocVersion* majorP = new PDDocVersion();
PDDocVersion* minorP = new PDDocVersion();
PDDocGetVersion(doc, majorP, minorP);
PDDocSaveParams saveParams = (PDDocSaveParams)malloc(sizeof(PDDocSaveParamsRec));
saveParams->size = sizeof(PDDocSaveParamsRec);
saveParams->major = *majorP;
saveParams->minor = *minorP;
saveParams->mon = NULL;
saveParams->monClientData = NULL;
saveParams->cancelProc = NULL;
saveParams->cancelProcClientData = NULL;
saveParams->preSaveProc = NULL;
saveParams->preSaveProcClientData = NULL;
saveParams->offsetProc = NULL;
saveParams->offsetProcClientData = NULL;
saveParams->preWriteProc = NULL;
saveParams->preWriteProcClientData = NULL;
saveParams->saveFlags = PDSaveFull | PDSaveCopy | PDSaveCollectGarbage;
saveParams->fileSys = fileSys;
saveParams->newPath = pathName;
PDDocSaveWithParams(doc, saveParams);
ASTFilePos newFileSize;
newFileSize = GetFileSize(saveFilePath);
ASFileSysReleasePath(fileSys, pathName);
free(saveParams);
free(majorP);
free(minorP);

I would recommend that you submit a formal support request for this type of thing

Similar Messages

  • Why are files in Firefox 33 cache directory different size than saved files on desktop

    In previous versions of Firefox I used the cache directory to extract videos, flash files and hidden images, that were not saved in folder and a HTML Document file on desktop. For Example the opening image of a YouTube Video can not be extracted and saved from Firefox but is stored in the cache directory.
    To find these files without going through them one at a time, I would copy the cache folder on a desktop folder and then use Double Killer to delete the same size files in both the cache and the saved files in the desktop file folder. The files that are left behind in the cache folder are those that did not save to the desktop file and folder. I can then double check to see if I can find the videos, flash or images from the remaining files.
    I have updated to Firefox 30.0.3. The problem now is that the files in the cache are different in KB size from the saved files on the desktop folder. The dimensions of a saved image are the same but the size of the file differ. Now I can not use Double Killer to delete files and have to go through the whole cache directory one by one to find files that were not saved.
    Why did the Firefox developers changed the cache directory? Do I need to revert to a previous version of Firefox or is there a way that I can change the cache directory of Firefox 33.0.3 and the size that it stores files.
    Would also like to know what add-on gives the best quality screenshot with flash.
    Thanks for this support. Apart from this cache problem I find Firefox easy to use and the best web browser.

    Current Firefox 32+ releases use a new cache service named Cache2 and this cache service works differently.
    Files in the cache2 folder are special files that also store the meta data apart from the actual file data that you see on the about:cache page if you click an item.

  • Saved file size decreases with time

    Hi all, 
    I am using Data acquisition system with  rate 10000 and 1000 sample per channel (exist 4 channels) to acquire analog voltage signals to measure the amplitude in each channel.
    Moreover the raw signals are saved as TDM file of 1 minute. The system is running continuously for one week. I noticed that after 3 hours the saved file size is decreased as a function of time.
    The size starts with 50 MB/min and after 3hours it became 42MB/min, after 1 day became 11MB/min. That indicated the data was lost , please, what is my programing mistake.
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    Acquisition system.png ‏177 KB

    From the State Zero code, there are several things that could be improved here.
    1. You only need to create the task once before your main loop.
    2. You probably do not even need the outter loop if you use the DAQmx Configure Logging like I have already stated.  And you can use properties to say how many samples to go into a file before moving on, so that part of your code is eliminated.
    3. The display can just be a simple chart (it looks like you are probably already using a chart).
    What is your chart history set for?  That could be causing your slowdown if there are too many data points.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Saving file size

    When saving a file in Photoshop the file size increases substantially.
    Is there a way to save or an option to turn on/off that would prevent this and save the file as roughly the same size?
    I know about web optimized and different saving methods. That's not really what I want. Often I open a file just to edit some minor detail and save, then I have a file that's 2 to 3 times larger just because it was opened and saved. I tried saving a file without editing it at all and the file size increased so I know it's something I'm doing/not doing in the saving.
    So what's the easy method I missed about saving in PS?

    JPG is a lossy compressed file format. Each save degrades the image. The degraded image will grow to have more and more noise and artifacts. The recompression/reinterpretation of the growing noise and artifacts will cause the file to grow in size with each save.
    Do not resave a JPG. A repeatedly saved JPG just turns to mush. JPG is an ideal storage format for a final image; not a working image.
    Work on a master file saved in a lossless format (TIFF/PSD/etc...) and then save a copy as JPG.

  • Saving Files on FCP 6.0.2 and XSan

    Hello All,
    We're running into very frustrating issues as we are trying to save and open Final Cut Pro project files. We are currently using an XSan with ACLs set up to store FCP documents and related files. The six workstations aren't directly attached to the SAN, they connect via GigE to AFP shares (not an ideal solution, but it's what we can afford right now). It should be noted that our setup is currently using the "Golden Triangle" of directory services (AD user accounts and groups).
    In December we upgraded our XSan to version 2 (which was a nightmare in itself), and all of our clients were upgraded to 10.5 with FCS2. After the upgrades, a few issues have arisen:
    1. When a user attempts to save a FCP project, sometimes they receive the error message that the file is locked. From what I read on apples support site, this is due to permissions-- a file cannot be saved by one person, and then opened and saved by another. If the ACLs set on the folder reflect the groups that have full access to the files in which the project resides (recursively), why is this an issue? Or is this just another case of bad execution on apples part?
    2. After concluding a "Save As", most of the time the alternate project file is able to be opened. We've run into several instances, however, when the project file is a very small size (16k or so), and gives the error message "Unable to open project file".. and it's pretty much trash. In these cases, the autosaves are behaving in a similar manner, being a very low size and not opening.
    So my question is, does this all sound like permissions issues.. or is there something inherently wrong with the XSan at this point (e.g. corruption)? How are other people using XSan volumes in conjunction with FCP 6.0.2/FCS2 to edit and store files? Perhaps we're going about the whole setup the wrong way..
    Thanks for your time and any advice you can provide..

    Hi,
    Thanks for taking the time to reply.
    We have six producers.
    Each producer has their own storage folder on the SAN: Producer 1, Producer 2, Producer 3, Producer 4, Producer 5, Producer 6. Each of these folders are located in One sharepoint called "Producers".
    So we have one main producer, Well call Joan Smith. Joan has full access, recursively throughout her folder, which is producer 1. Joan has interns that work for her, who use an account called pro1edit1. Pro1edit1 has full access to Producer 1's folders as well, recursively. Joan and her intern never work on the same project at the same time from two different workstations. Each project is edited by one and only one user from one workstation.
    Either Joan or her intern logs into the Mac (using either Joan's username/password, or the intern using their generic username and password [pro1edit1]). These accounts are AD Accounts. After a login, OD sends MCX policies to the clients (such as auto-mounting the AFP share points ["Producers", for instance] with their username and password). The user browses to their folder. If they create a new project, the create a folder with the project name. They then open FCP and set the settings (scratch, etc) to point to that folder. They save a project file with the name of the project within this same folder, keeping everything as one general "package" in the folder. For instance: /Volumes/Producers/Producer\ 1/5-Minute-Piece/FiveMinutePiece.fcp. All of the other folders are also located in here, scratch disks, autosaves, captures, etc.
    When the user is done, they save, close final cut, and quit.
    The next say, either Joan or her intern come in to do some work on the project. They log into one of the workstations, and they open the file. They conclude some edits, and upon trying to save the file they receive the error message that the file is locked. They then save the file as an alternate filename. Sometimes this works. Sometimes it says it saves it fine, but the next attempt at opening the file yields the error that the project cannot be opened. Upon inspection of the file, it's about 16k in size.
    Using Producers folder/sharepoint, the permissions are as follows:
    Producers:
    <AD Domain>\grpStaffProduction: Allow: Read Only: This folder. *
    <AD Domain\grpProEdit: Allow: Read Only: This folder. **
    <AD Domain\grpProduction: Allow: Read Only: This folder. *
    <AD Domain\grpEditAdmins: Allow: Full Control: This Folder, Children, all descendants. [inherited]
    <AD Domain\grpDomainAdmins: Allow: Full Control: This Folder, Children, all descendants. [inherited]
    Local Administrator: Allow: Full Control: This Folder, Children, all descendants. [inherited]
    POSIX:
    admin: RW: This Folder
    staff: R: This folder
    Others: None: This folder
    Using Producer 1 (within the above folder), the permissions are as follows:
    <AD Domain>\JoanSmith: Allow: Full control: This Folder, Children, all descendants.
    <AD Domain>\pro1edit1: Allow: Full Control: This Folder, Children, all descendants.
    <AD Domain\grpEditAdmins: Allow: Full Control: This Folder, Children, all descendants. [inherited]
    <AD Domain\grpDomainAdmins: Allow: Full Control: This Folder, Children, all descendants. [inherited]
    Local Administrator: Allow: Full Control: This Folder, Children, all descendants. [inherited]
    POSIX:
    admin: RW: This folder.
    staff: R: This folder.
    Others: R: This folder.
    +* This group is used for another producer folder. This allows AFP to mount the share, and for the users to see their producer folder.+
    +** This group is used for another producer folder. This allows AFP to mount the share, and for the users to see their producer folder.+
    +* Joan, all other users in production, and their interns are apart of this group. This allows them to mount the AFP share and see which folders they have access to.+
    So that's some more detail on our permissions and general workflow. We're up for suggestions. I appreciate your response!
    -M

  • Question : In "Mail" my entire SAVED FILE HAS DISAPPEARED....how can I retrieve it?

    In MAIL my heading for SAVED ACCOUNT for myself and my husband has completely disappeared with all our saved stuff.  How can I retrieve these saved files? thanks for anyone's help.

    As the link says: "Make sure Mail is the current app."
    Once you open Time Machine, you will see your folder list on the left like this just as you do when not in Time Machine:
    If you have more than one "Sent" mailbox (as I do above), just click the little flippy triangle to the left of "Sent" to see them all.

  • Photoshop CS5 not actually saving files to SMB shares

    Since upgrading to OS X 10.6.6 (and still in 10.6.7) Photoshop CS5 will not reliably save documents to SMB shares on my file server. When I "Save As" a new document, Photoshop goes through all the motions of saving the file. It seems to complete successfully. No error messages. The asterix in the documents title bar disappears as if the file saved. If you command-click on the document's title bar icon it will display the file path properly, as if the file was properly saved and exists. If, however, you go to the folder on the server where the document was supposedly saved using the Finder (or on a Windows machine in the Windows Explorer) the file does not exist. It was never actually saved.
    This seems to happen mostly with larger files (over, say, 100MB in size) as oppsed to smaller files. If I change my connection to the server to AFP as opposed to SMB(CIFS) the file saves correctly without any problems.
    Has anybody else ever encountered this problem? I have only noticed this issue since upgrading past OS X 10.6.5.
    Thanks!

    This is the boilerplate text often used in connection to saving to a network (please NOTE the part where it explains that normally, it does work, but that it is impossible to troubleshoot someone else's network remotely, and that's why it's not supported by Adobe):
    If you are opening files over a network or saving them to a network server, please cease and desist immediately in the event you are currently experiencing problems with one or more files. Working across a network is not supported.
    See: 
    http://kb2.adobe.com/cps/406/kb406793.html
      Copy the CLOSED file from your server to your local hard disk, work on it, save it again to your local hard disk, close it, and copy the closed file back to the server.
         Of course, the fact that Adobe does not support working across a network does not necessarily mean it won't work.   It should.
        Adobe's position is that there are too many variables in a network environment for them to guarantee that everything will work correctly in every network, especially given the fact that if something does not work properly, it's probably the network's fault, and Adobe has no way of troubleshooting your network.
      If you can't work locally, you are on your own, and if something happens, you're on your own. If you must work from a server, make sure your network administrator is a competent professional.
    When problems arise, a lot of valuable work can be lost.

  • Simplesave sd320a does not show saved files or directory structure, disk full?, I can restore

    I was saving files from an old win95 machine to bring them to a new laptop which is windows 7.  I plugged in the drive which is not full and I can only see the hp launcher.  In drive properties this drives shows 100 pct full.
    I can and did pull up an old simple save backup and restore pictures.
    The windows 7 machine is a locked down work machine.  Maybe the file structure was changed by the windows 95 machine and now my windows 7 machine can not see the root directory?
    I have not written to the drive since storing all of the pictures from the 95 machine and unplugging the external hard drive.
    I am looking for help on how to see the files in the root directory that I simply use the copy command to move them on to the external drive.

    OldGhias,
    Have you found a solution yet? I don’t know if I will be of any help but I was curious and no one else has chimed in yet.
    I don’t quite understand all of your statement.
    To clarify, you were making SimpleSave backups from Win95 and cannot see them all on the Win7 laptop?
    Or
    You were copying files over (SimpleSave utility not used) and you cannot see those files on Win7 but you can on the Win95 machine?
    Do you have another Win7 machine you could connect the external to, to see if the files are still not showing (one that is not locked for work)?
    On the drive that shows full, can you see it in Disk Management showing the correct size of the drive and also another CD drive? Not your real CD/DVD drive, it’s actually a CD emulator that is attached to the HDD for encrypting the backups and all SimpleSave’s have them.
    Lastly, did you reformat the SimpleSave drive to Fat32 first?
    My understanding is that USB support was quite limited on Win95 machines. Since Win95 is Fat32 and the SimpleSave drive is by default NTFS, I would think it would not work.

  • Saving large tiff files we see a lot of times the lines in the saved file that have either missing ( white) pixels or they appear as a black line across entire file or portion of it

    saving large tiff files we see a lot of times the lines in the saved file that have either missing ( white) pixels or they appear as a black line across entire file or portion of it

    Due to the current unavailability of clairvoyants and mind-readers in the forum, we respectfully request you supply sensible, complete details.
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    A screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • How does the icon get created for a saved file

    In my program I allow saving files using JFileChooser and ActionListener.
    In the constructor of the main class which extends JFrame I also set an icon by saying:
    this.setIconImage(new ImageIcon("image.jpg").getImage());
    This does not only set an icon on the title bar and the minimized window, it also creates an icon on my saved files. However, the image quality for the icon on my saved files is bad, even though the image quality for the other icons is ok. The size of the icon image I am providing is close to the size of the icon image on my saved files.
    How did the icon get created for my saved files? Is it possible to improve the image quality?
    Thanks for looking at this!

    I just realized that
    this.setIconImage(new ImageIcon("image.jpg").getImage())
    did not create the icon for my saved files.
    So what did create it? I did not program it!
    However, I happen to have an icon file Ananya.ico where I have my java project. I use if for my installation file. Did Java use this icon?
    Please help! Thanks!

  • Saving file

    while saving file different options appears in a dialogue .i file size should i choose to keep my file big original .or say of highest quality without reducing size

    PSD will do what you want, but you have to decide based on what you are going to do with the file in the end.
    A good practice is to Save As a PSD, and Save a copy of the file for ultimate use.

  • Having problems getting saved files in PS CS3 to show up in folders in Vista - help?

    My sincerest apologies if this has floated across oyur screens before, but I don't seem to be pluggin in the correct set of keywrds to bring it up in the search if it has.
    Here's my dilemma. I just bought a new computer which came preloaded with Vista, and uploaded my old copy of CS3 onto it. The program seems to be working fine, except that when I open a file in Photoshop and edit it, then save it in a new file (as I do for most of my photoshoots, etc), or even when I save it in the orignial folder, the new "saved" file will not show up in the Vista folder. If I go back to Photoshop and open the folder via File>Open, I can access all of my pictures, but to I cannot access them to upload to the internet, email, use in other programs, etc.
    If I go into "Recently Changed Documents" I can find them, but they seem to be in a temp folder in the Adobe folders. But again, if I go back to Adobe, it says they are in the folder I put them in.
    Any ideas what's going on here?
    Thanks so much for any help you can offer,
    Cass

    They are hidden for whatever reason, either you have a permission problem or they are registered incorrectly with Explorer. Open the folder, then check Extras --> Folder Options. Disable the Hide System Files option and then the more generic Hidden Files section a little lower. If that reveals the files, it's time to check the File Types tab in the same panel and see, why it actually thinks your documents are system files. the simplest solution would be to remove the PSD association and then create it new, when you open a file wit6h a double-click. Of course al lthe above assumes that not some security tool or another application is "stealing" your file type associations. If you have such tools, checking their config may already solve the problems.
    Mylenium

  • AppleWorks not opening saved files

    AppleWorks (on OS 9) can still open files, but now when it saves any new document, it won't allow it to open again. When I try to open any newly saved file, it throws up a dialog box that says "Unexpected end of file." twice.
    Old documents can be opened but new ones can't.
    What could be the problem and how (if at all possible) can it be fixed?
    I've already tries rebuilding the Desktop file and deleting AppleWorks preferences files but it doesn't seem to change. Peggy (from the AppleWorks forum) suggested posting it here as it may be more of an OS 9 specific problem.

    "When I try to open any newly saved file, it throws up a dialog box that says "Unexpected end of file." twice."
    An “Unexpected End of File Encountered” alert message means that either the end of file marker is damaged or missing, or the end of file data does not reach the location defined by the end of file marker in a document. Usually this results when the file is incompletely saved or the application unexpectedly quits while the file is being saved. However, this error can occur during application launch, or when saving or printing.
    If, after you receive the alert message, the document size is dramatically lower than the original size, the chances of recovery are minimal. It is recommended to use a backup copy of this document.

  • Binary file is too big in size

    Hi,
    I wrote a simple VI to do playback of sound files and to record signals. It seems to do what I want (although I appreciate general feedback on good programming habits). The bigger issue I have is that the binary file it is saving is way too big in size. A few seconds of recording gives a few megabytes of data. Although I can open the binary file in matlab and analyze the data just fine, the big file size doesn't sound right. 
    Does anyone know why this is the case? I tried saving the data in something other than doubles, but it still gives large file sizes. Played around with the byte order too without much success. Any help is appreciated (LV 2009 file attached).
    Thanks.
    FA
    Solved!
    Go to Solution.
    Attachments:
    for_upload.vi ‏51 KB

    If your DAQ unit is 16 bit or less, simply store data as I16. you store data as DBL and that is 8 bytes pr number. It is no problem making wav files in I16 format. However wav files (in Labview at least) is not a compressed. So the file size will be much bigger than MP3 files that is a compressed file format.
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Saved File Groups Issue in Bridge Center - script problem?

    Hi all,
    I tried posting this in the Bridge forum with no replies. After browsing through this forum I'm wondering if this is a script problem?
    I have the CS2 premium, and use all packages. The problem I have is saving and retrieving files in the 'Saved File Groups' of Bridge Center. I can save Photoshop files no problem, but the idea is to be able to save other files from open applications in the group and then to recall them later. I can save Illustrator files with others in a group but only Photoshop files open, and it ignores the saved Illustrator files.
    With my InDesign files, it does not even recognise them as files to be saved. I can have a file open, click on "Save open files into a file group" and it will come up with a little box saying there are no open files to save!
    OS - XP sp2. Bridge 1.0.2
    If this can be helped with scripting, please explain clearly, I am a graphic designer and no very little indeed about scripting.
    Your help would be appreciated.
    Thanks,
    Thysje Arthur

    Hi,
    Do you mean that Windows displays “Network Shortcuts” folder when you click “Browse” icon? If so, please check if you configure the default local file location to the “Network Shortcuts” folder. You could refer to the image below to find the option of the default
    local file location.
    Best Regards,
    Mandy 
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

Maybe you are looking for