• eCommerce
  • Social and Community Suite
  • Content Management
  • RSS Extensions
  • VirtueMart Extensions
Follow us on Twitter   Join The Factory on the New Digg  
(0) | Login | Register | Lost Password?
Username: Password:  
Home
Our Products
Joomla 1.7.x  (23) & J!1.6.x
Joomla 1.5.x (28)
Joomla 1.0.x (17)
Factory Club Extensions (7)
Drupal, Elxis, MODx (6)
Windows Gadgets for J! (11)
Free Templates (4)
All Products (92)
Documentation
Tweets
Forum
Contact Us
Terms & Conditions
How to Buy Guide
Customers FAQ's
Updates & Upgrades
About Us
The Factory Demo Server for Joomla Extensions
Money Back Guarantee
Payment Methods for Joomla Extensions
Follow us on Facebook

Latest Tweets

  • Join us at the Joomladay UK!
  • The Factory Extensions Joomla Compatibility Chart
  • Love Factory 2.4 for Joomla 1.7
  • Love Factory - Memberships [VIDEO]
  • Love Factory - Custom Fields Integration [VIDEO]
  • Love Factory - Google Maps Integration [VIDEO]
  • Love Factory - Administrator Guide [VIDEO]
  • Love Factory - Memberships
  • Collection Factory for Joomla 1.6 with CB support
  • Reverse Auction Factory 1.5.9
 
   Home   Help Search Login Register  
The Factory > Forum > Content Management Suite for Joomla CMS. > eBook Factory > Issue : HTML spaces rendered as squares
Pages: [1] 2
« previous next »
  Print  
Author Topic: Issue : HTML spaces rendered as squares  (Read 5492 times)
Krycek
Newbie
*
Posts: 12


View Profile
Issue : HTML spaces rendered as squares
« on: August 31, 2009, 11:10:34 am »

Hello,

Amazed by this extension and how it was fulfilling our needs, we bought it for our author community.

However, there is a problem with HTML spaces rendering. Indeed, in J! there's sometimes usual spaces and those ones :
Code:
 
But they are rendered as squares in final pdf file :


Can you please advise how to bypass this ?
I'm even willing to hack it myself if code is provided.

One point though : we have lots of articles and CANNOT take the bet to edit each of them to remove those kind of HTML spaces.

Thank you in advance for your support.
Logged
Erik
Administrator
Hero Member
*****
Posts: 3121



View Profile
Re: Issue : HTML spaces rendered as squares
« Reply #1 on: August 31, 2009, 11:11:49 am »

Are you a client? I was not able to match your data with our customer database....
Logged
Krycek
Newbie
*
Posts: 12


View Profile
Re: Issue : HTML spaces rendered as squares
« Reply #2 on: August 31, 2009, 11:28:56 am »

Hello.

Yes I am a client though I'm not the one who bought the extension but another member of the community I administrate.

Website is http://www.les-chroniques.eg2.fr
Logged
Erik
Administrator
Hero Member
*****
Posts: 3121



View Profile
Re: Issue : HTML spaces rendered as squares
« Reply #3 on: August 31, 2009, 11:31:42 am »

PM please the order details informations including name and order number.
Thank you!
Logged
Krycek
Newbie
*
Posts: 12


View Profile
Re: Issue : HTML spaces rendered as squares
« Reply #4 on: September 01, 2009, 01:43:29 pm »

Hi Erik,

I sent you through PM requested intells.
Logged
Erik
Administrator
Hero Member
*****
Posts: 3121



View Profile
Re: Issue : HTML spaces rendered as squares
« Reply #5 on: September 01, 2009, 02:50:41 pm »

Everything ok.
We checked and found and issue with some &nbsp ; spaces,
which we fixed in todays remake.
Please use this link:
http://www.thefactory.ro/contact-us/product-update-request.html
in order to obtain the latest build.
Logged
Krycek
Newbie
*
Posts: 12


View Profile
Re: Issue : HTML spaces rendered as squares
« Reply #6 on: September 02, 2009, 12:10:28 pm »

Hi Erik,

Indeed, I downloaded this new version and HTML spaces are now fine !
Thanks for this quick update !!!

