Skip to content

Instantly share code, notes, and snippets.

@Bomberus
Last active December 22, 2019 02:07
Show Gist options
  • Save Bomberus/d71419286e977e49bf13c13cc93be283 to your computer and use it in GitHub Desktop.
Save Bomberus/d71419286e977e49bf13c13cc93be283 to your computer and use it in GitHub Desktop.
Adobe Livecycle Designer, hide pages depending on provided xml data
<?xml version="1.0"?>
<!-- Source: https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ms762271(v%3Dvs.85)-->
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>
<book id="bk102">
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-12-16</publish_date>
<description>A former architect battles corporate zombies,
an evil sorceress, and her own childhood to become queen
of the world.</description>
</book>
<book id="bk103">
<author>Corets, Eva</author>
<title>Maeve Ascendant</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-11-17</publish_date>
<description>After the collapse of a nanotechnology
society in England, the young survivors lay the
foundation for a new society.</description>
</book>
<book id="bk104">
<author>Corets, Eva</author>
<title>Oberon's Legacy</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2001-03-10</publish_date>
<description>In post-apocalypse England, the mysterious
agent known only as Oberon helps to create a new life
for the inhabitants of London. Sequel to Maeve
Ascendant.</description>
</book>
<book id="bk105">
<author>Corets, Eva</author>
<title>The Sundered Grail</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2001-09-10</publish_date>
<description>The two daughters of Maeve, half-sisters,
battle one another for control of England. Sequel to
Oberon's Legacy.</description>
</book>
<book id="bk106">
<author>Randall, Cynthia</author>
<title>Lover Birds</title>
<genre>Romance</genre>
<price>4.95</price>
<publish_date>2000-09-02</publish_date>
<description>When Carla meets Paul at an ornithology
conference, tempers fly as feathers get ruffled.</description>
</book>
<book id="bk107">
<author>Thurman, Paula</author>
<title>Splish Splash</title>
<genre>Romance</genre>
<price>4.95</price>
<publish_date>2000-11-02</publish_date>
<description>A deep sea diver finds true love twenty
thousand leagues beneath the sea.</description>
</book>
<book id="bk108">
<author>Knorr, Stefan</author>
<title>Creepy Crawlies</title>
<genre>Horror</genre>
<price>4.95</price>
<publish_date>2000-12-06</publish_date>
<description>An anthology of horror stories about roaches,
centipedes, scorpions and other insects.</description>
</book>
<book id="bk109">
<author>Kress, Peter</author>
<title>Paradox Lost</title>
<genre>Science Fiction</genre>
<price>6.95</price>
<publish_date>2000-11-02</publish_date>
<description>After an inadvertant trip through a Heisenberg
Uncertainty Device, James Salway discovers the problems
of being quantum.</description>
</book>
<book id="bk110">
<author>O'Brien, Tim</author>
<title>Microsoft .NET: The Programming Bible</title>
<genre>Computer</genre>
<price>36.95</price>
<publish_date>2000-12-09</publish_date>
<description>Microsoft's .NET initiative is explored in
detail in this deep programmer's reference.</description>
</book>
<book id="bk111">
<author>O'Brien, Tim</author>
<title>MSXML3: A Comprehensive Guide</title>
<genre>Computer</genre>
<price>36.95</price>
<publish_date>2000-12-01</publish_date>
<description>The Microsoft MSXML3 parser is covered in
detail, with attention to XML DOM interfaces, XSLT processing,
SAX and more.</description>
</book>
<book id="bk112">
<author>Galos, Mike</author>
<title>Visual Studio 7: A Comprehensive Guide</title>
<genre>Computer</genre>
<price>49.95</price>
<publish_date>2001-04-16</publish_date>
<description>Microsoft Visual Studio 7 is explored in depth,
looking at how Visual Basic, Visual C++, C#, and ASP+ are
integrated into a comprehensive development
environment.</description>
</book>
</catalog>
<?xml version="1.0" encoding="UTF-8"?>
<?xfa generator="AdobeLiveCycleDesigner_V11.0.9.20190919.2.937362_SAP" APIVersion="3.6.19049.0"?>
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" timeStamp="2019-12-22T01:56:28Z" uuid="32411a72-54fe-426f-bf91-41b830c70c80">
<template xmlns:xliff="urn:oasis:names:tc:xliff:document:1.1" xmlns="http://www.xfa.org/schema/xfa-template/3.3/">
<?formServer defaultPDFRenderFormat acrobat10.0dynamic?>
<?formServer allowRenderCaching 0?>
<?formServer formModel both?>
<subform name="catalog" layout="tb" locale="de_DE" restoreState="auto">
<pageSet>
<pageArea name="Page1" id="Page1">
<contentArea x="0.25in" y="0.25in" w="576pt" h="756pt"/>
<medium stock="default" short="612pt" long="792pt"/>
<?templateDesigner expand 1?></pageArea>
<?templateDesigner expand 1?></pageSet>
<subform w="576pt" h="756pt" name="page">
<subform x="3.175mm" y="28.575mm" w="188mm" minH="29mm" name="collection" layout="tb">
<bind match="none"/>
<subform name="book" w="188.325mm" h="41.275mm">
<margin leftInset="1mm" rightInset="1mm" topInset="1mm" bottomInset="1mm"/>
<field name="id" w="62mm" h="9mm">
<ui>
<textEdit>
<border>
<edge stroke="lowered"/>
</border>
<margin/>
</textEdit>
</ui>
<font typeface="Arial"/>
<margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
<para vAlign="middle"/>
<caption reserve="25mm">
<para vAlign="middle"/>
<value>
<text xliff:rid="E75DDF5B-26A4-46CF-B7D1-955E38B4B527">Id</text>
</value>
</caption>
<bind match="dataRef" ref="$.id"/>
</field>
<field name="author" w="62mm" h="9mm" x="2.440944in">
<ui>
<textEdit>
<border>
<edge stroke="lowered"/>
</border>
<margin/>
</textEdit>
</ui>
<font typeface="Arial"/>
<margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
<para vAlign="middle"/>
<caption reserve="25mm">
<para vAlign="middle"/>
<value>
<text xliff:rid="D6899857-56EC-46B2-B59F-9F8F02B018D4">Author</text>
</value>
</caption>
<bind match="dataRef" ref="$.author"/>
</field>
<field name="title" w="62mm" h="9mm" x="4.881889in">
<ui>
<textEdit>
<border>
<edge stroke="lowered"/>
</border>
<margin/>
</textEdit>
</ui>
<font typeface="Arial"/>
<margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
<para vAlign="middle"/>
<caption reserve="25mm">
<para vAlign="middle"/>
<value>
<text xliff:rid="36467B83-B115-4BC0-9DDA-2CD271E036C7">Title</text>
</value>
</caption>
<bind match="dataRef" ref="$.title"/>
</field>
<field name="genre" w="62mm" h="9mm" y="0.354333in">
<ui>
<textEdit>
<border>
<edge stroke="lowered"/>
</border>
<margin/>
</textEdit>
</ui>
<font typeface="Arial"/>
<margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
<para vAlign="middle"/>
<caption reserve="25mm">
<para vAlign="middle"/>
<value>
<text xliff:rid="221E9AA5-303A-4098-B5B5-E75D015CDC9E">Genre</text>
</value>
</caption>
<bind match="dataRef" ref="$.genre"/>
</field>
<field name="price" w="62mm" h="9mm" y="0.354333in" x="2.440944in">
<ui>
<textEdit>
<border>
<edge stroke="lowered"/>
</border>
<margin/>
</textEdit>
</ui>
<font typeface="Arial"/>
<margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
<para vAlign="middle"/>
<caption reserve="25mm">
<para vAlign="middle"/>
<value>
<text xliff:rid="328C47AB-FE32-4B21-9469-2078BD2F5135">Price</text>
</value>
</caption>
<bind match="dataRef" ref="$.price"/>
</field>
<field name="publish_date" w="62mm" h="9mm" y="0.354333in" x="4.881889in">
<ui>
<textEdit>
<border>
<edge stroke="lowered"/>
</border>
<margin/>
</textEdit>
</ui>
<font typeface="Arial"/>
<margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
<para vAlign="middle"/>
<caption reserve="25mm">
<para vAlign="middle"/>
<value>
<text xliff:rid="1652FE36-E1B6-4408-BE8D-7C59B7610698">Publish_date</text>
</value>
</caption>
<bind match="dataRef" ref="$.publish_date"/>
</field>
<field name="description" w="186.325mm" h="19.1mm" y="18mm" x="0mm">
<ui>
<textEdit multiLine="1">
<border>
<edge stroke="lowered"/>
</border>
<margin/>
</textEdit>
</ui>
<font typeface="Arial"/>
<margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
<para vAlign="middle"/>
<caption reserve="25mm">
<para vAlign="middle"/>
<value>
<text xliff:rid="0F105354-509D-47EF-A1FB-D3C573E34F8C">Description</text>
</value>
</caption>
<bind match="dataRef" ref="$.description"/>
</field>
<bind match="none"/>
<keep intact="none"/>
<?templateDesigner expand 1?></subform>
<keep intact="contentArea"/>
<?templateDesigner expand 1?></subform>
<keep intact="none"/>
<occur min="0" max="-1"/>
<bind match="dataRef" ref="$.book[*]"/>
<event activity="initialize" name="event__initialize">
<script contentType="application/x-javascript">if (this.dataNode.id.value === "bk102") {
this.presence = "hidden"
}
</script>
</event>
<?templateDesigner expand 1?></subform>
<proto/>
<desc>
<text name="version">11.0.9.20190919.2.937362.934558</text>
</desc>
<?templateDesigner Hyphenation excludeInitialCap:1, excludeAllCaps:1, wordCharCnt:7, remainCharCnt:3, pushCharCnt:3?>
<?templateDesigner expand 1?>
<?renderCache.subset "Arial" 0 0 ISO-8859-1 4 92 23 00240027002A002B002C00330037004200440045004600470048004B004C004F0051005200530055005600570058ADGHIPT_abcdehilnoprstu?></subform>
<?templateDesigner DefaultPreviewDynamic 1?>
<?templateDesigner Grid show:1, snap:1, units:0, color:ff8080, origin:(0,0), interval:(125000,125000)?>
<?templateDesigner WidowOrphanControl 0?>
<?templateDesigner SavePDFWithLog 0?>
<?templateDesigner Zoom 75?>
<?templateDesigner FormTargetVersion 33?>
<?templateDesigner DefaultLanguage JavaScript?>
<?templateDesigner DefaultRunAt client?>
<?acrobat JavaScript strictScoping?>
<?PDFPrintOptions embedViewerPrefs 0?>
<?PDFPrintOptions embedPrintOnFormOpen 0?>
<?PDFPrintOptions scalingPrefs 0?>
<?PDFPrintOptions enforceScalingPrefs 0?>
<?PDFPrintOptions paperSource 0?>
<?PDFPrintOptions duplexMode 0?>
<?templateDesigner DefaultPreviewType print?>
<?templateDesigner DefaultPreviewPagination simplex?>
<?templateDesigner XDPPreviewFormat 19?>
<?templateDesigner DefaultPreviewDataFileName .\books.xml?>
<?templateDesigner DefaultCaptionFontSettings face:Arial;size:10;weight:normal;style:normal?>
<?templateDesigner DefaultValueFontSettings face:Arial;size:10;weight:normal;style:normal?>
<?templateDesigner SaveTaggedPDF 0?>
<?templateDesigner SavePDFWithEmbeddedFonts 0?>
<?templateDesigner Rulers horizontal:1, vertical:1, guidelines:1, crosshairs:0?></template>
<config xmlns="http://www.xfa.org/schema/xci/3.0/">
<agent name="designer">
<!-- [0..n] -->
<destination>pdf</destination>
<pdf>
<!-- [0..n] -->
<fontInfo/>
</pdf>
</agent>
<present>
<!-- [0..n] -->
<pdf>
<!-- [0..n] -->
<fontInfo>
<embed>0</embed>
</fontInfo>
<tagged>0</tagged>
<version>1.7</version>
<adobeExtensionLevel>8</adobeExtensionLevel>
</pdf>
<common>
<data>
<xsl>
<uri/>
</xsl>
<outputXSL>
<uri/>
</outputXSL>
</data>
</common>
<xdp>
<packets>*</packets>
</xdp>
</present>
</config>
<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
<xfa:data xfa:dataNode="dataGroup"/>
<dd:dataDescription xmlns:dd="http://ns.adobe.com/data-description/" dd:name="catalog">
<catalog>
<book id="9b3ad547-245b-11ea-9f22-dcfe07240c1c" dd:maxOccur="-1">
<author/>
<title/>
<genre/>
<price/>
<publish_date/>
<description/>
</book>
</catalog>
</dd:dataDescription>
</xfa:datasets>
<connectionSet xmlns="http://www.xfa.org/schema/xfa-connection-set/2.8/">
<xmlConnection name="DataConnection" dataDescription="catalog">
<uri>D:\designer-projects\books.xml</uri>
<?templateDesigner fileDigest shaHash="y+WNrSUJnQ2RlPV58GbIsuizrfE="?></xmlConnection>
</connectionSet>
<localeSet xmlns="http://www.xfa.org/schema/xfa-locale-set/2.7/">
<locale name="de_DE" desc="Deutsch (Deutschland)">
<calendarSymbols name="gregorian">
<monthNames>
<month>Januar</month>
<month>Februar</month>
<month>März</month>
<month>April</month>
<month>Mai</month>
<month>Juni</month>
<month>Juli</month>
<month>August</month>
<month>September</month>
<month>Oktober</month>
<month>November</month>
<month>Dezember</month>
</monthNames>
<monthNames abbr="1">
<month>Jan</month>
<month>Feb</month>
<month>Mrz</month>
<month>Apr</month>
<month>Mai</month>
<month>Jun</month>
<month>Jul</month>
<month>Aug</month>
<month>Sep</month>
<month>Okt</month>
<month>Nov</month>
<month>Dez</month>
</monthNames>
<dayNames>
<day>Sonntag</day>
<day>Montag</day>
<day>Dienstag</day>
<day>Mittwoch</day>
<day>Donnerstag</day>
<day>Freitag</day>
<day>Samstag</day>
</dayNames>
<dayNames abbr="1">
<day>So</day>
<day>Mo</day>
<day>Di</day>
<day>Mi</day>
<day>Do</day>
<day>Fr</day>
<day>Sa</day>
</dayNames>
<meridiemNames>
<meridiem>vorm.</meridiem>
<meridiem>nachm.</meridiem>
</meridiemNames>
<eraNames>
<era>v. Chr.</era>
<era>n. Chr.</era>
</eraNames>
</calendarSymbols>
<datePatterns>
<datePattern name="full">EEEE, D. MMMM YYYY</datePattern>
<datePattern name="long">D. MMMM YYYY</datePattern>
<datePattern name="med">DD.MM.YYYY</datePattern>
<datePattern name="short">DD.MM.YY</datePattern>
</datePatterns>
<timePatterns>
<timePattern name="full">H:MM' Uhr 'Z</timePattern>
<timePattern name="long">HH:MM:SS Z</timePattern>
<timePattern name="med">HH:MM:SS</timePattern>
<timePattern name="short">HH:MM</timePattern>
</timePatterns>
<dateTimeSymbols>GjMtkHmsSEDFwWahKzZ</dateTimeSymbols>
<numberPatterns>
<numberPattern name="numeric">z,zz9.zzz</numberPattern>
<numberPattern name="currency">z,zz9.99 $</numberPattern>
<numberPattern name="percent">z,zz9%</numberPattern>
</numberPatterns>
<numberSymbols>
<numberSymbol name="decimal">,</numberSymbol>
<numberSymbol name="grouping">.</numberSymbol>
<numberSymbol name="percent">%</numberSymbol>
<numberSymbol name="minus">-</numberSymbol>
<numberSymbol name="zero">0</numberSymbol>
</numberSymbols>
<currencySymbols>
<currencySymbol name="symbol">€</currencySymbol>
<currencySymbol name="isoname">EUR</currencySymbol>
<currencySymbol name="decimal">,</currencySymbol>
</currencySymbols>
<typefaces>
<typeface name="Myriad Pro"/>
<typeface name="Minion Pro"/>
<typeface name="Courier Std"/>
<typeface name="Adobe Pi Std"/>
<typeface name="Adobe Hebrew"/>
<typeface name="Adobe Arabic"/>
<typeface name="Adobe Thai"/>
<typeface name="Kozuka Gothic Pro-VI M"/>
<typeface name="Kozuka Mincho Pro-VI R"/>
<typeface name="Adobe Ming Std L"/>
<typeface name="Adobe Song Std L"/>
<typeface name="Adobe Myungjo Std M"/>
<typeface name="Adobe Devanagari"/>
</typefaces>
</locale>
</localeSet>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c015 81.161580, 2017/12/01-01:38:21 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:desc="http://ns.adobe.com/xfa/promoted-desc/" rdf:about="">
<xmp:MetadataDate>2019-12-22T01:56:28Z</xmp:MetadataDate>
<xmp:CreatorTool>Adobe LiveCycle Designer 11.0</xmp:CreatorTool>
<pdf:Producer>Adobe LiveCycle Designer 11.0</pdf:Producer>
<xmpMM:DocumentID>uuid:32411a72-54fe-426f-bf91-41b830c70c80</xmpMM:DocumentID>
<desc:version rdf:parseType="Resource">
<rdf:value>11.0.9.20190919.2.937362.934558</rdf:value>
<desc:ref>/template/subform[1]</desc:ref>
</desc:version>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta></xdp:xdp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment