Frequently Asked Questions

Common questions and answers about MIMS SDK integration and usage.

General

What is MIMS SDK?

MIMS SDK is a React library that provides components and hooks for document management, PDF viewing, form filling, and digital signatures. It connects to the MIMS API to handle document processing, storage, and submission.

What frameworks are supported?

MIMS SDK works with any React 18+ application, including:

  • Next.js (App Router and Pages Router)
  • Remix
  • Vite
  • Create React App
  • Gatsby

Is TypeScript required?

No, TypeScript is not required. However, the SDK includes full TypeScript definitions and is recommended for the best development experience.

API Keys

What's the difference between publishable and secret keys?

Publishable keys (pk_) are safe for client-side use. They can only perform SDK operations like loading documents and submitting forms.

Secret keys (sk_) have full API access and should only be used in server-side code. Never expose them in the browser.

Can I use test keys in production?

No. Test keys (pk_test_, sk_test_) only work in the sandbox environment and cannot access production data.

How do I rotate my API keys?

You can rotate keys from your MIMS dashboard under Settings → API Keys. When you rotate a key, the old key is immediately revoked. Make sure to update your environment variables before rotating.

Components

Can I use PDFViewer without MIMSProvider?

No. All SDK components require the MIMSProvider context to function. The provider handles authentication and API communication.

How do I customize the PDFViewer appearance?

You can customize the viewer using CSS classes and the style prop:

<PDFViewer
  className="my-custom-viewer"
  style={{ borderRadius: '8px' }}
  ...
/>

The component uses BEM-style class names like .mims-pdf-viewer,.mims-pdf-toolbar, etc. that you can target in CSS.

Can I use SignaturePad standalone without PDF?

Yes! The SignaturePad component can be used independently for capturing signatures in any context:

<SignaturePad
  onComplete={(data) => {
    // Use data.imageData (base64 PNG)
    uploadSignature(data.imageData);
  }}
/>

Document Handling

What PDF features are supported?

The PDFViewer supports:

  • Multi-page documents
  • Zoom and pan
  • Text selection (read-only mode)
  • Form fields (text, signature, checkbox, date, initials)
  • Page navigation

What's the maximum PDF file size?

The default maximum is 50MB per document. Enterprise plans can increase this limit. Large documents may take longer to load initially.

Are submitted documents legally binding?

MIMS captures comprehensive audit trails including timestamps, IP addresses, and user consent. However, legal validity depends on your jurisdiction and use case. Consult with legal counsel for specific requirements.

Performance

How can I improve PDF loading performance?

Several strategies can help:

  • Use CDN-hosted URLs for PDF files
  • Compress PDFs before upload
  • Use lazy loading for documents not immediately visible
  • Consider breaking large documents into smaller parts

Does the SDK support lazy loading?

Yes. The PDF rendering library is lazy-loaded, so it only adds to your bundle when the PDFViewer component is actually rendered.

Security

Is data encrypted?

Yes. All data is encrypted in transit using TLS 1.3 and at rest using AES-256 encryption. Documents are stored in isolated, per-organization buckets.

Can I self-host the SDK backend?

Enterprise customers can deploy MIMS on-premises or in their own cloud environment. Contact sales for more information.

How is user data handled?

MIMS is GDPR and HIPAA compliant. User data is only used for providing the service and is never sold or shared. See our Privacy Policy for details.

Troubleshooting

I'm getting "API key is required" error

Ensure you've passed a valid API key to MIMSProvider. Check that your environment variable is correctly set and accessible.

// Check if env var is loaded
console.log('API Key:', process.env.NEXT_PUBLIC_MIMS_API_KEY);

// Common causes:
// - Missing .env.local file
// - Wrong variable name (must start with NEXT_PUBLIC_ for Next.js)
// - Server restart needed after adding env vars

PDF won't load

Common causes:

  • CORS issues - ensure PDF URL allows cross-origin requests
  • Invalid URL - check the URL is accessible
  • Network issues - check browser console for errors
  • Corrupted PDF - try opening in a desktop PDF viewer

Submission fails silently

Always provide an onSubmitError callback to catch errors:

<PDFViewer
  onSubmitError={(error) => {
    console.error('Submission error:', error);
    alert(error.message);
  }}
  ...
/>

Still Have Questions?