8 Replies - 2420 Views - Last Post: 26 January 2016 - 08:07 PM Rate Topic: -----

#1 rlp@ohrc.org  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 12
  • Joined: 13-November 15

CFPDF Locks up the Coldfusion 9.0 service

Posted 22 January 2016 - 01:42 PM

Even the simplest example code locks up the server. I'm needing to convert a small pdf to an image so I can display it as a thumbnail.
I've tried:
<cfpdf action="thumbnail" source="myPDF.pdf" destination="C:\docs\" overwrite="yes" />

:code:
Anyone ever hear of this issue? Google has nothing I can find.

This post has been edited by modi123_1: 22 January 2016 - 01:49 PM
Reason for edit:: fixed botched code tags


Is This A Good Question/Topic? 0
  • +

Replies To: CFPDF Locks up the Coldfusion 9.0 service

#2 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 2024
  • View blog
  • Posts: 3,609
  • Joined: 13-January 08

Re: CFPDF Locks up the Coldfusion 9.0 service

Posted 22 January 2016 - 02:03 PM

Hi again rlp.

So, when you say it "locks up the server" can you be more specific? That is, does the server itself become unresponsive? Can you RDP to the server and run something like task manager and see what the CPU and memory usage of CF is on the server? Essentially, your first step is to try and determine what is actually happening. "Locks up the server" is too vague to troubleshoot.

Additionally, have you tried to do anything else with this PDF with this tag? Something like action="info" perhaps? If you can get that to work then you can eliminate the CF server having an issue with the tag.

If you can determine that the server is okay, have you tried this thumbnail action with another PDF? According to the CF9 documentation for CFPDF "...the permissions of the source document must include AllowCopy." If you could get the CF server to play nice with another PDF document, the clearly then issue is with the document file itself.

Give those a spin and let us know how those two approaches go. Good luck!

This post has been edited by Craig328: 22 January 2016 - 02:04 PM

Was This Post Helpful? 0
  • +
  • -

#3 rlp@ohrc.org  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 12
  • Joined: 13-November 15

Re: CFPDF Locks up the Coldfusion 9.0 service

Posted 23 January 2016 - 09:49 AM

When I say locks up server, the main CF service has to be restarted. Else, no other templates are processes. All other cfm's stop and eventually timeout. Funny thing is, task manager shows almost no activity. All the file services and print services (non-coldfusion processing) continues as normal. The server is our in-house server as well.

I've tried other actions on the same document(s) such as <cfpdf action="read" and <cfpdf action="getinfo", they work fine???

These pdf's are stored print jobs created with <cfdocument>.

I just tried <cfpdf action="thumbnail" source="test.pdf" /> with a pdf created by our big Xerox copier/scanner. The test source file is located in the same folder as the CF template. Same outcome. CF service is locked up. :(/>
Was This Post Helpful? 0
  • +
  • -

#4 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 2024
  • View blog
  • Posts: 3,609
  • Joined: 13-January 08

Re: CFPDF Locks up the Coldfusion 9.0 service

Posted 23 January 2016 - 08:53 PM

Have you looked into the exception log in the admin? Anything showing up in there?

Also, if the page this is located on isn't too prohibitively large, do you mind posting it here?
Was This Post Helpful? 0
  • +
  • -

#5 rlp@ohrc.org  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 12
  • Joined: 13-November 15

Re: CFPDF Locks up the Coldfusion 9.0 service

Posted 25 January 2016 - 06:55 AM

OK, let me explain the requirement, maybe I'm missing an easier way...

Last time you helped me I was designing a identification badge process to create a pdf to be sent to a badge card printer. That's all done. I'm printing a bar code on the badge and am now designing the search results document that the law enforcement types will get when scanning a badge.

The idea is to have the original print job display on this page so then can screen for counterfeit cards. We have a real problem with counterfeits. So, if the search results don't display an exact image of the badge that is being presented, they've just busted a counterfeit card holder. The bad guys scan our cards and edit the image and reprint them for unqualified people.

The security guys at the entry control points will be using smart phones, tablets, and sometimes desktop clients to scan the barcode. I'm writing the page they will get when searching. I soon found out it's impossible to design a responsive web page that includes a PDF as I can't control the reader the client may be using.


So, I decided to try and convert the PDF to an image.

Current process steps:
1. Take photo, get badge card content data
2. Create PDF
3. Save database record
4. Save PDF to disk
5. Print PDF to badge card printer
6. Design responsive search results process
6a. Ask for help :)/>/>/>/>/>/>/>/>/>

I'm using to CFPDF thinking that's the best way to convert a PDF to an image that I can use to design a responsive document for the many different client types I expect to use it.

I'm running CF9.0
Here's the CF Code:
<cfquery name="getBadge" datasource="BadgeCards">
	Select * From BadgeCards
	Where id=#url.id#
</cfquery>

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>
			OHRC Badge Card Results
		</title>
		<style type="text/css">
			#dataColumn {
				width: 30%;
				float: left;
			}
			
			#pdf {
				width: 65%;
			}
		</style>
	</head>
<body>

<div id="dataColumn">
	Data Goes Here
</div>
<div id="pdf">
	<!--- <cfpdf action="thumbnail" overwrite="yes" source="C:/Workgroups/WebPages/binkley/BadgeCard/PDFs/2016-OC-276693FMTGreen508-1.pdf" format="png" /> --->
	<cfpdf action="getinfo" name="cfpdfTest" source="C:/Workgroups/WebPages/binkley/BadgeCard/PDFs/2016-OC-276693FMTGreen508-1.pdf" />
	<cfdump var="#cfpdfTest#" >
</div>
</body>
</html>



Here's a link: [removed by author's request]
I've hard coded the pdf file name for now but it will be dynamic if I ever figure this out...
PDF Is Attached. I have action="getinfo" running now just to show that the source attribute is correct. If I remove the comments from action="thumbnail" the main CF service hangs up.

I can't see any entries in the exception.log when this thumbnail code is run???

Much thanks!!!

Attached File(s)


This post has been edited by Craig328: 25 January 2016 - 08:26 AM
Reason for edit:: Removed link

Was This Post Helpful? 0
  • +
  • -

#6 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 2024
  • View blog
  • Posts: 3,609
  • Joined: 13-January 08

Re: CFPDF Locks up the Coldfusion 9.0 service

Posted 25 January 2016 - 08:30 AM

Hm. Let me see if I can get some time today to run a test on my local CF9 instance and reproduce the problem. I'll use your attached PDF as the subject.

Meanwhile, if you have access to the CF admin, have you tried running the server monitor while this runs? That might be able to give you an idea of what's happening.
Was This Post Helpful? 0
  • +
  • -

#7 rlp@ohrc.org  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 12
  • Joined: 13-November 15

Re: CFPDF Locks up the Coldfusion 9.0 service

Posted 25 January 2016 - 08:43 AM

CF Version
Server Product ColdFusion
Version 9,0,1,274733
Edition Standard

Server Monitor gives this message :(

Server Monitoring > Server Monitor

This feature is not available in this edition of the ColdFusion server.

Must be because I have the Standard edition???
Was This Post Helpful? 0
  • +
  • -

#8 rlp@ohrc.org  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 12
  • Joined: 13-November 15

Re: CFPDF Locks up the Coldfusion 9.0 service

Posted 26 January 2016 - 03:20 PM

I have it going. It must be my CF 9 configuration. Exactly what I have no idea. This AM I thought about by stand by server. I never use 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.
Was This Post Helpful? 1
  • +
  • -

#9 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 2024
  • View blog
  • Posts: 3,609
  • Joined: 13-January 08

Re: CFPDF Locks up the Coldfusion 9.0 service

Posted 26 January 2016 - 08:07 PM

Good for you, man!

I was coming back here to post that I could get it working fine with your PDF and some of my own with a little test page I ginned up. Glad to hear you have a solution. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1