2

We are currently using the Autodesk forge viewer to display both 2D and 3D files.

We have recently had a few issues around the 2D/PDF functionality that was working prior to the latest updates.

Currently we are using viewer version 3.1.3 and any new PDF files uploaded when we attempt to open the PDF in the viewer throws a "404 Not Found" error. We have multi page PDF files uploaded prior to the updates last year that can still be opened and pages navigated successfully as expected.

When updating the viewer version to 3.3 the first page of the PDF's will load. There appears to be an issue with new uploads no longer being supported by 3.1.3.

When using version 3.3 we can no longer open other pages in the PDF viewer as there are errors thrown from within the method viewerApp.selectItem(viewables[id].data, onItemLoadSuccess, onItemLoadFail); on page change.

Stevie754
  • 124
  • 7

1 Answers1

0

Using the Basic Application tutorial at this live sample I can open the PDF on Viewer 3.3. The tutorial code loads, by default, the viewable index 0, in this case, the first page of the PDF. Then, via console, I ran the following lines of code:

// get all viewables (in case case, the pages)
var viewables = viewerApp.bubble.search({ 'type': 'geometry' }); 
viewerApp.selectItem(viewables[1].data);// move to page 2
viewerApp.selectItem(viewables[2].data);// move to page 3

The pages are loading fine, no error. If you have any error, please add it on your question. If I'm missing any step, please let me know.

EDIT

I retested this with Viewer 3.3 uploading files via UI and API to BIM 360, and uploading via API to Buckets, in all cases I can see the PDF files on Viewer without errors, as expected. As mentioned, I'm using the Basic Application sample code.

Augusto Goncalves
  • 8,493
  • 2
  • 17
  • 44
  • When switching between the 2 versions (3.1.3 and 3.3) when loading a PDF file in the viewer I can see that different parameters are being added to the endpoint. This is affecting the backwards compatibility of PDF files that we uploaded previously. Currently in order to allow these files to load we have to keep the viewer at 3.1.3 but any new files uploaded appear to be set up to handle the 3.3 endpoint values and result in a 404 not found error being returned. – Stevie754 Jan 29 '18 at 16:23