Joomla 3.0+ Create PDF from HTML content - php

So I am trying to convert a certain type of page view into PDF (and also CSV's but thats another hurdle). The tricky part is that I am using Joomla 3.0 so the ever popular PhocaPDF extension will not work.
So far I have tried using http://docs.joomla.org/Creating_PDF_views, but it ends up throwing errors when referring to JRENDER().
Also I have tried using this extension
http://rootprogress.com/index.php/downloads/root-pdf-content
Which I can get to work but only for the article view. I can tell that this plug-in gets its code using DOMPDF and also grabs the $article from JOOMLA! so I have no idea where it is grabbing the $article variable from (so I can reassign it to my new view).
Has anyone had any success with implementing a PDF generator in Joomla 3.0?

The PDF functionality that used to be there in V1.5 was removed in V1.6, see Changes from 1.5 to 1.6. I don't think anybody put it back in for later versions. You can use a third party component if you really need it.

Joomla 3.3 has the option to print articles, you have just to enable it.
Then if you're browsing with Google Chrome you can easily print the page as PDF.

Related

render a php application inside Joomla article

I have a folder containing a php booking system,that i want to render as un article and add it to the main menu of the site.
The solution that i end with, is to use the joomla URL Wrapper. But it brokes my design as it render it inside an iframe.
Is there another way to do that?
Use Jumi, it includes PHP files into articles, without iframes.
Usage:
{jumi [path/to/file.php]}
Jumi website
That requires an integration work. At least you'd rather think of the way to give some Jooml Component wrapper to your booking sysytem. which at least involves creating a com_yourcomname folder, and a yourcomname.php that will dispatch your actions to the actions of the booking component and, perhaps, filter the urls in the output so that they match the Joomla url building convetions. If do this properly, your app will appear as a page content (not an article)

How to run CodeIgniter app in Joomla 2.5?

We have some apps developed in a single installation of CodeIgniter, where each controller is a different app.
We need to make it so that when a certain Joomla 2.5 article is loaded, it runs the CodeIgniter app, gets the resulting html from it, and shows it on the Joomla 2.5 site where the article would be loaded.
Some more useful information: the apps contain forms, which work via post.
Update: I tried opening an <iframe src="localhost/myapp/mycontroller/"></iframe>in the article html editor, but it seems it doesn't allow that. The iframe just disappears.
Okay so I found a solution. Not very elegant or convenient at all, but it allows me to do what I want to do.
I used the following code on the Joomla article:
<h1>Hello</h1>
<iframe src="http://localhost/" name="myiframe" width="600px" height="400px"></iframe>
However, the built-in Joomla editor doesn't allow iframes to be used on an article. It just deletes them. To get around this, I used phpMyAdmin to browse through the Joomla database.
I searched the prefix_content table for the article I wanted, and manually edited the row for that article, typing the html code in there.
The resulting iframe can now retain all the functionalities of CodeIgniter, and is nicely isolated into the iframe.
Like I said, not an elegant solution since I needed to alter the database directly, but there might be a Joomla extension around that allows iframes to be used.
There are tons of plugins in the JED.
Here's an exemple :
http://extensions.joomla.org/extensions/style-a-design/popups-a-iframes/16450?qh=YTo0OntpOjA7czo2OiJpZnJhbWUiO2k6MTtzOjc6ImlmcmFtZXMiO2k6MjtzOjc6ImlmcmFtZWQiO2k6MztzOjg6ImlmcmFtZSdzIjt9

tcpdf: get form data

I'm running Modx cms and created an eform. I would like user to be able to download a pdf with a filled form. I already know how to create a pdf from a normal text on the page using tcpdf but because of my poor programming skills, I have no idea how to pass form data to pdf.
Is there any easy solution? I would appreciate any help.
Look into eForm's event handler eFormOnBeforeMailSent. It may not be available in old versions of eForm. So make sure you use a current version. You find the eForm documentation in te snippet folder (/assets/snippets/eform) of your MODx installation.
This link may help you, also: http://www.partout.info/example_onbeforemailsent.html

Autocompleter for custom textfield in joomla

I have a textfield in a component i am using. I want to implement autocompleter for that field. Also the autocompleter should fetch data from an array...I tried the autocompleter with mootools from the below link but it works when tested seperately but when i integrate it with joomla it doesnt work.
http://digitarald.de/project/autocompleter/
Can anyone suggest me what are the options i can go after to fulfill my requirement. ??? or wat could be the cause that its not working.
Using Jquery might result in conflict with mootools so havnt tried that option.....
Thank you for the reply...
Maybe your problem is that Joomla renders response as HTML not JSON. Try to open the URL which you use for autocompletion in browser and see page source.
How to render valid JSON or XML, you can read in Joomla Wiki, sections "Generating JSON output" and "Generating XML output" respectively

Custom php code in Joomla page

I'm trying to change the source of a table in a Joomla 1.5.9 page from hardcoded html in the page to getting the information from a SQL database. What is the proper way to do this? Create a new model or component and somehow use that in the page?
I found these:
http://docs.joomla.org/Tutorial:How_to_use_the_database_classes_in_your_script
http://docs.joomla.org/How_to_use_the_database_classes_in_your_script
But I'm not sure where to write the php code and how to access it in the page. If somebody could point me to a basic tutorial for custom php or whatever it's called, I'm new to webb development, I'd be happy.
You can use the Jumi extension to add custom PHP code to a Joomla page or module.
You Can install The Php Pages Component in joomla 1.5 .Where you can write your custom php code in joomla .
Also using this Php Pages Component you can Also write the query in the Php Code Itself.
So That you can extract the data from the database.

Categories