Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SB-18261 Add print pdf API #8

Merged
merged 42 commits into from
Apr 9, 2020

Conversation

anmol2302
Copy link

@anmol2302 anmol2302 commented Mar 12, 2020

Ticket Ref: SB-18261
Release-2.9.0
DOC
1: API added v1/print/pdf
2: it will generate a pdf from HTML file with CSS & images included.
3: Request Body:

{
    "request": {

        "context": {
            "recipientName": "Aishwarya A",
            "description": "Excellincing EPR wor",
            "certificateName": "<i>EPR CERTIFICATE<i>",
            "qrCodeImage": "https://www.qr-code-generator.com/wp-content/themes/qr/new_structure/markets/core_market_full/generator/dist/generator/assets/images/websiteQRCode_noFrame.png"
        },
        "htmlTemplate*": "https://sunbirddev.blob.core.windows.net/user/cert/File-012976173013442560353.zip",
      "storageParams":{
      "path":"path-to-folder/",
      "containerName":"azure containerName"
}
    }
}

4: Response

{
    "id": "api.print.preview.generate",
    "ver": "1.0",
    "ts": 1584014628424,
    "params": {},
    "responseCode": "OK",
    "result": {
        "pdfUrl": "https://sunbirddev.blob.core.windows.net/e-credentials/print-service/851e3dc0-6459-11ea-88db-edb64758da82.pdf",
        "ttl": 600
    }
}

5: context map in the request will have placeholders value present in HTML file
6: storageParams map is optional if user have extra requirement to save to some other container/path,
then it can be passed into request, else it will take default path print-service & containerName
7: htmlTemplate should be a zip file.

Mahesh Kumar Gangula and others added 30 commits December 31, 2019 07:12
Issue#0000: feat added enhancements to print service api
Adding chanegs for supporting multi language
updating indic font command.
@anmol2302 anmol2302 changed the title SB-18212(print pdf API added) SB-18261(print pdf API added) Mar 12, 2020
@anmol2302 anmol2302 changed the base branch from release-2.8.0 to release-2.9.0 March 18, 2020 07:48
@indrajra indrajra changed the base branch from release-2.9.0 to release-2.10.0 April 9, 2020 10:20
@indrajra indrajra changed the title SB-18261(print pdf API added) SB-18261 Add print pdf API Apr 9, 2020
@indrajra indrajra merged commit f285fe9 into project-sunbird:release-2.10.0 Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants