SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Destaque

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
 

Destaque (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
 

Mais de 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
 

Mais de 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
 

Último

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Último (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

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