SlideShare a Scribd company logo
1 of 27
Adding a Watermark to your PDF
Output
Renah Scarowsky, Suite Solutions
Who am I?
Renah Scarowsky
• Senior developer and project manager at Suite Solutions
• Background in computer science, education and web development
• Extensive expertise implementing DITA
• Help companies get it right the first time
About Suite Solutions
Our Vision: Enable companies to engage their customers by providing quick
access to relevant information
• Help companies get it right the first time
• XML-based Authoring/Publishing Solutions
• Enterprise Intelligent Dynamic Content
• Consultancy, Systems Integration, Application Development
• Cross-Industry Expertise
• High Tech, Aerospace & Defense
• Healthcare, Discrete Manufacturing
• Blue Chip Customer Base
• Hundreds of Person Years of Experience on Staff
Main Topics
 Watermark Design: Considerations for design and placement
 Including your Watermark: How to include your watermark in your
customized PDF stylesheets
 Optional Watermarks: Modify display based on your requirements
Watermark Design
 What is a watermark?
 Placement of watermark in the page margin
 Design of watermark as background or overlay
Watermark Design
What is a watermark?
• Traditional watermarks: faint imprints on paper that can only be seen at
a specific angle
• Watermarks in presentation software: often an image or text used as a
background
• It is meant to enhance, but not to be the main point of focus
Watermark Design
Placement of watermark in the page margin
• Watermark can be included as part of the header or footer
• Watermark can be included in the side margin and rotated to fit
• In order to rotate text on page, wrap the block of text in an <fo:block-
container> and provide angle of rotation in the reference-orientation
attribute:
<fo:block-container
position="absolute"
reference-orientation="90"
left="16pt"
height="100%">
Watermark Design
Design of watermark as background or overlay
• If watermark is placed behind the text, it will be partially blocked by the
text and mostly blocked by large images
• To prevent this, the watermark can be created as a transparent image
and placed above the text so that both text and watermark will be
clearly visible
• The image background should be completely transparent and the
foreground partially transparent
• Degree of opacity should be chosen in order to hide or highlight
watermark as desired
• However, if the watermark lies above the text in an <fo:block-
container>, this can cause difficulty for authors editing the file in Adobe
Acrobat.
Watermark Design
 What is a watermark?
 Placement of watermark in the page margin
 Design of watermark as background or overlay
Including your Watermark
 Inclusion in static content
• Overview of static content
• Watermark in the headers and footers
• Overview of regions
• Watermark in the side margins
• Watermark as an overlay
 Inclusion as background to text
• Overview of layout-masters
• Watermark as a background
Including your Watermark
Overview of static content
• Content inserted by the stylesheet unrelated to source DITA is called
static content.
• Includes headers and footers
• Divided by document section
 TOC, main body, index etc can each have distinct static content
• Divided by page position
 odd/even pages, first pages and last pages can all differ from
