I'm trying to plot lat/lon points on a pdf document (specifically earthquake epicentres on a geology map). I have georeferenced the pdf bounds.
On one hand I have working code that uses the
PDFium library to load the pdf into a
HugeImageView, and the
HugeImageView1_Updated event allows me to draw a point (epicentre) in an ImageView overlay which is correctly positioned over the pdf. The problem is the very long time required to create the HugeImageView initial bitmap, which is necessary for high pdf resolution.
On the other hand, the same pdf loads much faster, with high resolution, using the PDFview from the PDFium library, and pan and zoom gestures are built-in. The faster load makes this a preferred option.
However, among the many functions and properties available in the PDFium library I just cannot work out how to return the pdf page coordinates (in points or inches) of the visible part of the pdf after a pan or zoom. Has anyone any suggestions?
(PS Google/Gemini refers to a PDFview2 object and its ClientToPage( clientRect ) function but I can't find anything about it in the B4X PDFium library...)
Update clue: there is an otherwise undocumented event listed for the Configurator - Private Sub EventName_onLayerDrawn(cnvs As Canvas, arg1 As Float, arg2 As Float, arg3 As Int) which Google AI says has the information I want. However I get the error "java.lang.Exception: Sub pdfium_onlayerdrawn signature does not match expected signature." Now the problem is to find the correct signature...