void paint(juce::Graphics& g) override
{
if (pdfDocument != nullptr){
CGContextRef context = juce::Graphics::getInternalContext(g).getCGContext();
// the error is
// Call to non-static member function without an object argument
// I also tried
CGContextRef context = g.getInternalContext().getCGContext();
// the error is
// No member named 'getCGContext' in 'juce::LowLevelGraphicsContext'
}
It would be cool if there were a cross-platform way to view PDF’s… would help immensely with getting the Plugin documentation in front of the users eyeballs.
Although I suppose a WebView would suffice … I guess the way to do this in a cross-platform manner would be to see how much of a PDF the WebView can render …
The use case in my scenario is seeing the music score. I will have a look at WebView. If you find anything related to Core Graphics on iOS, I’d appreciate it
Create an Objective-C class that extends UIView in a .mm file. Inside its drawRect method you can obtain the CGContext and then call drawPDFPage. Stick this UIView inside of a JUCE UIViewComponent and add that to your UI.