Hello Apryse Support Team,
We hope this message finds you well. We’re reaching out for assistance with accessing certain properties in WebViewer and would greatly appreciate your guidance.
Environment
- WebViewer Version: 11.7.1
- Framework: Angular
- Issue Type: API Request
Problem Description
We are currently accessing internal/private properties of WebViewer objects directly, which unfortunately causes our code to break between releases as these internal property names change. We understand this is not the recommended approach and would be grateful if you could help us identify the proper public API methods to access these properties reliably.
Required Public APIs
We would be extremely grateful if you could point us to the appropriate public getter/setter methods for the following properties:
1. Field Manager - Array Property (Currently Jg)
const fields = fieldManager.getFields() as Core.Annotations.Forms.Field[];
fields.forEach((field) => {
let field2: any = field;
field2.Jg = []; // We need to empty this array
});
What we’re looking for: A public setter method to clear/set this array property, if available.
2. Annotation ReadOnly Property (Currently Jsa.ReadOnly)
const annotation: Core.Annotations.Annotation = annotations[i];
const annotation2: any = annotation;
if (annotation2?.ReadOnly == true || annotation2.Jsa.ReadOnly) {
// logic here
}
What we’re looking for: A public getter method to access the ReadOnly property from the Jsa object.
3. Widget Annotation Initial Value (Currently ie)
if (annotation instanceof this.instance!.Core.Annotations.WidgetAnnotation) {
const annotation2: any = annotation;
data = {
initialValue: annotation2.ie,
// other properties
};
}
What we’re looking for: A public getter method to access the initial value property.
4. Annotation ID Properties (Currently yCa and Uk)
let annotations = this.instance!.Core.annotationManager.getAnnotationsList();
for (let i = 0; i < annotations.length; i++) {
const annotation = annotations[i];
const annotation2: any = annotation;
if (annotationId && (annotation2.yCa == annotationId || annotation2.Uk == annotationId)) {
return annotation;
}
}
What we’re looking for: Public getter methods for these ID properties.
5. Widget ID Properties (Currently Nl and Bn)
if (widgetId && (annotation2.Nl == widgetId || annotation2.Bn == widgetId)) {
return annotation;
}
What we’re looking for: Public getter methods for these widget ID properties.
6. Annotation Page Number (Currently jO)
getAnnotationPageNumber(annotation: Core.Annotations.Annotation): number {
const annot2: any = annotation;
return +annot2.jO;
}
What we’re looking for: A public getter method to get the page number of an annotation.
Additional Question
We were wondering if there might be a comprehensive documentation page that maps all object attributes to their corresponding public API methods? This would be incredibly helpful for us to avoid accessing internal properties in the future and ensure our code remains stable across WebViewer updates.
What Would Help Us
- Public API methods/properties for all the above use cases
- Documentation reference for object attribute mapping (if available)
- Any guidance on best practices for these scenarios
Thank you so much for your support!
Best regards,
William