When I export "PTFreeHandHighlightCreate" strokes cover the pdf

Hi there,
After exporting a pdf, PTFreeHandHighlightCreate’s strokes is covering the pdf page content behind. After importing to my app it is working fine but the problem is showing on apple’s viewer

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


Hi @ogito,

Unfortunately this appears to be an issue with the way that Apple’s viewer displays annotations which are rendered using a ‘multiply’ blend mode. Do you see the issue when opening the document in any other viewers?

One possible workaround would be to iterate over all the annotations in the document and set the annotation’s opacity to e.g. 50% if it is a freehand highlight annotation. You could do this using the SetOpacity API on the PTMarkup. This could be done before sharing the document. We have sample code for iterating over annotations in a document here:

Alternatively (or alongside the above solution) you could modify the opacity each time a freehand highlight annotation is added by responding to the PTToolManagerDelegate methods for annotation events: https://www.pdftron.com/documentation/ios/guides/tools/tool-manager-events/

e.g. in the annotation added callback you would set the opacity of the newly-created annotation.

If you are using a PTDocumentController then you would need to subclass the controller to implement the PTToolManagerDelegate methods.

Please let us know if that is helpful or if you need further guidance on this.