Comments (8)
At the point where this happens in EPub, I'm already parsing the HTML
DOM, so I'll make the change there.
Thanks for a good idea though :).
I'll be updating GitHub shortly. The addChapter function have a
parameter for external references. Previously
EPub::EXTERNAL_REF_REPLACE_IMAGES would cause addChapter to replace all
images with "[image]", I've changed that if it's present, it'll
use the alt tag value instead of "image", else it'll fall back to just
"image"
Which version do you use? The regular EPub.php or the new EPub250.php?
Cheers
A.Grandt
On 04-10-2013 21:31, Adrien Dorsaz wrote:
Hello!
I think, it could be good to display the alt value of images instead
of simply removing entire tag.It can be done with this regexp for example:
$html_content = preg_replace('/<\s_?img.alt="(.?)"._?>/', '${1}', $html_content);
I'll use this regular expression in my epub plugin for the Leed RSS
reader and I think, it can be usefull for you too.Thanks for your great work on PHPePub !
—
Reply to this email directly or view it on GitHub
#12.
from phpepub.
I'm using Epub250.php simply because I've tried it first and it worked well for my needs (and because I like the modularity).
Indeed, I've used EPub::EXTERNAL_REF_IGNORE because I thought that it was not only about images, but really all external references (like video, audio, ..., but I don't know what a epub can contain).
I think, I'll use the REPLACE_IMAGES so. Thanks !
from phpepub.
You are right, EXTERNAL_REF_IGNORE removes all externals. And it will
erase images entirely.
I'll have to think about that one for a short while. Should ignore place
the image alt value or not...
I'm currently playing with how to best support nested chapters (chapter
levels). The EPub.NCX alreasy suppirts it, but I'm still trying to
figure out how to expose this in the EPub.
Cheers.
On 05-10-2013 11:51, Adrien Dorsaz wrote:
I'm using Epub250.php simply because I've tried it first and it worked
well for my needs (and because I like the modularity).Indeed, I've used EPub::EXTERNAL_REF_IGNORE because I thought that it
was not only about images, but really all external references (like
video, audio, ..., but I don't know what a epub can contain).I think, I'll use the REPLACE_IMAGES so. Thanks !
—
Reply to this email directly or view it on GitHub
#12 (comment).
from phpepub.
Hi i'm currently using the Epub.php and i've noticed that when downloading external animated gif images. The images that has been downloaded loses its animation.
from phpepub.
leikxile, even with the latest version updated 2 days ago. I added Gif's as a valid format (older readers using the Adobe Digital Editions, can crash on Gifs.)
You need to set $book->isGifImagesEnabled = TRUE;
If not, can I get you to send me an example book having this gif to [email protected] ?
from phpepub.
Sent
from phpepub.
Updated to the latest version and everything seems to be working now. Thank you!
from phpepub.
Resolved, closing.
from phpepub.
Related Issues (20)
- Downloading Images from an https protocol HOT 6
- Cover image thumbnail broken in 3.30
- Encoding special caracters for filename HOT 2
- TOC showing up at end of created eBook HOT 10
- Encrypt epub with a password
- Generated epub file does not display on iBook. HOT 4
- Wrong variable name in buildTOC() V3.30 HOT 1
- Add file in META-INF ? HOT 3
- Error converting markup with svgs HOT 15
- Two first chapters having the same id HOT 9
- Pathinfo extension undefined HOT 6
- remove composer.phar from legacy folder
- How can I force images to be stored in the root of the image directory?
- Warnings in PHP log during an export epub
- How can I generate pages hidden from the toc?
- How can I set reference/landmark type for specific pages/chapters? HOT 1
- Replace each() by foreach() HOT 1
- Can I convert PDF to EPUB using the library? HOT 1
- Call to a member function addIndexPoint() on boolean at vendor/grandt/phpepub/src/PHPePub/Core/EPub.php:383
- Replace each() by foreach() HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpepub.