diff --git a/CMakeLists.txt b/CMakeLists.txt index 78213ee..fe849be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -174,8 +174,8 @@ configure_file (${CMAKE_SOURCE_DIR}/share/pdf2htmlEX.js.in ${CMAKE_SOURCE_DIR}/s set(PDF2HTMLEX_SRC ${PDF2HTMLEX_SRC} src/Param.h - src/pdf2htmlEX-config.h src/pdf2htmlEX.cc + src/pdf2htmlEX-config.h src/HTMLRenderer/HTMLRenderer.h src/HTMLRenderer/draw.cc src/HTMLRenderer/general.cc @@ -234,8 +234,10 @@ file (GLOB datafiles share/base.css share/fancy.css share/jquery.js - share/pdf2htmlEX.js share/manifest + share/pdf2htmlEX.js + share/pdf2htmlEX-plain-62x62.png + share/pdf2htmlEX-shadow-64x64.png ) install (FILES ${datafiles} DESTINATION share/pdf2htmlEX) install (FILES pdf2htmlEX.1 DESTINATION share/man/man1) diff --git a/logo/pdf2htmlEX-256x256.png b/logo/pdf2htmlEX-256x256.png index de5cabd..97cf4c9 100644 Binary files a/logo/pdf2htmlEX-256x256.png and b/logo/pdf2htmlEX-256x256.png differ diff --git a/logo/pdf2htmlEX-64x64.png b/logo/pdf2htmlEX-64x64.png index 43859b5..2238961 100644 Binary files a/logo/pdf2htmlEX-64x64.png and b/logo/pdf2htmlEX-64x64.png differ diff --git a/logo/pdf2htmlEX-plain-62x62.png b/logo/pdf2htmlEX-plain-62x62.png new file mode 100644 index 0000000..1406b7c Binary files /dev/null and b/logo/pdf2htmlEX-plain-62x62.png differ diff --git a/logo/pdf2htmlEX-plain.svg b/logo/pdf2htmlEX-plain.svg new file mode 100644 index 0000000..7e31a45 --- /dev/null +++ b/logo/pdf2htmlEX-plain.svg @@ -0,0 +1,38 @@ + + + + pdf2htmlEX logo plain + + + + + + + + + + + image/svg+xml + + pdf2htmlEX logo plain + + 2013-09-27 + + + Lu Wang <coolwanglu@gmail.com> + + + + + + + + + + + + + + + + diff --git a/logo/pdf2htmlEX-shadow-64x64.png b/logo/pdf2htmlEX-shadow-64x64.png new file mode 100644 index 0000000..26f28be Binary files /dev/null and b/logo/pdf2htmlEX-shadow-64x64.png differ diff --git a/logo/pdf2htmlEX-shadow.svg b/logo/pdf2htmlEX-shadow.svg new file mode 100644 index 0000000..6e5fe6a --- /dev/null +++ b/logo/pdf2htmlEX-shadow.svg @@ -0,0 +1,37 @@ + + + + pdf2htmlEX logo shadow + + + + + + + + + + image/svg+xml + + pdf2htmlEX logo shadow + + 2013-09-27 + + + Lu Wang <coolwanglu@gmail.com> + + + + + + + + + + + + + + + + diff --git a/logo/test.html b/logo/test.html new file mode 100644 index 0000000..50ab82e --- /dev/null +++ b/logo/test.html @@ -0,0 +1,42 @@ + + + +
+ + +
+ diff --git a/share/base.css.in b/share/base.css.in index 871a028..cf3bfb5 100644 --- a/share/base.css.in +++ b/share/base.css.in @@ -180,4 +180,7 @@ span { /* text blocks within a line */ -webkit-transform-origin:0% 100%; -o-transform-origin:0% 100%; } +#pdf2htmlEX-logo { + display:none; +} /* Base CSS END */ diff --git a/share/fancy.css.in b/share/fancy.css.in index 6d1be24..26dc056 100644 --- a/share/fancy.css.in +++ b/share/fancy.css.in @@ -61,5 +61,30 @@ -o-animation: fadein 100ms; animation: fadein 100ms; } + @-moz-keyframes rotate { + from { -moz-transform: rotate(0deg); } + to { -moz-transform: rotate(360deg); } + } + @-webkit-keyframes rotate { + from { -webkit-transform: rotate(0deg); } + to { -webkit-transform: rotate(360deg); } + } + #pdf2htmlEX-logo { + position:absolute; + display:block; + height:64px; + width:64px; + top:50%; + left:50%; + margin-top:-32px; + margin-left:-32px; + } + #pdf2htmlEX-logo img{ + position:absolute; + top:0; + left:0; + -moz-animation: rotate 18s linear 0s infinite; + -webkit-animation: rotate 18s linear 0 infinite; + } } /* Fancy CSS END */ diff --git a/share/manifest b/share/manifest index 8b4401d..edb8887 100644 --- a/share/manifest +++ b/share/manifest @@ -6,7 +6,7 @@ # Empty lines are ignored # # # - comment -# @ - embed or link to a file from data dir, depending on the value of --single-html +# @ - embed or link to a file from data dir, depending on the values of --embed-*** options # $ - special use for pdf2htmlEX # # Special @@ -77,6 +77,16 @@ $pages """ +# pdf2htmlEX logo for loading +""" + +""" + """ diff --git a/share/pdf2htmlEX-plain-62x62.png b/share/pdf2htmlEX-plain-62x62.png new file mode 100644 index 0000000..1406b7c Binary files /dev/null and b/share/pdf2htmlEX-plain-62x62.png differ diff --git a/share/pdf2htmlEX-shadow-64x64.png b/share/pdf2htmlEX-shadow-64x64.png new file mode 100644 index 0000000..26f28be Binary files /dev/null and b/share/pdf2htmlEX-shadow-64x64.png differ diff --git a/src/HTMLRenderer/general.cc b/src/HTMLRenderer/general.cc index 2380e4f..09d60e3 100644 --- a/src/HTMLRenderer/general.cc +++ b/src/HTMLRenderer/general.cc @@ -537,8 +537,16 @@ void HTMLRenderer::embed_file(ostream & out, const string & path, const string & ifstream fin(path, ifstream::binary); if(!fin) throw string("Cannot open file ") + path + " for embedding"; - out << entry.prefix_embed << endl - << fin.rdbuf(); + out << entry.prefix_embed; + + if(entry.base64_encode) + { + out << Base64Stream(fin); + } + else + { + out << endl << fin.rdbuf(); + } out.clear(); // out will set fail big if fin is empty out << entry.suffix_embed << endl; } diff --git a/src/util/const.cc b/src/util/const.cc index 4ce95a2..b6127f9 100644 --- a/src/util/const.cc +++ b/src/util/const.cc @@ -25,14 +25,19 @@ const map GB_ENCODED_FONT_NAME_MAP({ const std::map EMBED_STRING_MAP({ {".css", {&Param::embed_css, "", + "", false, "" }}, {".js", {&Param::embed_javascript, "", + "", false, "" }} + "\">" }}, + {".png", {&Param::embed_image, + "\"\"", true, + "\"\"" }} }); const std::map FORMAT_MIME_TYPE_MAP({ diff --git a/src/util/const.h b/src/util/const.h index 7944395..db29a5c 100644 --- a/src/util/const.h +++ b/src/util/const.h @@ -32,6 +32,7 @@ struct EmbedStringEntry // used when *embed_flag == true std::string prefix_embed; std::string suffix_embed; + bool base64_encode; // used when *embed_flag == false std::string prefix_external; std::string suffix_external;