Customize PDF rendering on iOS
Various rendering options control how a document renders and appears onscreen. Take a look at all the different RenderOptions you can customize. To apply custom rendering options to your document, you can use the updateRenderOptions(for:with:) method on Document.
For onscreen display customization, update the .page render options. If the document is already displayed in a PDFViewController, call reloadData() on the view controller after updating render options.
Customizing the appearance of forms
To customize the appearance of form elements — for example, to style them in a different color — set interactiveFormFillColor on the render options object.
To remove Nutrient’s default interactive form fill overlay and use the form appearance specified in the PDF, set interactiveFormFillColor to .clear:
document.updateRenderOptions(for: .page) { $0.interactiveFormFillColor = .clear}pdfViewController.reloadData()[document updateRenderOptionsForType:PSPDFRenderTypePage withBlock:^(PSPDFRenderOptions * _Nonnull options) { options.interactiveFormFillColor = UIColor.clearColor;}];[pdfViewController reloadData];Setting interactiveFormFillColor to .clear doesn’t guarantee form elements will be invisible. If the PDF defines visible form backgrounds, borders, or appearances, those can still render.
Controlling print-oriented color rendering
By default, Nutrient iOS SDK simulates PDF overprint settings for content that requests overprint preview. This matches Adobe Acrobat’s automatic overprint preview behavior and improves fidelity for print-oriented documents that use spot colors, CMYK transparency, or overprint settings.
If your app needs the previous behavior without overprint simulation, set overprintPreview to .disabled before the document is first rendered, when possible. You can also set blackRendering to .pureBlack if you want 100K CMYK black to render as true black. Otherwise, it renders as the color-managed dark tone that matches Acrobat. If the document is already displayed, reload the view controller after updating render options:
document.updateRenderOptions(for: .page) { $0.overprintPreview = .disabled $0.blackRendering = .pureBlack}pdfViewController.reloadData()