(I know its a month old but I'm still stuck on this)

The idea is I want to use the same set of cfm pages for a report's
output in the browser and in pdf generation, but I want to have a
'generate pdf' function in a component that does not rely on making a
separate mach-II event call in order to capture the html output before
wrapping the html inside of a cfdocument tag. The purpose of that
would be so that a remote process could generate a pdf of a report
without making a call to the framework via cfhttp.

I'd rather not maintain two sets of the cfm pages, but I would also
like to avoid the cfhttp call.

On Nov 17, 3:15 pm, RobM <[email protected]> wrote:
> Well, the user process goes like this:
>
> - user clicks pdf option, sends event request
> - application takes the current report parameters from the database,
> modifies the parameters, then runs the report query with the new
> parameters
> - application returns the query object to the listener, listener
> announces 'get_composite_views' event
> - mach-II pulls up the composite views in the event handler into
> variable 'content' , then notifies listener function 'make_pdf'
> - application takes html text in 'content' then drops it into a
> cfdocument, which is written to a shared directory and returns the
> filename
> - filename is returned to listener, which announces 'export'
> - export view builds the path to the shared directory and uses the
> filename to get the pdf and cfcontent and cfheader to cause the
> browser to use the adobe reader plugin
>
> That may be too much detail, but I think it shows whats happening.
>
> The problem there is I have to be logged into the mach-II application
> in order to make the call to 'get_composite_views', which means
> setting up all of the login security for one event call, then logging
> out again. I'm trying to avoid having to make a cfhttp call, but I
> can't seem to get around the call to 'get_composite_views'.
>
> On Nov 17, 2:29 pm, Matthew Woodward <[email protected]> wrote:
>
>
>
>
>
>
>
> > On Thu, Nov 17, 2011 at 11:21 AM, RobM <[email protected]> wrote:
> > > By "remotely" I mean via scheduled task instead of via user's browser
> > > request.
>
> > When you hit a URL in a scheduled task it's just the CFML engine acting as
> > a browser so in that sense nothing changes.
>
> > Probably have to know more about how interactive the process is when a user
> > does it. Do they have to provide any input, or is the only interactive part
> > when they get prompted to download the PDF?
>
> > If it's just the prompt for download (or have the PDF display in the
> > browser, or whatever) you could just have a flag in your URL when the
> > scheduled task kicks things off so you'd know to write the PDF to disk at
> > that point in the process instead of displaying it to a user. Other than
> > that the process wouldn't have to change unless I'm missing something.
> > --
> > Matthew Woodward
> > [email protected]http://blog.mattwoodward.com
> > identi.ca / Twitter: @mpwoodward
>
> > Please do not send me proprietary file formats such as Word, PowerPoint,
> > etc. as attachments.http://www.gnu.org/philosophy/no-word-attachments.html

-- 
To post to this group, send email to [email protected]
For more options and to unsubscribe, visit this group at 
http://groups.google.com/group/mach-ii-for-coldfusion?hl=en

SVN: http://svn.mach-ii.com/machii/
Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/

Reply via email to