Top
Top
LibraryEASYProcess Reference Manual 5ProcessesServicesPDFWorkshopHtmlStringToPDFStream

HtmlStringToPDFStream Overview

HtmlStringToPDFStream creates a PDF from the given HTML and then downloads it to the user’s local computer. The file will be saved to the default location for downloads as determined in the web browser settings.

This service should be used from a user initiated process since it is intended to download to the user’s computer. If only the generated PDF file is needed, HtmlStringToPDFFile service should be used instead.


HtmlStringToPDFStream Use Examples
Workshop:PDFWorkshop
Service:HtmlStringToPDFStream
Inputs
HtmlString"HtmlString" is the HTML that we would like to convert into PDF file and save to the default location for downloads.

FileName"FileName" is the name of the file that we would like to save.

TopMargin"TopMargin" is the top margin in pixels for the PDF file we are going to save to the default location for downloads.

BottomMargin"BottomMargin" is the bottom margin in pixels for the PDF file we are going to save to the default location for downloads.

LeftMargin"LeftMargin" is the left margin in pixels for the PDF file we are going to save to the default location for downloads.

RightMargin"RightMargin" is the right margin in pixels for the PDF file we are going to save to the default location for downloads.

PageWidth"PageWidth" is the width for the PDF file we are going to save to the default location for downloads.

PageHeight"PageHeight" is the height for the PDF file we are going to save to the default location for downloads.

ShowHeader"ShowHeader" takes Yes or No as input and determines whether to show header or not.

HeaderHtmlStringIf the input "ShowHeader" is set to Yes, we can pass HTML string through this input to render HTML as header.

HeaderTextIf the input "ShowHeader" is set to Yes, this text will be displayed on each page.

HeaderHeight"HeaderHeight" is the height of the header in pixels.

DrawHeaderLine"DrawHeaderLine" takes Yes/No value. If you decide to show header this will draw a dividing line between the header and the body of the file.

ShowFooter"ShowFooter" takes Yes/No value to determine if each page in the file should display footer information.

FooterHtmlStringIf the input "ShowFooter" is set to Yes, we can pass HTML string through this input to render HTML as footer.

FooterTextIf the input "ShowFooter" is set to Yes, this text will be displayed on each page.

FooterHeight"FooterHeight" is the height of the footer in pixels.

DrawFooterLine"DrawFooterLine" takes Yes/No value. If you decide to show header this will draw a dividing line between the footer and the body of the file.

ShowPageNumber"ShowPageNumber" takes Yes/No value to determine if page number should be displayed at the bottom of each page in the file.

CoverHtmlString

PageNumberText"PageNumberText" is the text defining page numbers.

PrependPDFFileArray

AppendPDFFileArray

EnableBookmark

BookmarkTags

BookmarkClassFilter

PageOrientation

SiteUrl

HtmlStringToPDFStream Basic Use Example

Under the “WebPart Services” drag over the “GetHtmlString” service to the Process Canvas. This will create a “GetHtmlString” service on the Process Canvas. Connect it to the “Start” service, double click the “GetHtmlString” service and pass in a WebPartId to generate HTML String of that webpart. Now, drag “HtmlStringToPDFFile” under “PDF Services” to the Process Canvas and connect the newly created service to “GetHtmlString” and “Terminate” as shown in the picture below.

         

In this example we are going to use the service “GetHtmlString” under WebPartWorkshop” to generate HTMLString of a webpart which we’ll pass into “HtmlString” input for our “HtmlStringToPDFFile” service to generate PDF and save it to the default location for downloads.

Add File Name

File name is the name of the PDF file that we are going to generate and save. Notice that we should also include .pdf extension. The file will be saved to the default location for downloads as determined in the web browser settings.

Output

In the HtmlStringToPDFFile service logs we can see the starttime, endtime, and duration of this service.


Powered by EASYProcess (© 2019 K-Rise Systems, Inc).