each other
Including your Watermark
• Static-content.xsl includes templates that address the above scenarios.
• Watermarks should be processed in each of the relevant templates
• Design attributes for watermarks should be included in the relevant
attribute sets in static-content-attr.xsl
Including your Watermark
Watermark in the headers and footers
• A watermark included as part of the header/footer can utilize the
existing templates for headers and footers in static-content.xsl
<xsl:template name="insertBodyOddFooter">
<fo:static-content flow-name="odd-body-footer">
<xsl:call-template name="insertUnitOddFooter“/>
</fo:static-content>
<xsl:call-template name="insertWatermark"/>
</xsl:template>
Including your Watermark
Overview of regions
• XSL-FO uses region elements to define the regions of a page:
• <fo:region-body> defines the body
• <fo:region-before> defines the header
• <fo:region-after> defines the footer
• <fo:region-start> defines the sidebar
preceding the text
• <fo:region-end> defines the sidebar
following the text
• Before/after and start/end depend on the
language direction
Including your Watermark
Watermark in the side margins
• A watermark included in the side margins should define new templates
in static-content.xsl
• fo:region-start and fo:region-end should be defined in layout-
masters.xsl to contain the watermarks
• The region-name attribute of fo:region-start must correspond to
the flow-name attribute of fo:static-content
<xsl:template name="insertBodyLeftSidebar">
<fo:static-content flow-name=“left-watermark">
<xsl:call-template name="insertWatermark"/>
</fo:static-content>
</xsl:template>
...
<fo:region-start extent="{$page-margin-left}" display-
align="center" region-name=“left-watermark"/>
Including your Watermark
Watermark as an overlay
• A watermark included as overlay to text can be included in the existing
header/footer templates in an fo:block-container with absolute
positioning
• Static content templates should be used in order to place the
watermark on each page
<xsl:template name="insertBodyEvenHeader">
<fo:static-content flow-name=“even-body-header">
<fo:block-container position="absolute“ left=“3in"
top=“4in">
<fo:external-graphic src="{$watermark-url}"
xsl:use-attribute-sets=“watermark“/>
</fo:block-container>
</fo:static-content>
</xsl:template>
Including your Watermark
Overview of layout-masters
• Layout masters are used to organize and define the various sections of
the document
• One fo:layout-master-set is created for each document
• The fo:layout-master-set contains fo:simple-page-master elements
to define the sizes, margins and regions of each document section.
These are the “building blocks” of the document
• The fo:layout-master-set also contains fo:page-sequence-master
elements which reference the simple-page-masters and put them
together to build each document section (for example, TOC, body,
etc.)
Including your Watermark
Watermark as a background
• A background image can be included on each relevant fo:region in
layout-masters.xsl to create a watermark
• Relevant attributes should be collected and defined in a new
xsl:attribute-set in layout-masters-attr.xsl
<fo:region-body background-image="$watermark-url"
margin-top="{$page-margin-top}"
margin-bottom="{$page-margin-bottom}"
margin-left="{$page-margin-left}"
margin-right="{$page-margin-right}"/>
Including your Watermark
 Inclusion in static content
• Overview of static content
• Watermark in the headers and footers
• Overview of regions
• Watermark in the side margins
• Watermark as an overlay
 Inclusion as background to text
• Overview of layout-masters
• Watermark as a background
Optional Watermark
 Use ANT parameter to conditionally display watermark
• Choose existing parameter OR
• Define custom parameter
 Add condition to watermark display
 Send parameter and value to DITA-OT
Optional Watermark
Choose existing parameter
1. Determine which ANT parameter is logically correct for your
requirements, for example args.draft.
2. Determine the name of the parameter as passed to the stylesheets, for
example DRAFT
• Note: Detailed documentation on available parameters is included
in each version of the DITA-OT.
Optional Watermark
Define custom parameter
1. In the transform.topic2pdf.init target, add a property defining your
custom parameter
<property name=“protect.content" value=""/>
2. In the transform.topic2fo.main target, add a parameter to the <xslt>
task including your custom parameter
<param name="ProtectContent"
expression="${protect.content}"/>
• Note: Names of ANT targets and tasks may differ slightly in earlier
versions of the DITA-OT
3. Define parameter in basic-settings.xsl in your customized stylesheets
<param name="ProtectContent"/>
Optional Watermark
Add condition to watermark display
• Wrap watermark logic in a condition testing the value of the parameter
<xsl:template name="insertWatermark">
<xsl:if test="$DRAFT = ‘true' and $Product !=
'Presentation'">
<fo:static-content flow-name="watermark">
<fo:block-container position="absolute"
height="100%" reference-orientation="90" left="16pt"
margin-right="2in">
<xsl:call-template
name="insertWatermarkInternal"/>
</fo:block-container>
</fo:static-content>
</xsl:if>
</xsl:template>
Optional Watermark
Send parameter and value to DITA-OT
• Include parameter and appropriate value when calling the DITA-OT
ant -f build.xml -Dargs.draft=true -DProduct=Handbook
• Note: Some CMS solutions already have various ANT parameters
configured in the CMS, particularly args.draft.
Optional Watermark
 Use ANT parameter to conditionally display watermark
• Choose existing parameter OR
• Define custom parameter
 Add condition to watermark display
 Send parameter and value to DITA-OT
Main Topics
 Watermark Design: Considerations for design and placement
 Including your Watermark: How to include your watermark in your
customized PDF stylesheets
 Optional Watermarks: Modify display based on your requirements
Hmmm, this looks interesting…
For additional information, contact us:
Joe Gelb
solutions@suite-sol.com
U.S. Office EMEA Office
(609) 360-0650 +972-2-993-8054
www.suite-sol.com

More Related Content

Viewers also liked

CV Roy Basoeki
CV Roy BasoekiCV Roy Basoeki
CV Roy Basoekitime4web
 
Dedicado a mis amig@s ciberentic@s
Dedicado a mis amig@s ciberentic@sDedicado a mis amig@s ciberentic@s
Dedicado a mis amig@s ciberentic@sstaro G.G
 
Dutch media landscape 2015 Q4 update by Starcom
Dutch media landscape 2015 Q4 update by Starcom Dutch media landscape 2015 Q4 update by Starcom
Dutch media landscape 2015 Q4 update by Starcom starcomNL
 
Aplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri Octaviana
Aplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri OctavianaAplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri Octaviana
Aplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri Octavianasutrioctavianasitorus
 
TBEX15 Asia Thailand Sara Meaney
TBEX15 Asia Thailand Sara MeaneyTBEX15 Asia Thailand Sara Meaney
TBEX15 Asia Thailand Sara MeaneyTBEX
 
Presentation6
Presentation6Presentation6
Presentation6rbbrown
 
Creating the Startup The Accounting Panorama
Creating the Startup The Accounting PanoramaCreating the Startup The Accounting Panorama
Creating the Startup The Accounting PanoramaSteve Lines
 

Viewers also liked (18)

CV Roy Basoeki
CV Roy BasoekiCV Roy Basoeki
CV Roy Basoeki
 
33 Period week
33 Period week33 Period week
33 Period week
 
Zhuangzi
ZhuangziZhuangzi
Zhuangzi
 
Manual património cultural aula 14 - mosteiro de s. bento s. tirso - cópia
Manual património cultural   aula 14 - mosteiro de s. bento s. tirso - cópiaManual património cultural   aula 14 - mosteiro de s. bento s. tirso - cópia
Manual património cultural aula 14 - mosteiro de s. bento s. tirso - cópia
 
1st Grade Unit 6: Blue jay finds a way
1st Grade Unit 6: Blue jay finds a way1st Grade Unit 6: Blue jay finds a way
1st Grade Unit 6: Blue jay finds a way
 
Dedicado a mis amig@s ciberentic@s
Dedicado a mis amig@s ciberentic@sDedicado a mis amig@s ciberentic@s
Dedicado a mis amig@s ciberentic@s
 
Dutch media landscape 2015 Q4 update by Starcom
Dutch media landscape 2015 Q4 update by Starcom Dutch media landscape 2015 Q4 update by Starcom
Dutch media landscape 2015 Q4 update by Starcom
 
Visual Network Analysis
Visual Network AnalysisVisual Network Analysis
Visual Network Analysis
 
Aplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri Octaviana
Aplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri OctavianaAplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri Octaviana
Aplikom_Unsri_1. MyBiodata dan keunikan Matematika_Sutri Octaviana
 
TBEX15 Asia Thailand Sara Meaney
TBEX15 Asia Thailand Sara MeaneyTBEX15 Asia Thailand Sara Meaney
TBEX15 Asia Thailand Sara Meaney
 
Yg Ini 1
Yg Ini 1Yg Ini 1
Yg Ini 1
 
Ususnmptn2011
Ususnmptn2011Ususnmptn2011
Ususnmptn2011
 
Que es google docs
Que es google docsQue es google docs
Que es google docs
 
Synapseindia android apps (operating system)
Synapseindia android apps (operating system)Synapseindia android apps (operating system)
Synapseindia android apps (operating system)
 
Presentation6
Presentation6Presentation6
Presentation6
 
Creando Enlaces a Prueba de Penguin
Creando Enlaces a Prueba de PenguinCreando Enlaces a Prueba de Penguin
Creando Enlaces a Prueba de Penguin
 
Creating the Startup The Accounting Panorama
Creating the Startup The Accounting PanoramaCreating the Startup The Accounting Panorama
Creating the Startup The Accounting Panorama
 
C++ Chapter I
C++ Chapter IC++ Chapter I
C++ Chapter I
 

More from Suite Solutions

SuiteHelp 4.0: Latest Features in Enterprise Webhelp
SuiteHelp 4.0: Latest Features in Enterprise WebhelpSuiteHelp 4.0: Latest Features in Enterprise Webhelp
SuiteHelp 4.0: Latest Features in Enterprise WebhelpSuite Solutions
 
Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...
Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...
Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...Suite Solutions
 
Increasing Findability with Subject Schemes (Advanced DITA Webinar)
Increasing Findability with Subject Schemes (Advanced DITA Webinar)Increasing Findability with Subject Schemes (Advanced DITA Webinar)
Increasing Findability with Subject Schemes (Advanced DITA Webinar)Suite Solutions
 
SuiteHelp 3.2.5 Latest Features
SuiteHelp 3.2.5 Latest FeaturesSuiteHelp 3.2.5 Latest Features
SuiteHelp 3.2.5 Latest FeaturesSuite Solutions
 
Using Taxonomy for Customer-centric Dynamic Publishing
Using Taxonomy for Customer-centric Dynamic PublishingUsing Taxonomy for Customer-centric Dynamic Publishing
Using Taxonomy for Customer-centric Dynamic PublishingSuite Solutions
 
DITA Quick Start Webinar: Defining Your Style Sheet Requirements
DITA Quick Start Webinar: Defining Your Style Sheet RequirementsDITA Quick Start Webinar: Defining Your Style Sheet Requirements
DITA Quick Start Webinar: Defining Your Style Sheet RequirementsSuite Solutions
 
DITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project PlanDITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project PlanSuite Solutions
 
DITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project PlanDITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project PlanSuite Solutions
 
DITA Quick Start: System Architecture of a Basic DITA Toolset
DITA Quick Start: System Architecture of a Basic DITA ToolsetDITA Quick Start: System Architecture of a Basic DITA Toolset
DITA Quick Start: System Architecture of a Basic DITA ToolsetSuite Solutions
 
DITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
DITA Quick Start Webinar Series: Getting Started with the DITA Open ToolkitDITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
DITA Quick Start Webinar Series: Getting Started with the DITA Open ToolkitSuite Solutions
 
DITA Quick Start Webinar Series: Getting Started with Information Architecture
DITA Quick Start Webinar Series: Getting Started with Information ArchitectureDITA Quick Start Webinar Series: Getting Started with Information Architecture
DITA Quick Start Webinar Series: Getting Started with Information ArchitectureSuite Solutions
 
DITA Quick Start for Authors Part II
DITA Quick Start for Authors Part IIDITA Quick Start for Authors Part II
DITA Quick Start for Authors Part IISuite Solutions
 
DITA Quick Start for Authors - Part I
DITA Quick Start for Authors - Part IDITA Quick Start for Authors - Part I
DITA Quick Start for Authors - Part ISuite Solutions
 
Suite Labs: Generating SuiteHelp Output
Suite Labs: Generating SuiteHelp OutputSuite Labs: Generating SuiteHelp Output
Suite Labs: Generating SuiteHelp OutputSuite Solutions
 
Overview of SuiteHelp 3.1 for DITA
Overview of SuiteHelp 3.1 for DITAOverview of SuiteHelp 3.1 for DITA
Overview of SuiteHelp 3.1 for DITASuite Solutions
 
C:\Users\User\Desktop\Eclipse Infocenter
C:\Users\User\Desktop\Eclipse InfocenterC:\Users\User\Desktop\Eclipse Infocenter
C:\Users\User\Desktop\Eclipse InfocenterSuite Solutions
 
LocalizingStyleSheetsForHTMLOutputs
LocalizingStyleSheetsForHTMLOutputsLocalizingStyleSheetsForHTMLOutputs
LocalizingStyleSheetsForHTMLOutputsSuite Solutions
 
ImplementingChangeTrackingAndFlagging
ImplementingChangeTrackingAndFlaggingImplementingChangeTrackingAndFlagging
ImplementingChangeTrackingAndFlaggingSuite Solutions
 

