Skip to content

Instantly share code, notes, and snippets.

@jraps20
Last active October 24, 2017 03:44
Show Gist options
  • Save jraps20/7e6fe5becaacaa816bac82e2aa19ad79 to your computer and use it in GitHub Desktop.
Save jraps20/7e6fe5becaacaa816bac82e2aa19ad79 to your computer and use it in GitHub Desktop.
Config file for use in Sitecore PDF Generation
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<getScreenShotForURL>
<!-- Disable security check -->
<processor type="Sitecore.ContentTesting.Pipelines.GetScreenShotForURL.CheckDisabler, Sitecore.ContentTesting">
<patch:delete />
</processor>
<!-- Disable setting of Experience Editor URL Parameters that cause a redirect to Sitecore login -->
<processor type="Sitecore.ContentTesting.Pipelines.GetScreenShotForURL.PopulateUrlParameters, Sitecore.ContentTesting">
<patch:delete />
</processor>
<!-- Patch in processor to add timeout to rendering of Screenshot to ensure everything loads properly -->
<processor type="MyLibrary.GetScreenShotForURL.AddTimeoutToScript, MyLibrary"
patch:after="*[@type='Sitecore.ContentTesting.Pipelines.GetScreenShotForURL.RenderScripts, Sitecore.ContentTesting']">
<!-- Adjust to ensure images load properly -->
<Timeout>2000</Timeout>
</processor>
<!-- Patch in processor to generate PDF -->
<processor type="MyLibrary.GeneratePdf, MyLibrary" />
</getScreenShotForURL>
</pipelines>
</sitecore>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment