Create web api for PDF Service

Posted by: andrew on 22 October 2018, 3:57 pm EST

    • Post Options:
    • Link

    Posted 22 October 2018, 3:57 pm EST

    I’m following the configure PDF web api service page to setup a HTTP services (http://helpcentral.componentone.com/nethelp/C1WebAPI/ConfigurePDF.html). I can access the page http://localhost:{my testing port}/default.html. But failed to access the page with http://localhost:{my testing port}/api/pdf/. It returns the message page not find. Would you mind to help me how can I trace this issue?

  • Posted 23 October 2018, 5:59 pm EST

    Hi Andrew,

    We are sorry for the inconvenience because of delayresponse.

    Please test your application with following URL:

    http://{host}/api/pdf/PdfRoot/{PDF File Name}/$pdf
    

    Please let us know if you are still getting the error.

    ~Manish

  • Posted 24 October 2018, 12:31 am EST

    I have tested the path which you mentioned. The result also is page not find. I have added PdfRoot{pdf file name} to the web api application.

  • Posted 24 October 2018, 7:32 pm EST

    HI Andrew,

    Please find the attached application and execute it. Go to the url:

    http://{host}/api/pdf/PdfRoot/DefaultDocument.pdf/$pdf
    

    If the issue persists, pleaese let us know.

    Also, share which build version you are using for your project.

    The Operatinf system

    The Browser

    ~Manish

    PDFAPI.zip

  • Posted 24 October 2018, 8:34 pm EST

    After execute your given project. It tries to download the file “$pdf” but failed when I click save the file.

    My testing environment as following:

    C1: v4.0.20182.139

    .NETFX: .net framework 4.6.1

    OS: Windows 8.1 Enterprise 64-bit

    Browser: IE 11 (11.0.9600.19155)

  • Posted 25 October 2018, 7:23 pm EST

    Hi Andrew,

    We are sorry, but could you please let us know how you are trying to download the $pdf file?

    Also, the PdfApi can be used with PdfViewer to show the Pdf Documents in the browser using the Viewer.

    Please refer to the attached application and let us know the steps to replicate the issue at our end if you are still facing the issue.

    ~Manish

    PDFApi_WijmoPdfViewer.zip

  • Posted 25 October 2018, 9:35 pm EST

    Sorry, download file is not I want to do so. I have tried your given application (PDFAPI.zip) and the URL (http://{host}/api/pdf/PdfRoot/DefaultDocument.pdf/$pdf). The response by IE as like as download file when execute in my environment.

  • Posted 28 October 2018, 3:31 pm EST - Updated 29 September 2022, 1:55 am EST

    After executed the project PDFApi_WijmoPdfViewer.zip. It shows internal server error on the PdfViewer. Please check the attached image.

  • Posted 28 October 2018, 8:53 pm EST

    Hi Andrew,

    The issue seems with Access control. Could you please try to run the attached application and go to “HTTP://{host}/api/values” and let us know if you are able to access the API.

    Also, please let us know the Visual Studio version you are using.

    ~Manish

    SimpleAPI_valuesController.zip

  • Posted 29 October 2018, 9:40 pm EST - Updated 29 September 2022, 1:55 am EST

    After execute the given project, SimpleAPI_valuesController, with the URL, HTTP://localhost/api/values, it shows as the attached image.

    No matter is using local IIS or IIS Express, I’ve got the same result.

    I’m using Visual Studio 2017 professional.

  • Posted 30 October 2018, 3:30 pm EST - Updated 29 September 2022, 1:55 am EST

    I’ve tried to use Chrome to access the path, it shows as following:

    http://{host}/api/pdf/PdfRoot/DefaultDocument.pdf/$pdf

    http://{host}/api/values

  • Posted 31 October 2018, 12:30 am EST

    Hi Andrew,

    We apologize for the delayed response on this. It’s a strange issue since the sample works fine at our end.

    We are trying to replicate the issue at our end. We will update you as we get an update.

    ~Manish

  • Posted 31 October 2018, 10:56 pm EST

    Hi Andrew,

    We are sorry, we are unable to replicate the issue at our end.

    Please do the following and share the result with us:

    1. With previously shared sample,

      Add debug point for Startup.cs file at the starting of GetFullRoot and RegisterRoutes function and run the sample steps by steps and let us know where the error is.

    2. Try to run the Api sample at your end which is installed when the C1 is installed on your machine.

      Location: “C:\Users{user}\Documents\ComponentOne Samples\Web Api”

    3. Also, please try to change Access permission for the downloaded sample.

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels