1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-07 18:30:34 +00:00

process hidden text (render == 3), make them selectable in HTML. BREAK TEXT STROKE SIMULATION IN FIREFOX

This commit is contained in:
Lu Wang 2013-02-23 22:30:21 +08:00
parent d3b935d1b3
commit f4613ceea5
3 changed files with 6 additions and 18 deletions

View File

@ -23,12 +23,11 @@ void SplashBackgroundRenderer::drawChar(GfxState *state, double x, double y,
// - there is special filling method // - there is special filling method
// - OR using a writing mode font // - OR using a writing mode font
// - OR using a Type 3 font // - OR using a Type 3 font
if( ((state->getRender() & 3) == 3) if(( (state->getFont())
|| ( (state->getFont()) && ( (state->getFont()->getWMode())
&& ( (state->getFont()->getWMode()) || (state->getFont()->getType() == fontType3)
|| (state->getFont()->getType() == fontType3) )
) )
)
) )
{ {
SplashOutputDev::drawChar(state,x,y,dx,dy,originX,originY,code, nBytes, u, uLen); SplashOutputDev::drawChar(state,x,y,dx,dy,originX,originY,code, nBytes, u, uLen);

View File

@ -40,12 +40,6 @@ void HTMLRenderer::drawString(GfxState * state, GooString * s)
return; return;
} }
//hidden
if((state->getRender() & 3) == 3)
{
return;
}
// see if the line has to be closed due to state change // see if the line has to be closed due to state change
check_state_change(state); check_state_change(state);
prepare_text_line(state); prepare_text_line(state);

View File

@ -413,17 +413,12 @@ public:
static const char * get_css_class_name (void) { return CSS::FILL_COLOR_CN; } static const char * get_css_class_name (void) { return CSS::FILL_COLOR_CN; }
/* override base's method, as we need some workaround in CSS */ /* override base's method, as we need some workaround in CSS */
void dump_css(std::ostream & out) { void dump_css(std::ostream & out) {
// normal CSS out << "." << get_css_class_name() << CSS::INVALID_ID << "{color:transparent;}" << std::endl;
out << "." << get_css_class_name() << CSS::INVALID_ID << "{color:white;}" << std::endl;
for(auto iter = value_map.begin(); iter != value_map.end(); ++iter) for(auto iter = value_map.begin(); iter != value_map.end(); ++iter)
{ {
out << "." << get_css_class_name() << iter->second out << "." << get_css_class_name() << iter->second
<< "{color:" << iter->first << ";}" << std::endl; << "{color:" << iter->first << ";}" << std::endl;
} }
// webkit
out << CSS::WEBKIT_ONLY << "{" << std::endl;
out << "." << get_css_class_name() << CSS::INVALID_ID << "{color:transparent;}" << std::endl;
out << "}" << std::endl;
} }
}; };