PAGE-BREAK FRIENDLY SEARCHABLE PDF
==================================
STEP-BY-STEP SETUP
--------------------------------
0) In your App Settings > General > Advanced Option, enable the checbox "EXPOSE THE OPTION TO ADD AN ID ATTRIBUTE TO HTML ELEMENTS".
1) Drap and drop the PAGE-BREAK FRIENDLY SEARCHABLE PDF visual element to the page(s) you want to generate the PDF from.
2) Use a button or any similar element to trigger the element action "CAPTURE PAGE CONTENT", which captures the page content.
Inputs Fields :
- HTML IDs to include : List of HTML ID element to include in the printing. A list may be generated from text by using "ARBITRARY TEXT" with ":SPLIT BY" operator. If omitted, the whole page will be exported to PDF.
- HTML IDs to exclude : List of HTML ID element to exclude from printing.
3) Set a workflow start as "PAGE CAPTURE SUCCESSFUL" type, which will be triggered once the page content is captured.
4) In the previous workflow, add the "PAGE-BREAK FRIENDLY SEARCHABLE PDF - GENERATE FILE" action. Set the inputs as required.
Inputs Fields :
- FILENAME : Filename without extension.
- CONTENT : Must contain the exposed state "CONTENT" of "PAGE-BREAK FRIENDLY SEARCHABLE PDF" element.
- PRINT BACKGROUND : Set to true to print background graphic. Valid values: true | false. Default is false.
- FORMAT : Valid values: Letter | Legal | Tabloid | Ledger | A0 | A1 | A2 | A3 | A4 | A5 | A6. Empty generates a single-page PDF.
- LANDSCAPE : Whether to print in landscape orientation. Valid values: true | false. Default is false.
- SCALE : Scales the rendering of the web page. Amount must be between 0.1 and 2. Default is 1.
- PAGE RANGES : Paper ranges to print, e.g. 1-5, 8, 11-13.
- TOP MARGIN : Paper top margin. Format is integer.
- LEFT MARGIN : Paper left margin. Format is integer.
- RIGHT MARGIN : Paper right margin. Format is integer.
- BOTTOM MARGIN : Paper bottom margin. Format is integer.
- MARGIN UNIT : Valid units: px | in | cm | mm. Default is px.
- HEADER : HTML template for the print header. Should be valid HTML with the following classes used to inject values into them:
- date: Formatted print date
- title: Document title
- pageNumber: Current page number
- totalPages: Total pages in the document.
Example :
<html>
<head>
<style type="text/css">
#header {
padding: 0;
}
.content {
width: 100%;
background-color: #777;
color: white;
padding: 0em;
-webkit-print-color-adjust: exact;
vertical-align: middle;
font-size: 10em;
margin-top: 0;
display: inline-block;
}
.title {
font-weight: bold;
}
.date {
text-align:right;
}
</style>
</head>
<body>
<div class="content">
<span class="title"></span> -
<span class="date"></span>
</div>
</body>
</html>
Margins must be set accordingly to account for the header.
- FOOTER : HTML template for the print footer. Has the same constraints and support for special classes as Header:
Example:
<html>
<head>
<style type="text/css">
#footer {
padding: 0;
}
.content-footer {
width: 100%;
background-color: #777;
color: white;
padding: 0em;
-webkit-print-color-adjust: exact;
vertical-align: middle;
font-size: 10em;
margin-top: 0;
display: inline-block;
text-align: center;
}
</style>
</head>
<body>
<div class="content-footer">
Page <span class="pageNumber"></span> of <span class="totalPages"></span>
</div>
</body>
</html>
Margins must be set accordingly to account for the footer.
Output Fields :
- BODY : Returns the generated PDF file.
5) (Optional) In the previous workflow, add the "LOCAL PRIVATE FILE UPLOAD FROM BASE64-ENCODED DATA" action to upload the file as private and attached to a given thing.
Inputs Fields :
- WEBSITE HOME URL : Set this parameter as "Website Home URL" dynamic field
- CONTENTS : The file for uploading in base64 format. You may use the result of "PAGE-BREAK FRIENDLY SEARCHABLE PDF - GENERATE FILE" as follow "RESULT OF STEP 1 (WEBPAGE TO SEARCH...)'S BODY:USED AS A FILE:ENCODED IN BASE64".
- ATTACH_TO : The unique ID of who/which thing owns the file.
Output Fields :
- BODY : Returns the URL of the PDF file privately-attached to the thing.
IMPLEMENTATION EXAMPLE
======================
Feel free to browse the app editor in the Service URL for an implementation example.
ADDITIONAL INFORMATION
======================
N/A
TROUBLESHOOTING
================
Any plugin related error will be posted to the Console of the browser.
PERFORMANCE CONSIDERATIONS
===========================
N/A
QUESTIONS ?
===========
Contact us at
[email protected] for any additional feature you would require or support question.