INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

CFpdf Tag Locking up my server

CFpdf Tag Locking up my server

(OP)
I need to generate thumbnails of very small (100-130kb) PDF files. Every time I try to use the tag I have to restart the main ColdFusion 9.0 service; the "thumbnail" folder gets created, I never get any jpeg(s), and the server locks up completely.

Even this most basic form of the tag usage locks me up:

CODE

<cfpdf action="thumbnail" source="C:\myPDFs\Test1.pdf" overwrite="yes" imageprefix="thumb"> 

I also tried messing with pdf.js javascript library, supposed to generate thumbs too, but all the examples I found were very incomplete and way over my head I suppose.

Any help much appreciated.

Lyndon

RE: CFpdf Tag Locking up my server

I would say your path is wrong for the source.

source = "absolute or relative pathname to a PDF file|PDF document variable|

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim

RE: CFpdf Tag Locking up my server

A little clarification on my response. If this is on a server on your computer even though the path is on your computer it would not be reachable by coldfusion. The file must reside within reach of the server. With most setups it would be 'C:\ColdFusion10\cfusion\wwwroot\'

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim

RE: CFpdf Tag Locking up my server

(OP)
The source path I'm using is relative to the server. I used an example path in my post.

Lyndon

RE: CFpdf Tag Locking up my server

The path in your post would not be reachable by the coldfusion server. It can not go above the wwwroot folder. Try putting the pdf in the same directory with the file calling it and use this code.

CODE --> Coldfusion

<cfpdf action="thumbnail" source="Test1.pdf" overwrite="yes" imageprefix="thumb"> 

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim

RE: CFpdf Tag Locking up my server

(OP)
Same result. :(, I also tried a different pdf, not created with cfdocument...

Lyndon

RE: CFpdf Tag Locking up my server

What version coldfusion are you using? I would recommend a try catch to see any errors.

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim

RE: CFpdf Tag Locking up my server

(OP)
I'm using 9.0

Any idea what event I should "catch?

Lyndon

RE: CFpdf Tag Locking up my server

CODE --> Coldfusion

<cfcatch type="any"> 

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim

RE: CFpdf Tag Locking up my server

CODE --> Coldfusion

<cftry>
<cfpdf action="thumbnail" source="Test1.pdf" overwrite="yes" imageprefix="thumb">
 <cfcatch type="any">
         <cfoutput>
          Error Message: #cfcatch.message#<br>
          Error Detail: #cfcatch.detail#<br>
          Error Location: #GetBaseTemplatePath()#<br>
         </cfoutput>
          
          <p>We're sorry, an error has occurred and our developers have been notified.</p>
      </cfcatch>
</cftry> 

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim

RE: CFpdf Tag Locking up my server

(OP)
I tried this:

CODE

<cftry>
	<cfpdf action="thumbnail" overwrite="yes" source="C:/Workgroups/WebPages/binkley/BadgeCard/PDFs/2016-OC-276693.pdf" format="png" />
	<cfcatch type="any" name="myTry">
		<cfdump var="#cfcatch#" >
	</cfcatch>
</cftry> 
I guess it can't get past the cfpdf tag. It never gets to the cfcatch or cfdump tags. Just hourglass, had to restart service.

But this works fine:

CODE

<cfpdf action="getinfo" name="myPDFinfo" source="C:/Workgroups/WebPages/binkley/BadgeCard/PDFs/2016-OC-276693.pdf" format="png" />
<cfdump var="#myPDFinfo#"> 

So, my guess is that the source attribute value is not the problem???

Thanks!!!

Lyndon

RE: CFpdf Tag Locking up my server

You should have gotten an error since it should be...

CODE --> Coldfusion

<cftry>
	<cfpdf action="thumbnail" overwrite="yes" source="C:/Workgroups/WebPages/binkley/BadgeCard/PDFs/2016-OC-276693.pdf" format="png" />
	<cfcatch type="any" name="myTry">
		<cfdump var="#myTry#" >
	</cfcatch>
</cftry> 

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim

RE: CFpdf Tag Locking up my server

(OP)
I actually tried both. I'm really taking wild guesses now... sadeyes

Lyndon

RE: CFpdf Tag Locking up my server

Is there a thumbnails folder in the directory? Perhaps it has to do with file permissions as it will need to create that directory if it doesn't exist.

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim

RE: CFpdf Tag Locking up my server

(OP)
Yes, it is creating the thumbnails folder, but it has no files in it. Maybe I should use cffile and copy a file into the new dir and see if I get a permission error?

Lyndon

RE: CFpdf Tag Locking up my server

Sounds like a plan. Otherwise I think it's an Adobe question or a new install. I can find nothing with anyone having this problem and I think only changes in the IDE would cause it. I have tried having all files open and editing but can not produce an error.

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim

RE: CFpdf Tag Locking up my server

(OP)
CFFile copied a file into the thumbnails folder just fine...

Thanks for all of your assistance.

Lyndon

RE: CFpdf Tag Locking up my server

I hate things like this as they stick in my head lol Good luck. If I run across anything I will let you know.

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim

RE: CFpdf Tag Locking up my server

(OP)
I'm the same way, can't/won't give up, plus my customers need it.

I'm also looking at pdf.js as it's supposed to do this also. But all the examples I've found are really high level, and assume much more javascript skill than I have. I've got a few messages out there asking for a really simple PDF->JPG example, maybe I'll get some help there. I don't really care how this cat gets skinned. LOL

BTW, I graduated from MCRD, San Diego, in April of 1976. Did two years at 29-stumps then enlisted in the Air Force. Retired in 2005.

Lyndon

RE: CFpdf Tag Locking up my server

Semper Fi I graduated MCRD San Diego September 1975 and spent 2 years on Okinawa then 2 years at the stump with 1st Bn 4th Marines all 4 years lol

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim

RE: CFpdf Tag Locking up my server

(OP)
I have it going. It must be my CF 9 configuration. Exactly what I have no idea. This AM I thought about my standby server. I never use it, it's there in case of disaster. I ran the cfpdf tag on it and it worked great!

I'm using that server to get my thumbnails with a cflocation tag and can now finish this project. Once done I'll troubleshoot the main server and try to fix the issue.

Thanks for all the help!!!



Lyndon

RE: CFpdf Tag Locking up my server

Glad you figured out how to make it work. Hopefully you can find and repair the server.

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close