Ejemplo n.º 1
0
void
display(const GURL &url)
{
   DjVuDumpHelper helper;
   GP<ByteStream> ibs = ByteStream::create(url, "rb");
   GP<ByteStream> obs = helper.dump(ibs);
   GUTF8String str;
   size_t size = obs->size();
   char *buf = str.getbuf(obs->size());
   obs->seek(0);
   obs->readall(buf, size);
   GNativeString ns = str;
   fputs((const char*)ns, outputf);
}
Ejemplo n.º 2
0
void 
lt_XMLParser::Impl::ChangeTextOCR(
  const GUTF8String &value,
  const int width,
  const int height,
  const GP<DjVuFile> &dfile)
{
  if(value.length() && value.downcase() != "false")
  {
    const GP<ByteStream> bs=OCRcallback(value,DjVuImage::create(dfile));
    if( bs && bs->size() )
    {
      const GP<lt_XMLTags> tags(lt_XMLTags::create(bs));
      ChangeText(width,height,*dfile,*tags);
    }
  }
}