Solved

Get PDF File and Convert to Flash Paper

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

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…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

13 Experts available now in Live!

Get 1:1 Help Now