I have an app that uses a webbrowser window to view several types of documents. One of those document types is a pdf file. After viewing this file and selecting certain criteria in the form it is uploaded to a database. What I would then like to do is more the file to a temp directory that I've already created. Problem being is that a process is still holding that pdf even though I have removed the pdf from the webbrowser. So apparently the problem is that adobe acrobat is running in the background and still retaining the file.
I did fix it.. but not in a way to my satisfaction. Essentially I ran a shell script in the program and killed off AcroRD32.exe. This frees the file and gives me the ability to move. I really dislike having to do this.. not very elegant whatsoever. Is there a better way to handle this situation?
Related
I would like to ask the following if possible. We have a client that wants a separate pdf document, embedded in a main pdf document and opens when you click it. Like the function in MS Word where you can attach another Word document inside a Word document (Word-ception, lol) and you can still open it.
I've tried it in Acrobat Pro with the Attachment and Link tools. Another option was to put the link document in an ftp server for accessibility. but our client really wants this functionality. Is this possible in Indesign?
Thank you!
Using Word as your example vehicle there are several ways to link 2 documents.
One is an appendix to the other, in PDF terms is a merge or binding but its one flowing document with separate sequential sections/chapters.
Another way is to link to an external file, in PDF terms a hyperlink to a relative second file, which can be locally folder relative or a web absolute reference. You have tried that.
In Word we can add objects internally with icons, in PDF that can be an annotation comment attachment to save externally and action accordingly. You also seem to discount that approach.
Finally PDF offers an Adobe Specific Structure where multiple PDFs attachments can be imbedded in an overall PDF wrapper. These are called Portfolios and not! to be confused with their portfolio service
They are unpopular since in a browser without Adobe Reader they should only offer the cover page.
Whilst in securer offline readers the files may well be shown as attachments that you need to save or independently open to view them.
Only some non Acrobat viewers may view them as a collection. And in the past that required runing insecure SWFlash, But I understand that has changed ?
Here is how the 3 internal PDF files seen above were shown in older Acrobat 9.
Possibly the best experience is using Foxit Reader
I've built my own .PDF carefully following Adobe PDF specifications. macOS has Preview and that opens and displays the PDF document properly, but Acrobat Reader reports an error, not specified, and does not display the document.
If I open it with Preview and export it from there as another PDF, the result is shown properly by both Preview and Acrobat Reader.
The Preview version is somewhat inexplicably complicated and I cannot determine what difference was done by Preview to allow Acrobat to handle it.
Nor have I been able to find software, even from Adobe's site, that will diagnose the problem.
I have attempted many reasonable variations, additions, etc. on my PDF, to no avail.
What's the secret formula to unlock the beast?
In response to the request, here's an abbreviated copy of the PDF file. All the controlling objects are present but I've deleted portions of the streams to spare you the scrolling. There are two fonts on one page which is an amalgam made of two separate source PDFs, one generated by me and the other from a different supplier, hence the preliminary /Contents objects setting up scaling preliminary to each page object.
Well, after placing the sample here, I get a reject message saying there was an error submitting the edit.
I'm going to try again after eliminating all the compression code in the streams and much of the uncompressed formatting code, to save you from all the scrolling.
(PDF code removed as requested. Stay tuned for update.
I have a 3 page PDF file open in Preview on the Mac. If I make no changes to the file, hit cmd-s and save the file, the binary content of the file changes heavily. Why is this?
I can tell this is the case because of my process:
make a duplicate copy of a pdf (cp a.pdf b.pdf)
vimdiff a.pdf b.pdf (no changes, exactly the same content)
open a.pdf in Preview (make no edits)
vimdiff a.pdf b.pdf (no changes, exactly the same content)
hit cmd-s (save pdf)
vimdiff a.pdf b.pdf (tons of changes, well beyond the pdf's meta-data)
Can anyone explain why/how a PDF gets "re-written" even though no changes were made?
Indeed, Preview heavily re-writes any PDF that was initially created by any non-Quartz application upon saving it for the first time.
I earn (part of) my living with debugging PDFs.
And I made it a habit now to never-ever respond to a customer with suggestions how to fix any (even the most simple) reported problem as soon as I discover the provided sample PDF has been touched by Quartz (fortunately, Apple admits its involvement by updating the /Producer metadata key with Mac OS X 10.7.4 Quartz PDFContext or similar):
because I never know if this PDF was the original PDF that exhibited the described problem, or if the customer was just trying to mail the original problem PDF via his MacBook and unintentionally re-saved + re-wrote the PDF when operating his mail app.
Therefor I always need to first establish a procedure with Apple customers which guarantees I get to analyze the original PDF files exhibiting a particular bug or problem, not the ones which where spoiled by Quartz/Preview. I've mis-spend quite some man days of work on 'analyzing' the wrong files before I discovered the problem about a year ago....
A lot of True Believers of the Apple Cult are not aware of this behavior, and a lot of prepress Pros are also completely clueless about it.
When saving a PDF the second time, chances are, that only the /ModDate metadata key is s updated (unless you're using a new version of Quartz on your Mac)... but you never know until you take a really really close look at the PDFs in question.
Update (with some additional info)
BTW, for me the simple hit on [cmd]+[s] does not yet change the PDF. But I'm on Mac OS X Lion 10.7.4, with Preview.app Version 552 (719.23). On Lion the change is triggered by saving the file under a new name (Duplicate => Save...).
k00k seems to be on Mac OS X Mountain Lion 10.8.1, with Preview.app Version 6.00 (765). For him a simple hit on [cmd]+[s] suffices to trigger the change.
(I'm not saying that the changes Apple makes to Preview-ed PDF files are necessarily bad. In quite some cases this may silently 'repair' damaged files and could be argued to be 'user-friendly' behavior. -- What I'm saying is that there are changes (whether for the good or for the bad is irrelevant) which go beyond metadata-stamping a new /ModDate value into the file, and which can make troubleshooting PDF problems very painful...)
I do not have the source code of the Preview application, so I cannot say for sure. I can guess that they are not just saving the same data that was loaded, instead it seems they are re-constructing an "equivalent" PDF file.
Additionally, when a PDF file is "re-created", there are a few items inside that will always be different (unique IDs, last date/time modification, etc).
I'm creating PDFs using Texmaker. I would like to create some of the PDF files so that when I give the PDF to others, they are not able to print the file or to copy the text. I know I can do this with some PDF creator applications, but can I do that from some command like program I have with Latex, MikTex and TexMaker?
It wouldn't be effective anyway. There are bits in the pdf format that purport to forbid the user from doing this, but they are really just suggestions that the reader application may or may not act on. There is nothing to stop a user from removing the code that inspects the bits from a free/libre PDF reader, or just to run a tool over the file to remove the restrictions.
I've got a form that I downloaded, I'd like to prefill some content on the form (this is easy using cfpdfform).
Where it gets tricky is I would like to allow the user to modify the contents of that form, and then somehow have those modified contents accessible to me. I didnt build the source PDF so I dont know how to allow the user to "save" the new contents so they can be read.
Any ideas on where I might start on this one?
You can also use the cfpdfform tag to read/write data to a PDF file which has a form. The important thing is that the PDF document already have the form fields available, or that you add them.
I just recently completed a task where I had to have a user fill out a normal web form, and then create a filled version of an existing PDF document. It worked like a breeze!
I think that depending on what you are trying to accomplish, having the user fill out the data in a web form is less confusing than serving up a PDF and expecting them to save that to update a file on a remote server. Just my opinion, though.
http://www.cfquickdocs.com/cf8/?getDoc=cfpdfform#cfpdfform
It's possible for users to complete most PDF forms in Adobe Reader, but when user's try to save the changes they get a popup prompting them that the PDF cannot be saved and would need to upgrade to Adobe Acrobat to have this functionality.
Since Acrobat 7 (or possibly) 8 it's possible to create a form so that it can be completed and saved in reader. In Acrobat open your PDF, and select Advanced -> Enable usage right in reader from the menu. This will prompt you to save the form and then anyone using Adobe reader can complete it.
Once that's done you can open the form in ColdFusion, populate some of the fields and serve it up to the user. Once they fill it in, save it and get it back in ColdFusion you can read the contents using the PDF related tags.
Please note: It's currently not possible to set the "enable usage rights in reader" flag from ColdFusion, you need a copy of Adobe Acrobat or access to Adobe LifeCycle server to do this.
This document may help you:
http://www.adobe.com/education/instruction/teach/coldfusion/CF8-2_advanced_cf8_development_unit8.pdf