PDF Web SDK Documentation

Comprehensive Guide for Developers: UI & SDK Integration, Configuration, and API Reference

PDF Web SDK
    Preparing search index...

    Interface INetExplorerConfig

    NetExplorer integration configuration.

    When supplied, the viewer shows a "NetExplorer" card on the empty ("home") screen with a Connect action. The library performs the OAuth flow itself (authorization code + PKCE) using the integrator-provided client id, then lists the user's folders and files through the NetExplorer REST API (https://api.netexplorer.fr/v3/) and can save documents back.

    Unlike the public drives, NetExplorer is one deployment per customer, so INetExplorerConfig.domain is required: both the OAuth endpoints and the API live on that platform host. The integrator registers an OAuth application in the platform's administration and adds INetExplorerConfig.redirectUri to its allowed redirect URIs.

    interface INetExplorerConfig {
        apiUrl?: string;
        clientId: string;
        clientSecret?: string;
        domain: string;
        isSaveAllowed?: AllowSaveGuard;
        redirectUri?: string;
        scopes?: string[];
    }
    Index

    Properties

    apiUrl?: string

    REST API base URL, when it is not https://<domain>/api — a platform reached through a separate API host or a reverse proxy. Most integrators omit this.

    clientId: string

    OAuth client id of the application registered on the NetExplorer platform. Required.

    clientSecret?: string

    Client secret for the token endpoint, needed only when the platform's OAuth application is registered as confidential and rejects the PKCE-only exchange the connector sends by default — a platform that answers the code exchange complaining that the request carries no Authorization header is asking for this. It is sent as HTTP Basic credentials (client_id:client_secret), the client authentication OAuth 2 servers are required to support.

    A browser page cannot keep a secret: whatever is passed here ships to every end user, who can read it out of the bundle. Register a public (PKCE) application and omit this wherever the platform allows it; if you must set it, treat the client as compromised and rely on the redirect-URI allowlist.

    domain: string

    The customer's NetExplorer platform host — 'anatole.netexplorer.pro', or the full 'https://anatole.netexplorer.pro'. Required.

    Everything else is derived from it: the authorize (/oauth2/authorize) and token (/oauth2/token) endpoints, and the REST API base (/api, overridable via apiUrl).

    The platform must allowlist the app's origin under its CORS exceptions, once per served origin (http://localhost:5173 for local development, https://your-app.example.com in production). Every API call carries an Authorization header, so the browser preflights it with OPTIONS, and a platform that does not know the origin rejects that preflight — the listing then fails before it is sent. apiUrl is the alternative: point it at a proxy of your own that adds the CORS headers.

    isSaveAllowed?: AllowSaveGuard

    Optional guard for saving into NetExplorer. The upload itself is performed by the library; this only decides whether a given document may be written to a given target. Omit it to allow every save. See AllowSaveGuard.

    redirectUri?: string

    OAuth redirect URI registered on the NetExplorer application.

    Defaults to the redirect page shipped with the package: <origin>/pwv-netexplorer/redirect.html (serve the package's public/ folder at your web root and register that exact URL — the match is exact, path included). Most web integrators should omit this.

    Override it only for a non-root asset path, or for desktop shells: a cross-origin loopback URI (e.g. http://127.0.0.1:<port>/netexplorer-callback) switches the connector into the external system-browser flow, where the host relays the callback URL through a pwv-netexplorer-callback window event.

    scopes?: string[]

    Scopes requested at connect time. Defaults to ['all'] — the platform's catch-all grant, which is what its OAuth applications are normally issued. Set [] to omit the scope parameter entirely and take whatever the application registration implies.