- legacy_conversion_pdflatex(latex_file, failed_pages, legacy_metrics,
- use_pdftocairo, conv, gs_device, gs_ext, alpha, resolution,
- output_format)
+ warning("Now trying to obtain failed previews through pdflatex")
+ error_count = legacy_conversion_pdflatex(latex_file, failed_pages,
+ legacy_metrics, use_pdftocairo, conv, gs_device, gs_ext, alpha,
+ resolution, output_format)
+ else:
+ error_count = 0
+
+ # Invalidate metrics for pages that produced errors
+ if len(error_pages) > 0:
+ for index in error_pages:
+ if index not in failed_pages:
+ legacy_metrics.pop(index - 1)
+ legacy_metrics.insert(index - 1, (index, -1.0))
+ error_count += 1