Solved

Get PDF File and Convert to Flash Paper

Posted on 2006-07-11
5
246 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 250 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 250 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 NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

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

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
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 …

688 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