More from Suite Solutions (20)

SuiteHelp 4.0: Latest Features in Enterprise Webhelp
SuiteHelp 4.0: Latest Features in Enterprise WebhelpSuiteHelp 4.0: Latest Features in Enterprise Webhelp
SuiteHelp 4.0: Latest Features in Enterprise Webhelp
 
Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...
Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...
Moving your Organization up the Knowledge Value Chain (Proposal for Lavacon 2...
 
Increasing Findability with Subject Schemes (Advanced DITA Webinar)
Increasing Findability with Subject Schemes (Advanced DITA Webinar)Increasing Findability with Subject Schemes (Advanced DITA Webinar)
Increasing Findability with Subject Schemes (Advanced DITA Webinar)
 
SuiteHelp 3.2.5 Latest Features
SuiteHelp 3.2.5 Latest FeaturesSuiteHelp 3.2.5 Latest Features
SuiteHelp 3.2.5 Latest Features
 
Using Taxonomy for Customer-centric Dynamic Publishing
Using Taxonomy for Customer-centric Dynamic PublishingUsing Taxonomy for Customer-centric Dynamic Publishing
Using Taxonomy for Customer-centric Dynamic Publishing
 
DITA Quick Start Webinar: Defining Your Style Sheet Requirements
DITA Quick Start Webinar: Defining Your Style Sheet RequirementsDITA Quick Start Webinar: Defining Your Style Sheet Requirements
DITA Quick Start Webinar: Defining Your Style Sheet Requirements
 
DITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project PlanDITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project Plan
 
DITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project PlanDITA Quick Start Webinar Series: Building a Project Plan
DITA Quick Start Webinar Series: Building a Project Plan
 
DITA Quick Start: System Architecture of a Basic DITA Toolset
DITA Quick Start: System Architecture of a Basic DITA ToolsetDITA Quick Start: System Architecture of a Basic DITA Toolset
DITA Quick Start: System Architecture of a Basic DITA Toolset
 
DITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
DITA Quick Start Webinar Series: Getting Started with the DITA Open ToolkitDITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
DITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
 
DITA Quick Start Webinar Series: Getting Started with Information Architecture
DITA Quick Start Webinar Series: Getting Started with Information ArchitectureDITA Quick Start Webinar Series: Getting Started with Information Architecture
DITA Quick Start Webinar Series: Getting Started with Information Architecture
 
Introduction to S1000D
Introduction to S1000DIntroduction to S1000D
Introduction to S1000D
 
DITA Quick Start for Authors Part II
DITA Quick Start for Authors Part IIDITA Quick Start for Authors Part II
DITA Quick Start for Authors Part II
 
DITA Quick Start for Authors - Part I
DITA Quick Start for Authors - Part IDITA Quick Start for Authors - Part I
DITA Quick Start for Authors - Part I
 
Suite Labs: Generating SuiteHelp Output
Suite Labs: Generating SuiteHelp OutputSuite Labs: Generating SuiteHelp Output
Suite Labs: Generating SuiteHelp Output
 
Overview of SuiteHelp 3.1 for DITA
Overview of SuiteHelp 3.1 for DITAOverview of SuiteHelp 3.1 for DITA
Overview of SuiteHelp 3.1 for DITA
 
Svg and graphics
Svg and graphicsSvg and graphics
Svg and graphics
 
C:\Users\User\Desktop\Eclipse Infocenter
C:\Users\User\Desktop\Eclipse InfocenterC:\Users\User\Desktop\Eclipse Infocenter
C:\Users\User\Desktop\Eclipse Infocenter
 
LocalizingStyleSheetsForHTMLOutputs
LocalizingStyleSheetsForHTMLOutputsLocalizingStyleSheetsForHTMLOutputs
LocalizingStyleSheetsForHTMLOutputs
 
ImplementingChangeTrackingAndFlagging
ImplementingChangeTrackingAndFlaggingImplementingChangeTrackingAndFlagging
ImplementingChangeTrackingAndFlagging
 

Recently uploaded

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Recently uploaded (20)

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Suite Labs: Adding a Watermark To Your PDF Output

  • 1. Adding a Watermark to your PDF Output Renah Scarowsky, Suite Solutions
  • 2. Who am I? Renah Scarowsky • Senior developer and project manager at Suite Solutions • Background in computer science, education and web development • Extensive expertise implementing DITA • Help companies get it right the first time
  • 3. About Suite Solutions Our Vision: Enable companies to engage their customers by providing quick access to relevant information • Help companies get it right the first time • XML-based Authoring/Publishing Solutions • Enterprise Intelligent Dynamic Content • Consultancy, Systems Integration, Application Development • Cross-Industry Expertise • High Tech, Aerospace & Defense • Healthcare, Discrete Manufacturing • Blue Chip Customer Base • Hundreds of Person Years of Experience on Staff
  • 4. Main Topics  Watermark Design: Considerations for design and placement  Including your Watermark: How to include your watermark in your customized PDF stylesheets  Optional Watermarks: Modify display based on your requirements
  • 5. Watermark Design  What is a watermark?  Placement of watermark in the page margin  Design of watermark as background or overlay
  • 6. Watermark Design What is a watermark? • Traditional watermarks: faint imprints on paper that can only be seen at a specific angle • Watermarks in presentation software: often an image or text used as a background • It is meant to enhance, but not to be the main point of focus
  • 7. Watermark Design Placement of watermark in the page margin • Watermark can be included as part of the header or footer • Watermark can be included in the side margin and rotated to fit • In order to rotate text on page, wrap the block of text in an <fo:block- container> and provide angle of rotation in the reference-orientation attribute: <fo:block-container position="absolute" reference-orientation="90" left="16pt" height="100%">
  • 8. Watermark Design Design of watermark as background or overlay • If watermark is placed behind the text, it will be partially blocked by the text and mostly blocked by large images • To prevent this, the watermark can be created as a transparent image and placed above the text so that both text and watermark will be clearly visible • The image background should be completely transparent and the foreground partially transparent • Degree of opacity should be chosen in order to hide or highlight watermark as desired • However, if the watermark lies above the text in an <fo:block- container>, this can cause difficulty for authors editing the file in Adobe Acrobat.
  • 9. Watermark Design  What is a watermark?  Placement of watermark in the page margin  Design of watermark as background or overlay
  • 10. Including your Watermark  Inclusion in static content • Overview of static content • Watermark in the headers and footers • Overview of regions • Watermark in the side margins • Watermark as an overlay  Inclusion as background to text • Overview of layout-masters • Watermark as a background
  • 11. Including your Watermark Overview of static content • Content inserted by the stylesheet unrelated to source DITA is called static content. • Includes headers and footers • Divided by document section  TOC, main body, index etc can each have distinct static content • Divided by page position  odd/even pages, first pages and last pages can all differ from each other
  • 12. Including your Watermark • Static-content.xsl includes templates that address the above scenarios. • Watermarks should be processed in each of the relevant templates • Design attributes for watermarks should be included in the relevant attribute sets in static-content-attr.xsl
  • 13. Including your Watermark Watermark in the headers and footers • A watermark included as part of the header/footer can utilize the existing templates for headers and footers in static-content.xsl <xsl:template name="insertBodyOddFooter"> <fo:static-content flow-name="odd-body-footer"> <xsl:call-template name="insertUnitOddFooter“/> </fo:static-content> <xsl:call-template name="insertWatermark"/> </xsl:template>
  • 14. Including your Watermark Overview of regions • XSL-FO uses region elements to define the regions of a page: • <fo:region-body> defines the body • <fo:region-before> defines the header • <fo:region-after> defines the footer • <fo:region-start> defines the sidebar preceding the text • <fo:region-end> defines the sidebar following the text • Before/after and start/end depend on the language direction
  • 15. Including your Watermark Watermark in the side margins • A watermark included in the side margins should define new templates in static-content.xsl • fo:region-start and fo:region-end should be defined in layout- masters.xsl to contain the watermarks • The region-name attribute of fo:region-start must correspond to the flow-name attribute of fo:static-content <xsl:template name="insertBodyLeftSidebar"> <fo:static-content flow-name=“left-watermark"> <xsl:call-template name="insertWatermark"/> </fo:static-content> </xsl:template> ... <fo:region-start extent="{$page-margin-left}" display- align="center" region-name=“left-watermark"/>
  • 16. Including your Watermark Watermark as an overlay • A watermark included as overlay to text can be included in the existing header/footer templates in an fo:block-container with absolute positioning • Static content templates should be used in order to place the watermark on each page <xsl:template name="insertBodyEvenHeader"> <fo:static-content flow-name=“even-body-header"> <fo:block-container position="absolute“ left=“3in" top=“4in"> <fo:external-graphic src="{$watermark-url}" xsl:use-attribute-sets=“watermark“/> </fo:block-container> </fo:static-content> </xsl:template>
  • 17. Including your Watermark Overview of layout-masters • Layout masters are used to organize and define the various sections of the document • One fo:layout-master-set is created for each document • The fo:layout-master-set contains fo:simple-page-master elements to define the sizes, margins and regions of each document section. These are the “building blocks” of the document • The fo:layout-master-set also contains fo:page-sequence-master elements which reference the simple-page-masters and put them together to build each document section (for example, TOC, body, etc.)
  • 18. Including your Watermark Watermark as a background • A background image can be included on each relevant fo:region in layout-masters.xsl to create a watermark • Relevant attributes should be collected and defined in a new xsl:attribute-set in layout-masters-attr.xsl <fo:region-body background-image="$watermark-url" margin-top="{$page-margin-top}" margin-bottom="{$page-margin-bottom}" margin-left="{$page-margin-left}" margin-right="{$page-margin-right}"/>
  • 19. Including your Watermark  Inclusion in static content • Overview of static content • Watermark in the headers and footers • Overview of regions • Watermark in the side margins • Watermark as an overlay  Inclusion as background to text • Overview of layout-masters • Watermark as a background
  • 20. Optional Watermark  Use ANT parameter to conditionally display watermark • Choose existing parameter OR • Define custom parameter  Add condition to watermark display  Send parameter and value to DITA-OT
  • 21. Optional Watermark Choose existing parameter 1. Determine which ANT parameter is logically correct for your requirements, for example args.draft. 2. Determine the name of the parameter as passed to the stylesheets, for example DRAFT • Note: Detailed documentation on available parameters is included in each version of the DITA-OT.
  • 22. Optional Watermark Define custom parameter 1. In the transform.topic2pdf.init target, add a property defining your custom parameter <property name=“protect.content" value=""/> 2. In the transform.topic2fo.main target, add a parameter to the <xslt> task including your custom parameter <param name="ProtectContent" expression="${protect.content}"/> • Note: Names of ANT targets and tasks may differ slightly in earlier versions of the DITA-OT 3. Define parameter in basic-settings.xsl in your customized stylesheets <param name="ProtectContent"/>
  • 23. Optional Watermark Add condition to watermark display • Wrap watermark logic in a condition testing the value of the parameter <xsl:template name="insertWatermark"> <xsl:if test="$DRAFT = ‘true' and $Product != 'Presentation'"> <fo:static-content flow-name="watermark"> <fo:block-container position="absolute" height="100%" reference-orientation="90" left="16pt" margin-right="2in"> <xsl:call-template name="insertWatermarkInternal"/> </fo:block-container> </fo:static-content> </xsl:if> </xsl:template>
  • 24. Optional Watermark Send parameter and value to DITA-OT • Include parameter and appropriate value when calling the DITA-OT ant -f build.xml -Dargs.draft=true -DProduct=Handbook • Note: Some CMS solutions already have various ANT parameters configured in the CMS, particularly args.draft.
  • 25. Optional Watermark  Use ANT parameter to conditionally display watermark • Choose existing parameter OR • Define custom parameter  Add condition to watermark display  Send parameter and value to DITA-OT
  • 26. Main Topics  Watermark Design: Considerations for design and placement  Including your Watermark: How to include your watermark in your customized PDF stylesheets  Optional Watermarks: Modify display based on your requirements
  • 27. Hmmm, this looks interesting… For additional information, contact us: Joe Gelb solutions@suite-sol.com U.S. Office EMEA Office (609) 360-0650 +972-2-993-8054 www.suite-sol.com