Solved

Joomla Articles with PDF

Posted on 2015-01-10
2
227 Views
Last Modified: 2015-01-17
I have joomla 3.3.6 with phocaPDF plugion installed.  This works great. THe issues i run into is when  an article that get publioshed with an img src that is empty. <img src=""> This results in unable to find image. I f i use jquery to removed the HTML output  with  $("img[src='/']").remove();  the img tags are all removed but the i still get the error when running the PDF.


WHere can i put the code in phoca pdf  to remove this first.
0
Comment
Question by:augustkrys
2 Comments
 
LVL 50

Accepted Solution

by:
Steve Bink earned 500 total points
Comment Utility
While I'm unfamiliar with the extension, I'm guessing it is using Joomla's article renderer to get the content.  The plugin then intercepts it and writes it to a PDF.  This means javascript will never have the chance to be run - the PDF will contain only the static content originally in the article.

One possible solution is to create another plugin that acts before PhocaPDF fires.  That plugin can find and remove any blank images, allowing Phoca to construct the page properly.

Another solution would be to make sure you aren't inserting images with a blank src attribute.  Create a transparent placeholder, if necessary, and reference that image instead.
0
 

Author Comment

by:augustkrys
Comment Utility
I created the plugin - however the PDF is still seeing the empty src- I will clean up the logic at the upload to just eliminate the problem at the source.

Thanks for the steering me in the correct spot
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now