?
Solved

Get PDF File and Convert to Flash Paper

Posted on 2006-07-11
5
Medium Priority
?
252 Views
Last Modified: 2013-12-24
I want to run script that grabs a PDF and converts it to Flashpaper.  Here is my simple code so far to see if it works..   Basically it is working, but the text comes up garbage.  Any ideas on how this can be done correctly?

<cfset urlAddress="http://www.utasip.com/test.pdf">
<CFOUTPUT><cfhttp url="#urladdress#" method="GET" resolveurl="Yes" throwOnError="Yes"/></CFOUTPUT>

<cfdocument format="flashpaper">

<CFOUTPUT>#cfhttp.filecontent#</CFOUTPUT>

</cfdocument>
0
Comment
Question by:jeffmace
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 36

Accepted Solution

by:
SidFishes earned 1000 total points
ID: 17082204
don't think you can do this without some intermediary step. The reason you are getting"garbage" is that you are showing the pdf's native format with the cfhttp get. If you were to look at the http stream as it arrives at your browser which is what cfhttp does you'll see this "garbage".

In order for this to work you'd need to save the pdf via cffile, run a cfexecute with something like PDF2TEXT http://www.pdf2text.com/ or pdfbox http://www.pdfbox.org/ and then use cffile to read it back into cfdocument...

(my question is why would you want to ;)




0
 

Author Comment

by:jeffmace
ID: 17082275
Long story as to why I want to.   The company i work for creates medical journals and we have loads and loads of pdf files.  Very small, but I am trying to come up with a way to basically batch convert them.  It is more of an experiment than anything that I am doing on my local devleopement  box.

Thank you for your suggestions.
0
 
LVL 12

Assisted Solution

by:mmc98dl1
mmc98dl1 earned 1000 total points
ID: 17086558
check out convertdoc, it has a COM interface, so you dont have to use cfexecute (one to avoid in my mind) and you can simply feed it PDF files. It can convert them pretty nicely into HTML and then you can render your html version into flash paper.

I have used this at a recruitment software company where we turned any resume into HTML with convertdoc, we were ASP model, so had thousands of these a day to do.

http://www.softinterface.com/Convert-Doc/Convert-Doc.htm 
0
 
LVL 36

Expert Comment

by:SidFishes
ID: 17256534
I'd suggest a split between mmc98dl1 and myself...both options work...one using cfexecute, one not...
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question