However (there's always a 'however' ) I still have some squares for other kinds of spaces. Let me take an example.
( I do know you may not speak french, but spaces aren't languages specific, are they ? Cheesy )

Here we go with the rendered ebook picture :

As one can see, all HTML spaces are now fine. Still remains stacks of 2 squares sometimes.
Checking Joomla! article :

Spaces seem normal.
Checking Joomla! HTML source :

So it seems that in the source, those "common" spaces are rendered as normal line breaks but not HTML.

Checking deeper other articles, all of them are of the same kind (from multiple authors, web browsers, word editors, etc...). Maybe it is coming from DB storage or copy/paste reception. Anyway render is fine in Joomla! Back-end and Front-end, not in Ebooks.
Moreover, what I don't understand is why none else figured this out.

Can your component translate those line breaks as usual spaces ?

Thank you again for your support in advance.
Nice day to you.
Logged
alex.d
The Factory Staff
Hero Member
*
Posts: 1469


Senior Developer


View Profile WWW
Re: Issue : HTML spaces rendered as squares
« Reply #7 on: September 02, 2009, 12:40:03 pm »

Like you said, those aren't normal spaces, they are special characters that, most probably, come from copy/pasting text from different word editors.

Try to clean up the code before saving it to the database, or find out the hexcode for those characters so I can replace them with normal spaces.
Logged

The Factory's Development Team member.
Krycek
Newbie
*
Posts: 12


View Profile
Re: Issue : HTML spaces rendered as squares
« Reply #8 on: September 02, 2009, 01:44:45 pm »

Well, how can I find this character id ?!

In the DB it is also a line break ie. something I cannot select and know what it is. In the .pdf file it is also something I cannot select though it is visible.

I would just need some tip to provide you what you need.
Logged
alex.d
The Factory Staff
Hero Member
*
Posts: 1469


Senior Developer


View Profile WWW
Re: Issue : HTML spaces rendered as squares
« Reply #9 on: September 02, 2009, 01:52:11 pm »

Use the strToHex function found here http://ditio.net/2008/11/04/php-string-to-hex-and-hex-to-string-functions/ on the character.
Logged

The Factory's Development Team member.
Krycek
Newbie
*
Posts: 12


View Profile
Re: Issue : HTML spaces rendered as squares
« Reply #10 on: September 02, 2009, 02:03:14 pm »

Thanks, I'll give it a shot.

In the meantime, I took Foxit pdf editor and selected some line with those squares.
With text properties it came out that squares were <000D><000A> and had to be replaced by <0020>.
Dunno if that's useful for you.

Anyway if you know how to change some hex characters to other characters, wouldn't it be interresting to convert all squares unicode characters (from 0000 to 000F) to space unicode characters (0020) ?

Note that I'm only suggesting and surely ain't properly aware of many stuff to discuss that. Smiley Please forgive any stupid idea I may have proposed ! Grin
Logged
alex.d
The Factory Staff
Hero Member
*
Posts: 1469


Senior Developer


View Profile WWW
Re: Issue : HTML spaces rendered as squares
« Reply #11 on: September 02, 2009, 02:23:31 pm »

I don't know what each hex code represents, it may be a valid character or not.

Like I said, if you clean the code before you save it to the database, then there wouldn't be any problem.
Logged

The Factory's Development Team member.
Krycek
Newbie
*
Posts: 12


View Profile
Re: Issue : HTML spaces rendered as squares
« Reply #12 on: September 02, 2009, 02:51:08 pm »

If you mean by "Clean up the code" use the yellow brush of J! editor... just forget it, it doesn't change anything at all.

And for codes I provided, you may refer to Unicode character map (which can be translated to hex). There you can see that range I proposed (from 0000 to 000F) is only composed of squares. Anyway, if you could only translate the 2 upper mentioned (000D & 000A) to spaces (0020) it would do the trick.

If you don't want to, for interaction reasons with other customer (which I would understand), could you at least let me know how to do it on my side ? (I guess this is related to some preg_match function or some approaching)

Thanks & regards
Logged
Erik
Administrator
Hero Member
*****
Posts: 3121



View Profile
Re: Issue : HTML spaces rendered as squares
« Reply #13 on: September 02, 2009, 02:57:43 pm »

Clean the code means that you paste simply characters into the joomla articles. In some cases even Joomla will not display properly if the text was pasted with special characters.

A simple method always is before pasting the article into joomla content, paste it to notepad, then copy it from there again without any word or other specific programs formatting and then copy it from notepad to the joomla content. It's very easy to do this....

We cannot strip any characters from the code since in some cases they are supposed to be there.
« Last Edit: September 02, 2009, 03:07:25 pm by Erik » Logged
alex.d
The Factory Staff
Hero Member
*
Posts: 1469


Senior Developer


View Profile WWW
Re: Issue : HTML spaces rendered as squares
« Reply #14 on: September 02, 2009, 03:01:48 pm »

You must edit the eBookPdf.class.php file, found in the [Joomla dir]/administrator/components/com_ebooks/ folder.

Find the parseHtml function (line 287).

Add your replacements just after the line 297. Line 297 fixes the &nbsp ; issue.
Logged

The Factory's Development Team member.
Pages: [1] 2
  Print  
« previous next »
 
Jump to:  

Loading...
Joomla Extension - RSS Factory Manager  Joomla Extension - EBook Factory  Joomla Extension - Briefcase Factory  Joomla Extension - Auctions Factory  Joomla Module - RSS Contextual  Joomla Module - Exchange Factory (Europe / EURO)  Joomla Module - Exchange Factory (Romania/ RON)  Joomla Custom Extensions Development   Free Joomla Extensions  Joomla Extension - RSS Factory Pro (Enhanced Version)  Joomla Virtuemart Payment Plugin - Gecad (EPayment.ro)  Joomla Module - Mosimage / Image Module  Joomla Extension - Reverse Auction Factory (Lowest Bidder Auctions)  Joomla Extension - Article Factory Manager  Joomla Module - Lavalamp Menu  Joomla Module - RSS Image Extractor  Joomla Module - Exchange Factory (Europe / EURO) for Joomla 1.0.15  Joomla Module - Exchange Factory (Romania / RON) for Joomla 1.0.15  Joomla Module - Top Movies (IMDB)   Joomla Module - EBay Latest Auctions  Auction Factory Standalone PHP script