@@ -2216,53 +2216,14 @@ static int JM_rects_overlap(const fz_rect a, const fz_rect b)
2216
2216
2217
2217
//
2218
2218
void JM_append_rune (fz_buffer *buff, int ch);
2219
- void ll_JM_print_stext_page_as_text (fz_buffer *res, fz_stext_page *page)
2220
- {
2221
- fz_stext_block *block;
2222
- fz_stext_line *line;
2223
- fz_stext_char *ch;
2224
- fz_rect rect = page->mediabox ;
2225
- fz_rect chbbox;
2226
- int last_char = 0 ;
2227
-
2228
2219
2229
- for (block = page->first_block ; block; block = block->next )
2230
- {
2231
- if (block->type == FZ_STEXT_BLOCK_TEXT)
2232
- {
2233
- for (line = block->u .t .first_line ; line; line = line->next )
2234
- {
2235
- last_char = 0 ;
2236
- for (ch = line->first_char ; ch; ch = ch->next )
2237
- {
2238
- chbbox = JM_char_bbox (line, ch);
2239
- if (mupdf::ll_fz_is_infinite_rect (rect) ||
2240
- JM_rects_overlap (rect, chbbox))
2241
- {
2242
- last_char = ch->c ;
2243
- JM_append_rune (res, last_char);
2244
- }
2245
- }
2246
- if (last_char != 10 && last_char > 0 )
2247
- {
2248
- mupdf::ll_fz_append_string (res, " \n " );
2249
- }
2250
- }
2251
- }
2252
- }
2253
- }
2254
2220
// -----------------------------------------------------------------------------
2255
2221
// Plain text output. An identical copy of fz_print_stext_page_as_text,
2256
2222
// but lines within a block are concatenated by space instead a new-line
2257
2223
// character (which else leads to 2 new-lines).
2258
2224
// -----------------------------------------------------------------------------
2259
2225
void JM_print_stext_page_as_text (mupdf::FzBuffer& res, mupdf::FzStextPage& page)
2260
2226
{
2261
- if (0 )
2262
- {
2263
- return ll_JM_print_stext_page_as_text (res.m_internal , page.m_internal );
2264
- }
2265
-
2266
2227
fz_rect rect = page.m_internal ->mediabox ;
2267
2228
2268
2229
for (auto block: page)
0 commit comments