Solved

Joomla Articles with PDF

Posted on 2015-01-10
2
249 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
ID: 40544750
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
ID: 40555619
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ebay devID, appID, certID, userToken 2 27
Why doesn't Google directions work? 6 46
website maintenance mode 1 17
Cookie not unsetting 7 19
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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 …

777 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