mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
don't write double in scientific notation
This commit is contained in:
parent
62d29db121
commit
e9f48e7480
@ -102,29 +102,22 @@ void HTMLRenderer::export_transform_matrix (long long tm_id, const double * tm)
|
|||||||
// we have already shifted the origin
|
// we have already shifted the origin
|
||||||
|
|
||||||
// TODO: recognize common matices
|
// TODO: recognize common matices
|
||||||
if(_tm_equal(tm, id_matrix, 4))
|
for(const string & prefix : {"", "-ms-", "-moz-", "-webkit-", "-o-"})
|
||||||
{
|
{
|
||||||
// no need to output anything
|
// PDF use a different coordinate system from Web
|
||||||
}
|
allcss_fout << prefix << "transform:matrix("
|
||||||
else
|
<< tm[0] << ','
|
||||||
{
|
<< -tm[1] << ','
|
||||||
for(const string & prefix : {"", "-ms-", "-moz-", "-webkit-", "-o-"})
|
<< -tm[2] << ','
|
||||||
{
|
<< tm[3] << ',';
|
||||||
// PDF use a different coordinate system from Web
|
|
||||||
allcss_fout << prefix << "transform:matrix("
|
|
||||||
<< tm[0] << ','
|
|
||||||
<< -tm[1] << ','
|
|
||||||
<< -tm[2] << ','
|
|
||||||
<< tm[3] << ',';
|
|
||||||
|
|
||||||
allcss_fout << "0,0);";
|
allcss_fout << "0,0);";
|
||||||
/*
|
/*
|
||||||
if(prefix == "-moz-")
|
if(prefix == "-moz-")
|
||||||
allcss_fout << format("%1%px,%2%px);") % tm[4] % -tm[5];
|
allcss_fout << format("%1%px,%2%px);") % tm[4] % -tm[5];
|
||||||
else
|
else
|
||||||
allcss_fout << format("%1%,%2%);") % tm[4] % -tm[5];
|
allcss_fout << format("%1%,%2%);") % tm[4] % -tm[5];
|
||||||
*/
|
*/
|
||||||
}
|
|
||||||
}
|
}
|
||||||
allcss_fout << "}" << endl;
|
allcss_fout << "}" << endl;
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "namespace.h"
|
#include "namespace.h"
|
||||||
|
|
||||||
|
using std::fixed;
|
||||||
using std::flush;
|
using std::flush;
|
||||||
using boost::filesystem::remove;
|
using boost::filesystem::remove;
|
||||||
using boost::filesystem::filesystem_error;
|
using boost::filesystem::filesystem_error;
|
||||||
@ -105,6 +106,9 @@ void HTMLRenderer::pre_process()
|
|||||||
html_fout << ifstream(PDF2HTMLEX_DATA_PATH / NECK_HTML_FILENAME, ifstream::binary).rdbuf();
|
html_fout << ifstream(PDF2HTMLEX_DATA_PATH / NECK_HTML_FILENAME, ifstream::binary).rdbuf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html_fout << fixed;
|
||||||
|
allcss_fout << fixed;
|
||||||
|
|
||||||
allcss_fout << ifstream(PDF2HTMLEX_DATA_PATH / CSS_FILENAME, ifstream::binary).rdbuf();
|
allcss_fout << ifstream(PDF2HTMLEX_DATA_PATH / CSS_FILENAME, ifstream::binary).rdbuf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user