Solved

Get PDF File and Convert to Flash Paper

Posted on 2006-07-11
5
236 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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…
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

816 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now