Contents
On this page

Export FAQs as PDF - Plugixa FAQ

GET /plugixa-faq/v1/faqs/export-pdf

Render published FAQs into a PDF document, returned inside the response.

Any signed-in user with the plugixa_faq_manage capability or WordPress’s edit_posts (Contributors and up, by default). Needs Plugixa FAQ Pro: the free build does not register this route, so it answers 404 there.

Note. Only published FAQs go into the PDF, but every visibility does: private and password FAQs are included.

Request

GET https://your-site.example/wp-json/plugixa-faq/v1/faqs/export-pdf?category_id=3&title=Shipping FAQ&paper_size=letter

Query parameters

Name Type Default Description
ids string Comma-separated FAQ ids.
category_id integer Only FAQs in this category.
title string Site name + - FAQ Title printed in the document and used for the file name.
paper_size string a4 a4, letter or legal.
orientation string portrait portrait or landscape.

Responses

200 OK. data.content is the PDF, Base64-encoded.

{
  "success": true,
  "message": "",
  "data": {
    "content": "JVBERi0xLjcKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZw==",
    "filename": "Shipping-FAQ-2026-11-12.pdf",
    "mime": "application/pdf"
  }
}
Field Type Meaning
data.content string The PDF, Base64-encoded
data.filename string The title made file-safe, plus today’s UTC date
data.mime string Always application/pdf

Errors

Status Code When
500 rest_error “PDF generation failed: …” with the reason.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-faq/v1/faqs/export-pdf?category_id=3&title=Shipping FAQ&paper_size=letter" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
    'category_id' => '3',
    'title'       => 'Shipping FAQ',
    'paper_size'  => 'letter',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-faq/v1/faqs/export-pdf?' . $query);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const query = new URLSearchParams({ category_id: '3', title: 'Shipping FAQ', paper_size: 'letter' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-faq/v1/faqs/export-pdf?${query}`, {
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data } = await response.json();

Quick Links

Share