comparison Sphinx/source/users/advanced-rest.rst @ 907:7ccecfb76428

create pdf with python
author Alain Mazy <am@osimis.io>
date Mon, 09 Jan 2023 11:07:38 +0100
parents 6057a8beee07
children 6474e299918b
comparison
equal deleted inserted replaced
906:6057a8beee07 907:7ccecfb76428
277 $reply = Invoke-RestMethod http://localhost:8042/tools/create-dicom -Method POST -Body ($params|ConvertTo-Json) -ContentType 'application/json' 277 $reply = Invoke-RestMethod http://localhost:8042/tools/create-dicom -Method POST -Body ($params|ConvertTo-Json) -ContentType 'application/json'
278 278
279 # display the result 279 # display the result
280 Write-Host "The instance can be retrieved in PDF at http://localhost:8042$($reply.Path)/pdf" 280 Write-Host "The instance can be retrieved in PDF at http://localhost:8042$($reply.Path)/pdf"
281 281
282 And here's another sample `using python
283 <https://bitbucket.org/osimis/orthanc-setup-samples/src/master/python-samples/attach-pdf-to-study.py>`__.
284
282 Please note that the ``/tools/create-dicom`` API call will return the 285 Please note that the ``/tools/create-dicom`` API call will return the
283 Orthanc instance ID of the newly created DICOM resource. 286 Orthanc instance ID of the newly created DICOM resource.
284 287
285 You can use the ``/instances/.../pdf`` URI to retrieve an embedded PDF 288 You can use the ``/instances/.../pdf`` URI to retrieve an embedded PDF
286 file. 289 file.