feat(reader): add PDF annotations, Range streaming, and optimized chunk loading (#2701)

This commit is contained in:
ACX
2026-02-11 16:51:59 -07:00
committed by GitHub
parent 16de2d006f
commit 9ed6a3fe72
31 changed files with 450 additions and 749 deletions
@@ -0,0 +1,25 @@
import {Injectable, inject} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Observable} from 'rxjs';
import {API_CONFIG} from '../../core/config/api-config';
@Injectable({
providedIn: 'root'
})
export class PdfAnnotationService {
private readonly url = `${API_CONFIG.BASE_URL}/api/v1/pdf-annotations`;
private readonly http = inject(HttpClient);
getAnnotations(bookId: number): Observable<{ data: string }> {
return this.http.get<{ data: string }>(`${this.url}/book/${bookId}`);
}
saveAnnotations(bookId: number, data: string): Observable<void> {
return this.http.put<void>(`${this.url}/book/${bookId}`, {data});
}
deleteAnnotations(bookId: number): Observable<void> {
return this.http.delete<void>(`${this.url}/book/${bookId}`);
}
}