Exemplo n.º 1
0
static void drawoutline(xps_context *ctx)
{
	fz_outline *outline = xps_load_outline(ctx);
	if (showoutline > 1)
		fz_debug_outline_xml(outline, 0);
	else
		fz_debug_outline(outline, 0);
	fz_free_outline(outline);
}
Exemplo n.º 2
0
void
fz_debug_outline_xml(fz_context *ctx, fz_outline *outline, int level)
{
	while (outline)
	{
		printf("<outline title=\"%s\" page=\"%d\"", outline->title, outline->dest.kind == FZ_LINK_GOTO ? outline->dest.ld.gotor.page + 1 : 0);
		if (outline->down)
		{
			printf(">\n");
			fz_debug_outline_xml(ctx, outline->down, level + 1);
			printf("</outline>\n");
		}
		else
		{
			printf(" />\n");
		}
		outline = outline->next;
	}
}