HOOPS Publish 2023 U1

PDF Web export to JSON

In addition to the support of exporting PDF to XML, we now provide JSON export.

This support comes with two new fields in A3DRWParamsExportHtmlData:

Migration Guide

The change of the export flag from a parameter to a field structure is code compatibility breaking. To migrate from the previous to the new syntax, move the last parameter of any call to A3DPDFDocumentExportToWebFormat() and A3DConvertPDFToWebFormat() in A3DRWParamsExportHtmlData::m_i3dOutputFormat.

Before HP 2023 U1
A3DRWParamsExportHtmlData paramsExportData;
A3D_INITIALIZE_DATA(A3DRWParamsExportHtmlData, paramsExportData);

A3DStatus status = A3DConvertPDFToWebFormat(pcFileName, &paramsExportData, pcOutputDirectory, pcOutputName, kA3DWebOutFormatHtml);
HP 2023 U1
A3DRWParamsExportHtmlData paramsExportData;
A3D_INITIALIZE_DATA(A3DRWParamsExportHtmlData, paramsExportData);

// Configure paramsExportData...
paramsExportData.m_i3dOutputFormat = kA3DWebOutFormatHtml;

A3DStatus status = A3DConvertPDFToWebFormat(pcFileName, &paramsExportData, pcOutputDirectory, pcOutputName);

See Also

URL Query String Changes

New Query String Parameter

Following the addition of JSON export, a new query string parameter is available, format=, which can be either json or xml.

When the export contains both JSON and XML, the format= parameter allows you to specify which one to load. If the parameter is missing, the web viewer tries to load the XML export first, then the JSON.

Query String Parameter Change

In the context of a client/server environment, we changed the way we load the exported files. Instead of using sample= in the url query, you should now use file=:

localhost:11180/viewer.html?file=sample_DemoDataModel&format=json

See also

Fixed Bugs

The list of fixed bugs can be found on the fixed bugs page.