---
title: PMSessionBeginDocumentNoDialog
framework: Application Services
role: pseudoSymbol
platforms: []
path: applicationservices/core_printing/1805538-pmsessionbegindocumentnodialog
---

# PMSessionBeginDocumentNoDialog

Begins a print job that, by default, draws into a QuickDraw graphics port, and suppresses the printing status dialog.

## Declaration

```occ
OSStatus PMSessionBeginDocumentNoDialog (
   PMPrintSession printSession,
   PMPrintSettings printSettings,
   PMPageFormat pageFormat
);
```

## Parameters

- `printSession`: The printing session that provides a context for the new print job.
- `printSettings`: The print settings to use for the new print job.
- `pageFormat`: The page format to use for the new print job.

## Return Value

A result code. See [Result Codes](../core_printing.md).

## Overview

The function `PMSessionBeginDocumentNoDialog` starts a print job and should be called within your application’s print loop. This function is similar to the function PMSessionBeginDocument except that the printing status dialog is suppressed.

You must call this function between the creation and release of a printing session. See the function [PMCreateSession](../1463247-pmcreatesession.md). If you present a printing dialog before you call `PMSessionBeginDocumentNoDialog`, when calling this function you should use the same [PMPrintSession](../pmprintsession.md) object you used to present the dialog.

Before you call `PMSessionBeginDocumentNoDialog`, you should call [PMSessionValidatePrintSettings](../1458994-pmsessionvalidateprintsettings.md) and [PMSessionValidatePageFormat](../1459090-pmsessionvalidatepageformat.md) to make sure the specified print settings and page format objects are updated and valid. After you call `PMSessionBeginDocumentNoDialog`, if you call a function that changes the specified print settings or page format object, the change is ignored for the current print job.

This function must be called before its corresponding `End` function ([PMSessionEndDocumentNoDialog](../1464527-pmsessionenddocumentnodialog.md)). If the function `PMSessionBeginDocumentNoDialog` returns `noErr`, you must call the `End` function, even if errors occur within the scope of the `Begin` and `End` functions.

The printing system automatically handles printing multiple copies. Your application does not need to perform any tasks other than specifying the number of copies in the printing session.

### Special Considerations

In macOS 10.4 and later, Apple recommends using the function [PMSessionBeginCGDocumentNoDialog](../1460101-pmsessionbegincgdocumentnodialog.md) instead of this function. QuickDraw is deprecated and your application should be using Quartz 2D for its rendering.

## See Also

### Print Loop Functions

- [PMSessionBeginCGDocumentNoDialog](../1460101-pmsessionbegincgdocumentnodialog.md)
- [PMSessionEndDocumentNoDialog](../1464527-pmsessionenddocumentnodialog.md)
- [PMSessionBeginPageNoDialog](../1463416-pmsessionbeginpagenodialog.md)
- [PMSessionEndPageNoDialog](../1462014-pmsessionendpagenodialog.md)
- [PMSessionSetIdleProc](1805540-pmsessionsetidleproc.md)
