I'm trying to create a PDF version of report pages during the PublishedPage event. I'm using a 3rd party utility to do this which converts the HTML to PDF. However, when I do a GET of the page to get the HTML for this conversion, I'm getting the previous version of the page. Is there any way to get the latest version, i.e. the one I've just published?
I'm subscribing to the event like this:
DataFactory.Instance.PublishedPage += new PageEventHandler(this.PublishedPage_CreatePdf);
So I've fed in the URL of the page to this request, but I'm getting back HTML content for the previous version, not the one that has just been "Published"
It almost sounds like the request happens before EPiServer can invalidate the cache, can you try adding: DataFactoryCache.RemovePage(e.PageLink); before the web-request and see if it helps?
Hi
I'm trying to create a PDF version of report pages during the PublishedPage event. I'm using a 3rd party utility to do this which converts the HTML to PDF. However, when I do a GET of the page to get the HTML for this conversion, I'm getting the previous version of the page. Is there any way to get the latest version, i.e. the one I've just published?
I'm subscribing to the event like this:
I'm doing the GET with an HttpWebRequest: