mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 04:48:36 +00:00
wineps.drv: Add partial support for changing page size.
This commit is contained in:
parent
4047fb78a8
commit
71300e2385
|
@ -3110,6 +3110,8 @@ BOOL WINAPI PrintDocumentOnPrintProcessor(HANDLE pp, WCHAR *doc_name)
|
|||
|
||||
if (ret)
|
||||
ret = PSDRV_ResetDC(data->ctx, devmode);
|
||||
if (ret && devmode && (devmode->dmFields & DM_PAPERSIZE))
|
||||
ret = PSDRV_WritePageSize(data->ctx);
|
||||
free(devmode);
|
||||
if (!ret)
|
||||
goto cleanup;
|
||||
|
|
|
@ -397,6 +397,17 @@ static void write_cups_job_ticket( print_ctx *ctx, const struct ticket_info *inf
|
|||
write_spool( ctx, cups_ap_d_inputslot, sizeof(cups_ap_d_inputslot) - 1 );
|
||||
}
|
||||
|
||||
INT PSDRV_WritePageSize( print_ctx *ctx )
|
||||
{
|
||||
PAGESIZE *page = find_pagesize( ctx->pi->ppd, &ctx->Devmode->dmPublic );
|
||||
|
||||
if (page && page->InvocationString)
|
||||
PSDRV_WriteFeature( ctx, "*PageSize", page->Name, page->InvocationString );
|
||||
else
|
||||
WARN("Page size not set\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
INT PSDRV_WriteHeader( print_ctx *ctx, LPCWSTR title )
|
||||
{
|
||||
char *buf, *escaped_title;
|
||||
|
@ -444,8 +455,7 @@ INT PSDRV_WriteHeader( print_ctx *ctx, LPCWSTR title )
|
|||
if (slot && slot->InvocationString)
|
||||
PSDRV_WriteFeature( ctx, "*InputSlot", slot->Name, slot->InvocationString );
|
||||
|
||||
if (page && page->InvocationString)
|
||||
PSDRV_WriteFeature( ctx, "*PageSize", page->Name, page->InvocationString );
|
||||
PSDRV_WritePageSize( ctx );
|
||||
|
||||
if (duplex && duplex->InvocationString)
|
||||
PSDRV_WriteFeature( ctx, "*Duplex", duplex->Name, duplex->InvocationString );
|
||||
|
|
|
@ -466,6 +466,7 @@ extern char PSDRV_UnicodeToANSI(int u);
|
|||
|
||||
extern INT PSDRV_WriteHeader( print_ctx *ctx, LPCWSTR title );
|
||||
extern INT PSDRV_WriteFooter( print_ctx *ctx );
|
||||
extern INT PSDRV_WritePageSize( print_ctx *ctx );
|
||||
extern INT PSDRV_WriteNewPage( print_ctx *ctx );
|
||||
extern INT PSDRV_WriteEndPage( print_ctx *ctx );
|
||||
extern BOOL PSDRV_WriteMoveTo(print_ctx *ctx, INT x, INT y);
|
||||
|
|
Loading…
Reference in a new issue