CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 SuperPDF

Print topic Send  topic

Author Message
templemedia

Posts: 34
Posted: 01/15/2007, 8:17 AM

Hi

Has anyone managed to get the Convert to pdf action in CCS3 working using SuperPDF?

Any code examples available?

Regards

Richard
View profile  Send private message
klwillis


Posts: 428
Posted: 01/15/2007, 1:30 PM

As far as I know, SuperPDF cannot be used (accessed) programatically within CCS
to render a page to PDF.

It is usefull though in rendering a page to PDF *after* the page have been
displayed by directing printer output to the SuperPDF printer driver.

~~~

Hi

Has anyone managed to get the Convert to pdf action in CCS3 working using SuperPDF?

Any code examples available?

Regards

Richard

_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"

Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006
View profile  Send private message
cwb

Posts: 5
Posted: 02/27/2007, 11:48 AM

I tried using the standard include but in the end had to alter it a little. Here's a copy of the code I'm using in response to a link (_convert).

Function Page_BeforeOutput(Sender) 'Page_BeforeOutput @1-FB5D75F3

'Custom Code @114-73254650
' -------------------------
If Request.QueryString("_convert").Count > 0 Then

Dim Shell, oExec, fso, TempFile, Stream, TempFolder, ResultFile, InputFile, Command, WaitObj

Command = Session("superPDF") '"c:\SuperPDF\bin\pdftool.exe {InputFile} -f {ResultFile}"

Set Shell = Server.CreateObject("WScript.Shell")
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set Stream = Server.CreateObject("ADODB.Stream")
Set TempFolder = fso.GetFolder(session("tempFileFolder"))
InputFile = TempFolder.Path & Session.SessionID & Replace(fso.GetTempName(),".tmp",".html")
ResultFile = TempFolder.Path & Session.SessionID & Replace(fso.GetTempName(),".tmp",".pdf")
Set TempFile = fso.CreateTextFile(InputFile, True)
TempFile.write MainHTML
TempFile.Close

Command = Replace(Replace(Replace(Command, "{Root}", Server.MapPath(PathToCurrentPage)), "{ResultFile}", """" & ResultFile & """"), "{InputFile}", """" & InputFile & """")
Command = Command & " -s A4 -q prepress"
Set WaitObj = Server.CreateObject ("PDFHelper.Helper")
Set oExec = shell.Exec(Command)
Do While oExec.Status = 0
WaitObj.Sleep 100
Loop

Response.ContentType="application/pdf"
Stream.Open
Stream.Type = 1

Stream.LoadFromFile ResultFile
Response.BinaryWrite stream.Read()
Stream.Close
fso.DeleteFile InputFile
fso.DeleteFile ResultFile
Set WaitObj = Nothing
Set Stream = Nothing
Set fso = Nothing
Set shell = Nothing
Page_BeforeOutput = false
End If
' -------------------------
'End Custom Code

End Function 'Close Page_BeforeOutput @1-54C34B28
View profile  Send private message
mgravlee

Posts: 2
Posted: 03/26/2007, 5:16 PM

I am having trouble getting a PDF to display on the client PC. I am using PHP on Windows 2000 on the server as recommended. When I run the report with no '_convert' option, it displays correctly on the client PC. But when the '_convert=1' or '_convert=true' option is specified in the URL, it just displays a blank page in the Acrobat viewer. It must be something that I have not set correctly. Help anyone?!

Thanks!

Mike Gravlee
mikeg@goodnewscs.com
View profile  Send private message
nteller

Posts: 2
Posted: 07/18/2007, 5:46 AM

Hi cwb,

i can't what you have changed to make it work.
Could you please explain this?
My cmd-line works perfectly but the CodeCharge-Integration doesn't.

Thanks in advance

Nils
_________________
Greetings

Nils (from Munich)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.