AndyGB4
Posts: 122
|
Posted: 10/23/2013, 9:11 AM |
|
Hi everyone,
So I was looking at some of the Actions that CodeCharge has built-in, and notice the "Convert Page to PDF" one! I don't remember seeing it in CCS4, so I'm guessing it appeared in CCS5.
My question is does anyone know how to actually use it?
The 4 parameters it asks for and gives you are these (with their description in italic):
Command:
The command which will be used for converting.
Options: {InputFile} -f {ResultFile} -root {Root}
The options for the command.
Parameter Name: _convert
The name of the HTTP parameter which will enable converting.
Temporary Folder: %TEMP
The path to the folder where the temporary files are stored.
Can anybody help me understand what I might have to modify or add to these default parameters?
By the way, I added the "Convert Page to PDF" action to the Server - OnClick event of a Button.
Any help at all would be greatly appreciated, this action does not seem to be documented anywhere thanks everyone!
|
|
|
eratech
Posts: 513
|
Posted: 10/30/2013, 12:27 AM |
|
Hi Andy - check out the help file - there is a "Convert Page to PDF" action page.
I think it needs to have a PDF converter installed (yessoftware used to make one but I can't find it on the site)
On my PHP/Linux server I have had some luck with a library called 'dompdf'. Still some rough edges with images, but simpler than some I have seen.
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia |
|
|
mor
Posts: 119
|
Posted: 10/30/2013, 3:58 AM |
|
"Convert Page to PDF" exists also in CCS4 and CCS3! :)
From help files:
Quote :This action is used to convert the HTML output of a page to PDF or other formats. The action requires an external conversion application (program) and can be used only in the Before Output event of non-includable pages. YesSoftware offers a PDF printer driver, which can be used for such purposes on Windows servers.
It require tool, called 'SuperPDF', installed on any windows server.
_________________
Mor ve Ötesi |
|
|
AndyGB4
Posts: 122
|
Posted: 11/01/2013, 7:05 AM |
|
Thanks guys,
So after contacting support, this would explain why we can't find Super PDF:
Quote :Yes, we non longer supports the SuperPDF product and this component is no longer available for download.
They also added this:
Quote :As far as I know CCS users have successfully used TCPDF, PDFCreator and HTMLtoPDF3.5 with CCS pages.
I've being playing around with those and many other PDF generators/converters, but I'm still having lots of trouble setting anything up...
I'll keep working on it though!
|
|
|
Donna111
Posts: 5
|
Posted: 12/12/2013, 8:46 PM |
|
Hi there
It is difficult for me to convert page to PDF files using a code.Because i am a beginner of PDF files.I want to get a powerful PDF converting tool which supports to do that directly.I know there are many PDF processing program which supports to do that.But if there is any free trial package for new users?I want to have a try before i decided to purchase it.Thanks for any suggestions. http://www.rasteredge.com/how-to/csharp-imaging/pdf-converting/
|
|
|
eratech
Posts: 513
|
Posted: 12/12/2013, 9:21 PM |
|
Some of the PDF libraries work with specific code to make the PDF, which gives you 100% control over it, but it's not a great way of converting an existing HTML page.
Per my earlier answer, I have used 'dompdf' which is free and only for PHP 5 (http://pxd.me/dompdf/www/index.php) and there is a google group too (https://code.google.com/p/dompdf/wiki/Usage).
You download it and put it in a new folder in your site (ie: /dompdf)
Then in my report page (which is fairly plain in design anyway, as dompdf can get confused with nested tables), I put this in the page Before Output:
// -------------------------
// pass a parameter '_convert' and send to PDF instead
// NOTE: Definitely has problems with nested tables and possibly images
if (CCGetParam("_convert","0")!="0") {
global $main_block; // the CCS variable containing the page HTML
global $FileName;
require_once("dompdf/dompdf_config.inc.php");
$dompdf = new DOMPDF();
$dompdf->load_html($main_block);
$dompdf->set_paper="A4";
// force to Arial font
//$dompdf->font("sans-serif");
$dompdf->render();
$tmpfilename = str_replace("php","pdf",$FileName);
// stream to browser
$dompdf->stream($tmpfilename);
}
// -------------------------
You load the regular HTML page as normal, and make the PDF by appending the parameter "_convert=1" (or anything really - if it's not there you get HTML). It sets up dompdf, takes the page HTML and renders it in the dompdf and streams it to the browser as PDF.
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia |
|
|
arronlee
Posts: 6
|
Posted: 03/13/2014, 2:13 AM |
|
Quote Donna111:
Hi there
It is difficult for me to convert page to PDF files using a code.Because i am a beginner of PDF files.I want to get a powerful PDF converting tool which supports to do that directly.I know there are many PDF processing program which supports to do that.But if there is any free trial package for new users?...
Hi, Donna111.
I have some tutorials on PDF converting here:
How to convert PDF in VB.NET: http://www.yiigo.com/guides/vbnet/how-to-pdf-convert.shtml
How to convert PDF in C#.NET: http://www.yiigo.com/guides/csharp/how-to-pdf-convert.shtml
I hope it helps. You can google it and have a try. I hope you usccess. Good luck.
Best regards,
Arron
_________________
Best Regards,
Arron
|
|
|
rathanvamsi
Posts: 1
|
Posted: 04/21/2014, 3:09 AM |
|
Quote arronlee:
Quote Donna111:
Hi there
It is difficult for me to convert page to PDF files using a code.Because i am a beginner of PDF files.I want to get a powerful PDF converting tool which supports to do that directly.I know there are many PDF processing program which supports to do that.But if there is any free trial package for new users?...
Hi, Donna111.
I have some tutorials on PDF converting here:
How to convert PDF in VB.NET: http://www.yiigo.com/guides/vbnet/how-to-pdf-convert.shtml
How to convert PDF in C#.NET: http://www.yiigo.com/guides/csharp/how-to-pdf-convert.shtml
I hope it helps. You can google it and have a try. I hope you usccess. Good luck.
Best regards,
Arron
thanks arronlee, i'm also expecting this solution. your guide will be very helpful. thanks once again.
_________________
http://www.webdesigninchennai.in/web-designing.html |
|
|
lilianaplus
Posts: 2
|
Posted: 04/29/2014, 7:12 AM |
|
Actually you need to convert PDF from HTML pages, there are PDF creators you can search on line.
or you can find one here http://www.pdfconverterformac.net/
___________________________ http://www.pdftoflashconverter.com/
|
|
|
ckroon
Posts: 869
|
Posted: 04/29/2014, 3:41 PM |
|
Try these guys out..
pdfcrowd.com
Works great!
_________________
Walter Kempees...you are dearly missed. |
|
|
susannamoore
Posts:
|
Posted: 05/15/2014, 2:31 AM |
|
I just got around to this post… it’s funny because I just found and used a pdf software to read and convert pdf before reading this article! I really liked the demo project. It was easy to implement, plays friendly with everything else already on the page. Easy to customize.
You may see details from: http://www.rasteredge.com/dotnet-imaging/addon-pdf-document-reader/
To save pdf accordingly, check this out. http://www.rasteredge.com/dotnet-imaging/addon-pdf-document-generator/
|
|
|
|