#include "ev-document-fonts.h"
#include "ev-selection.h"
#include "ev-async-renderer.h"
-#include "ev-file-exporter.h"
-#include "ev-window.h"
#include <glib/gstdio.h>
#include <unistd.h>
ev_job_render_page_ready (EvJobRender *job)
{
job->page_ready = TRUE;
- g_idle_add ((GSourceFunc)notify_page_ready, job);
+ g_idle_add_full (G_PRIORITY_HIGH_IDLE,
+ (GSourceFunc)notify_page_ready,
+ g_object_ref (job),
+ (GDestroyNotify)g_object_unref);
}
void
const gchar *format,
gdouble width,
gdouble height,
+ EvFileExporterOrientation orientation,
EvPrintRange *ranges,
gint n_ranges,
EvPrintPageSet page_set,
job->width = width;
job->height = height;
+ job->orientation = orientation;
job->ranges = ranges;
job->n_ranges = n_ranges;
fc.last_page = MAX (first_page, last_page);
fc.paper_width = job->width;
fc.paper_height = job->height;
+ fc.orientation = job->orientation;
fc.duplex = FALSE;
- fc.pages_per_sheet = job->pages_per_sheet;
+ fc.pages_per_sheet = MAX (1, job->pages_per_sheet);
ev_document_doc_mutex_lock ();
ev_file_exporter_begin (EV_FILE_EXPORTER (document), &fc);