Coldfusion caching pdf files
Hi all:)
I'm having trouble with coldfusion caching pdf files that we use to populate. Even when we replace the files the old ones are still being used
In what way are they caching? What do you mean by "used"?
What's some code that demonstrates this?
Adam
Similar Messages
-
How does Flex cache PDF files??
I need to prevent my Flex application to cache PDF files... We are using LiveCycle8.2 and Flex 3.2. Does anybody may help me??
Sorry for being newbie obtuse but are you saying that FP (Flex Project I assume)'s are an Active X (application) and thus IE does utilize its cache for all HTTP based communications???
If so then as I understand it, the typical Flex Project has an HTML wrapper which then loads the Flex App (I assume using HTTP). Subsequent Flex<--->Server communications can be HTTP or other format (AMF which I believe BenForta indicated was HTTP "wrapped" as well but at the moment I am less concerned with this).
As such is the following correct?
1.) IE Browser hits HTML page (url) ----> IE checks its cache; If exists compares vs current version on server; If different download from server else load from cache
2.) HTML page calls Flex App (using HTTP???) ----> IE again compares Flex App in cache (if exists) vs. server and if same load else download
3.) Flex App retrieves image file names via <mx:RemoteObject> ----- I don't see how browser cache can be used here as results not known until after dbase query completes
4.) Flex App uses <mx:RemoteObject> results to retrieve large .jpg files ---- do these "pass through" the browser (and therefore load and/or store in cache) or are they purely "Flex contained" (and if so does flex have any automatic cache or do I have to perhaps store the jpgs in a shared object if I hope to reuse them without a download)??? -
Dear,
I try loading a pdf that I loaded to a server and I keep getting the old version to come up. I don't get the new one.
Browser: IE9- Windows 7
The Web Application works well on other browsers.
thanks.Hi,
Please try to clear the catch of IE to see what's going on:
This how to will give you the steps to delete all or individual sets of files.
1.Open Internet Explorer.
2.In the upper right corner, click the small gear icon (to the right of the star icon) and choose Internet Options
3.On the General tab, under Browsing history, click Delete.
4.Un-check the Preserve Favorites website data, Cookies box.
5.Check the Temporary Internet files, and History boxes.
6.The Form data, Passwords, and inPrivate Filtering data boxes may be left un-checked. You can check them to delete this data if you so choose.
7.Click Delete.
8.When finished, click OK to return to your Internet Explorer window.
9.Close the Internet Explorer window and reopen.
Sometimes, the incompatible issue can also cause the unexpected behavior of web application.
Let's also check the issue by add this site into IE compatibility view:
1.From the Tools menu choose Compatibility View Settings.
2.Click add to add this site to compatibility view.
3. Reload this site with web application to see what's going on.
Kate Li
TechNet Community Support -
In pdf file need java script to clear cache before launch of web link
using adobe acrobat XI - have pdf file with link to external web site.
When creating the link in the link properties selected action Run a JavaScript the following java script was added to ensure will open in new window. app.launchURL("http://google.com", true)
this works most of the time except with some users - if those users clear their browser cache first then it works
Is there anything that could be added to the java script to ensure the browser cache is cleared or not used before the launch action? or any other suggestion to ensure the link will always open in new window?
Thanks,
Jackiethanks for your prompt reply.
Was hoping maybe there would be someway to clear the cache for the users
without them having to do anything.
Appreciate your help.
Jackie
Thanks,
Jackie
276.783.6991 x 326 -
Maximum PDF file size for browsers to cache?
My site distributes daily newsletters via PDF that are typically about 2MB in size. A link is provided to the PDF, and when clicked, it opens the Adobe Reader plugin within the browser (Firefox, IE) and opens the file therein.
Recently it was brought to my attention by a dialup user (they do still exist) that when he navigates back or forward in his browser's history, the PDF has to be redownloaded rather than reloaded from his browser's cache. I, with a broadband connection and some wonderful Firefox extensions (Firefox Throttle and Live HTTP Headers) confirmed this behavior.
However, a similarly sized file (2MB) of a different type (text) is cached by the browser and I can go back and forth in the history without the file having to be redownloaded. I also had success with a smaller sized PDF (70kb).
What appears to happen is this:
1) Click the link to the 2MB PDF, and it loads in the browser.
2) Click browser's back button to back to previous page in browser history.
3) Click forward button to return to PDF.
4) A request with a "Range: <byte range>" header is sent which I think requests part of the PDF file (the byte ranges).
5) The server responds with a "206 Partial Content" response code and resends some/most/all of the PDF to the browser.
What should happen (and does with other file types and smaller sized PDFs) is that the browser should make a simple request for the PDF file, and assuming the PDF hasn't been modified since the latest request for it, the server should send a "304 Not Modified" response code which instructs the browser to use what it has in cache.
I've increased my browser cache sizes dramatically to no avail. Cleared them before starting the process to no avail. Should be no problem with any browser's cache limit.
I'm using Firefox 2 and IE7. My co-worker has IE6 and Acrobat Reader 6 installed on another machine and it works fine there (PDF is cached and does not need to be redownloaded).
Help! Why aren't these larger PDF files being cached correctly, and what can we do to get them saved in the cache so our poor dialup users don't have to redownload them everytime they navigate their browser history?
Thanks!Just wanted to reply with my discovery and fix. I'm not sure if it is Adobe Reader or the web browsers (I tested Firefox 2 and IE7), but they appear to request parts of large PDF files "on demand." That is, they send requests to the web server with a "Range: <byte range(s)>" header which instructs the web server to only send segments of the file. I think they use the feature of HTTP 1.1 that keeps the connection open or alive to request/send the data incrementally.<br /><br />While this might seem preferrable, in the case of dialup users that navigate through their browser(s) history, they should instead download the PDF in its entirety and allow the browser to cache the file. This way, when they click the link to open the PDF again (or go back/forward in their browser's history), they use what they have in their cache instead of redownloading the PDF (which in the case of dialup users is quite painful).<br /><br />We fixed the problem by instructing our web server to ignore/disregard byte range requests. In a nutshell, you need to have the web server issue a header:<br /><br />Accept-Ranges: none<br /><br />In Apache, you can do this on a per-file-type basis using a FilesMatch directive. In IIS (we're using 5.0), you cannot specify a file type for this behavior; you have to set it in Internet Services Manager by adding a custom header under the "HTTP Headers" tab.<br /><br />Personally, I prefer folks use their browser cache than repeatedly request data (PDF file in this case) from our server. To each his own I guess. Hope this helps someone.
-
Populating a PDF File from ColdFusion
I wanted to populate a pfd file from coldfusion and I found
this online:
http://www.school-for-champions.com/coldfusion/cftopdf.htm
When I submit the form.. I then show a link [view pdf].. only
when I click
on that lick I get a message saying
Adobe acrobat: the file is damaged and could not be repaired.
Has anyone used this method successfully? If so, would like
to hear some
suggestions.
The PDF template I created just have 2 fields. firstname
lastname (which
matches cfm form).
Thanks in advance
1. Create PDF document to populate
Create the document you want to populate. This document could
be done in
Microsoft Word, as an HTML page or using some drawing
application. Then
create a PDF file of that document.
You must have Adobe Acrobat or the equivalent to create a PDF
file.
Typically, the easiest way to create a PDF is to click File
> Print and
select Acrobat Distiller as your printer.
2. Enter fields with Acrobat
Once the document is in the PDF format, open it in Acrobat.
Use the menu bar
tools to define your fields.
a.. Use the Form Tool to define the various text fields,
give each a name,
and designate the font type and size. The field name should
correspond to
the name of the data you will input.
b.. Use the Text Tool to modify areas of text. You may have
to change the
font or font size. It is not the easiest tool to use.
This will be your PDF template.
3. Create a ColdFusion page to populate the PDF
Create a ColdFusion form to gather data from input over the
Internet or from
a database query. This page or an action page will provide
the means to
populate the PDF file.
The code you use will depend on the method or software you
decide to use.
Options will be explained in the next section.Hi, I need your help again.. And if you can do this for me; i
will pay for
your time. just let me know. because i need this project wrap
up in the next
28 hours.
I've used the Ben Forta (cf_PDFFROM) and i'm able to get the
pdf. (great)
now i need to suppress blank lines.
my pdf is a business card template.
on the left top down
firstname middle name lastname
job title
address1
address2
address3
www.whatever.com
on the right bottom up:
phone:
fax:
mobile:
email:
aim:
there's where I'm stuck:
if a user does not enter a fax number... I want the PDF to
move 'phone:'
down 1 line and not show the word 'fax'.
PLEASE can someone point me in the right direction OR tell me
you can do it
quickly. contact me and i'll pay you.
thanks in advance!
"BLXWebMaster" <[email protected]> wrote in
message
news:f2fi63$c1e$[email protected]..
> What version of PDF are you using? Are you creating your
PDF Form in
> designer?
> If you are trying to Pre-Populate a PDF Form, this
technique will not work
> in
> that this will not preserve your Form. With the recent
versions of PDF,
> Adobe
> hase changed the technology to be XML and you are trying
to populate your
> PDF
> using FDF. I don't think that this can be done.
>
> I would stay away from FDF.
>
> Although there are several tools that will allow you to
do this, most of
> them
> rely on the old FDF format.
>
> I would suggest checking out XPAAJ. This is a free api
for Coldfusion
> users
> and offers a decent basic pre-population of PDF's.
> Written by our friend Ben Forta, you can check it out
here.
>
http://www.forta.com/blog/index.cfm/2006/7/27/cf_pdfform
>
>
>
> -
Sharepoint 2010 document library pdf files are storing in browser cache when it is opened in browser
i have sharepoint 2010 site which consists of document library with pdf files if we click on pdf file it will open in browser .But the thing is it is storing in browser cache so i need to restrict that pdf to not store in browser cache.
A,ny suggestions pleaseHi,
We can use jQuery plugin to open the PDf file in browser.
The following link for your reference:
http://www.jqueryrain.com/2012/09/best-jquery-pdf-viewer-plugin-examples/
Best Regards
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
IE9 doesn't reflect updated PDF file but instead reflects from cached version
First, I apologise if this issue might be discussed/resolved somewhere, but if you have any solutions/ideas to what my issue might be, please help to share. And thank you in advance.
We have been using/filling PDF forms to generate dynamic FDF data. The URL/path to the PDF file is set inside the text/data of the generated FDF. The PDF file with the FDF data are shown to the browser. But with IE9, the browser always reflects cached version of PDF file, and not the updated version. This is working fine for years in IE6..IE8, the updated PDF file with the dynamic FDF data are shown correctly. But in IE9, the FDF data is dynamically updated but the PDF file still shows the old version, which I think is from the cache.
In my testing, either I emptied the IE’s cache or set the Internet Option to check for newer versions of the page then it will reflects the updated PDF File. I tried Ctrl-F5 (to force refresh) too but no avail. I used Acrobat Reader 9 & 11, both having same problem, running on Windows 7.Hi Pat. Thanks for your reply.
Actually, I already been checking any IE9 options that might be different from IE8, and tried to change "Security" settings also but still can't get the updated PDF file. Maybe you have in mind where I can specifically check and try out?
I have tried IE10, but also encounter the same problem. sigghhhh
I have been using this for years but no problem, this PDF/FDF document application is developed/created using Acrobat Professional ver6 and FDFtoolkit. -
Server Side Caching of pdf files
Hi all,
I've run into a rather odd problem that I can't find a way around. I've created some URL iViews to display some html files and some pdf files. I've adjusted the Load parameters for these iviews to the following:
Allow Client-Side caching: Yes
Cache Level: Shared
Cache Validity Period: 12 hrs
Fetch Mode: Server-Side
I've found that the html URL iViews work fine like this, but the pdf URL iViews do not. The pdf ones seem to just hang.
I've noticed that if I change the Fetch Mode to client-side for the pdf files, the iview then begins to work. However, I don't believe that this is the way that I want to configure my URL iviews. I believe that I want them all to be server-side cached.
I've followed the instructions on 'setting up system properties for proxy server' (System Administration -> System Configuration -> Service Configuration -> Applications -> com.sap.portal.ivs.httpservice -> Services -> Proxy). After making these configuration changes, I've stopped/restarted portal services. The problem still occurs.
Does anyone have any idea as to what may be causing this problem and how do I fix it?
Thanks!
-Stephen Spalding
Web Developer
GraybarHello.
I have the same problem. When I tried open a pdf file with fecth = server-side, I waitting for 500 seconds... But if I tried open with Fetcf = clien-side I only wait 2 seconds.
Did you found the solution?
Thanks.
Paco. -
Tagged PDF files from ColdFusion.
Does anybody know about the current -- and maybe future --
capabilities
of ColdFusion tools that generate PDF files, such as
<cfreport...> and
<cfdcoument...> tags, to create 'tagged' PDF files?
Tagged PDF files are PDF documents that have structural
markup
information along the lines of HTML to give accessibility
aids, such as
screen readers, more information on what content the PDF
document contains.
I have been looking high and low for information on how one
may create
tagged PDF's -- or add tag markup to a created PDF -- with
ColdFusion.
I'm getting a sinking feeling this is just beyond the
capability of our
beloved tool!This is a rather old version; you may need to run it in XP compatibility mode.
-
How to avoid the pdf file in browser cache
i am opening pdf files through browser. After that same pdf changed their contents . after i open the pdf but it will not updated. Bcoz this file in cache . so how to avoid the cache store for pdf files.
plz help me!!!the code is as bellow
File fBlob = new File ("test.pdf");
FileInputStream fIS = new FileInputStream(fBlob);
pstUpdate= con.prepareStatement("UPDATE table set file = ? where id = ?");
pstUpdate.setBinaryStream(1, fIS, (int) fBlob.length());
pstUpdate.setString(2, rs.getString("id"));
pstUpdate.execute();
con.commit(); -
How to get PDF file name when DESTYPE=CACHE
Hello.
I'd like to retrieve the generated file name from the cache directory in the After Report trigger when DESTYPE=CACHE and DESFORMAT=PDF
Is it possible?
Thanks
Rasto Sadecky
[email protected]Thank you Rohit.
It's not really the caching mechanism I'm interested in.
What I need to do is a physical modification of the generated PDF file.
We have done it successfully for DESTYPE=FILE because in this case
we know the name of the PDF file so the after report trigger can call an external dll library
that modifies the PDF file.
But when I'm calling the report from a JSP I can't do the same because
I don't know the name of the PDF.
Any ideas?
Thanks
Rasto -
Generating PDF file in coldfusion version 5
Hello,
I have a task where in I need to generate the .pdf file from
coldfusion version 5.0. Can somebody help me how to do this task?
Thanks,
Satheesh.satheesh_p wrote:
> I have a task where in I need to generate the .pdf file
from coldfusion version 5.0. Can somebody help me how to do this
task?
search these forums for "itext", you should see plenty of
examples. but i don't
recall we've ever made it work w/cf5. cf5 & java is
harder than mx.
i guess you also might look at some of the commercial apps
like activePDF, etc. -
Generate pdf file in coldfusion 6 or 6.1
hello,
would like to ask how to create a simple pdf file in
coldfusion 6 or 6.1?
thanksclyde_01 wrote:
> would like to ask how to create a simple pdf file in
coldfusion 6 or 6.1?
use the open source iText library, that powers cf7's
cfdocument PDF bits. search
the forums, plenty of examples. -
Saving PDF Files cache of WAS?
Hi all,
We are using an Enterprise Portal and I'd like to get PDF-Files from our mySAP ERP, which are saved in KPRO by an JAVA-Application. My question is, if there is a possibiltiy to cache these files somewhere on serverside? So that the customer can view and download the files.
Does anybody know some related pages or threads?
Thanks for helping in advance.
Luyes answered
Maybe you are looking for
-
How do I use both a theme and a persona picture together?
I managed this before but when I recently changed my persona I lost the theme too and was stuck with only the default theme. How can i combine the new persona and my favourite noia theme? Thanks. Im using firefox which is up to date and mac os x.
-
Embed Youtube video indesign CC/CS6 PDF
I am having the same problem. The video shows during the preview state within InDesign, but when exporting to pdf I get to the page on the pdf an the box shows up with "The Adobe Flash..." with four separate boxes and when I scroll over that does not
-
Changing Look and feel of template pagelets
Hello, I have a requirement to show different look and feel for different template pagelets. Something like: Related links - Grey Header Related Content - Blue Header Other pagelets - Red Header I was able to acheive this very easily for homepage pag
-
Problem appear after installed os x lion
I just bought my iMac three weeks ago. This is my first apple's product and i really love it. But after i installed os x lion, my beautiful machine just turn into nightmare. Everytime i am turning on my iMac, i need to restart it. It is because, some
-
How can i minimize the export frame
I am trying to export my file and unfortunately I can't go down where it says "export" because it's not letting me. I have a Window PC and whenever I open panels, the framers are all the time big and I try to scroll down to press any button but it ke