Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Get PDF File and Convert to Flash Paper

Posted on 2006-07-11
5
Medium Priority
?
257 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

609 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