Python
import os
from samplehc import SampleHealthcare
client = SampleHealthcare(
api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
)
response = client.v2.documents.formats.create_pdf(
document_id="documentId",
)
print(response.id){
"id": "<string>",
"fileName": "<string>"
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123,
"details": {}
}{
"error": "<string>"
}{
"error": "<string>"
}Document
Create PDF format from a document or image
Converts an uploaded Word document or supported image to a PDF file by creating a new PDF format representation. Supported inputs are Word, PNG, and JPEG. Returns the new PDF document’s metadata.
POST
/
api
/
v2
/
documents
/
{documentId}
/
formats
/
pdf
Python
import os
from samplehc import SampleHealthcare
client = SampleHealthcare(
api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
)
response = client.v2.documents.formats.create_pdf(
document_id="documentId",
)
print(response.id){
"id": "<string>",
"fileName": "<string>"
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123,
"details": {}
}{
"error": "<string>"
}{
"error": "<string>"
}