Commit a5eb4f6f authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

wineps: Initialize PSDRV_PDEVICE print job information in PrintDocumentOnPrintProcessor.

parent e879b9db
......@@ -285,7 +285,8 @@ BOOL WINAPI PrintDocumentOnPrintProcessor(HANDLE pp, WCHAR *doc_name)
info.pDocName = data->doc_name;
info.pOutputFile = data->out_file;
info.pDatatype = (WCHAR *)L"RAW";
if (!StartDocPrinterW(data->hport, 1, (BYTE *)&info))
data->pdev->job.id = StartDocPrinterW(data->hport, 1, (BYTE *)&info);
if (!data->pdev->job.id)
{
ClosePrinter(spool_data);
return FALSE;
......@@ -310,6 +311,14 @@ BOOL WINAPI PrintDocumentOnPrintProcessor(HANDLE pp, WCHAR *doc_name)
if (!(ret = SeekPrinter(spool_data, pos, NULL, FILE_BEGIN, FALSE)))
goto cleanup;
data->pdev->job.hprinter = data->hport;
data->pdev->job.banding = FALSE;
data->pdev->job.OutOfPage = TRUE;
data->pdev->job.PageNo = 0;
data->pdev->job.quiet = FALSE;
data->pdev->job.passthrough_state = passthrough_none;
data->pdev->job.doc_name = strdupW(data->doc_name);
while (1)
{
if (!(ret = ReadPrinter(spool_data, &record, sizeof(record), &r)))
......@@ -366,6 +375,7 @@ BOOL WINAPI PrintDocumentOnPrintProcessor(HANDLE pp, WCHAR *doc_name)
}
cleanup:
HeapFree(GetProcessHeap(), 0, data->pdev->job.doc_name);
ClosePrinter(spool_data);
return EndDocPrinter(data->hport) && ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment