5440b4ccf5796778b6a65186bf83c17970f00d7a markd Sun Aug 16 18:43:46 2026 -0700 Support PDF output in hgRenderTracks via hgt.psOutput. refs #38118 hgRenderTracks had PDF output wired up behind a compile-time PDF_OUTPUT define that was set to 0, so it could only be reached by editing and rebuilding. Select it at runtime with hgt.psOutput=on instead, which is the same variable the hgTracks View->PDF menu item already uses. PNG remains the default. Also return from handlePostscript after doTrackForm when trackImgOnly is set. In that case makeActiveImage has already converted the eps, written the PDF to stdout and unlinked the eps, so the convertEpsToPdf that follows aborted on the missing file. The client never saw it because the PDF was already flushed and hPrintDisable swallowed the error page, but every request logged "Couldn't open ... .eps" to the apache error log. Document the new parameter in the hgRenderTracks section of customTrackText.html and in the hgRenderTracks tip in allTipsRaw.html. diff --git src/hg/htdocs/goldenPath/help/customTrackText.html src/hg/htdocs/goldenPath/help/customTrackText.html index 3ce64154fb3..efc6312604c 100755 --- src/hg/htdocs/goldenPath/help/customTrackText.html +++ src/hg/htdocs/goldenPath/help/customTrackText.html @@ -810,30 +810,35 @@
Step 3. Provide the URL to others
If you created a session, that stable link can be freely shared.
Otherwise, to upload a custom annotation track from a URL into the Genome Browser, paste the URL into the large text edit box on the Add Custom Tracks page, then click the Submit button.
For integration into your own website e.g. in an html IFRAME, you can obtain the track image only, without the rest of the genome browser user interface, by replacing hgTracks in the URL with hgRenderTracks, such as in this example:
http://genome.ucsc.edu/cgi-bin/hgRenderTracks?db=hg19&position=chr9%3A136130563-136150630
+hgRenderTracks returns a PNG image by default. Add hgt.psOutput=on, the same parameter
+used by the View then PDF menu item, to get a scalable PDF instead:
http://genome.ucsc.edu/cgi-bin/hgRenderTracks?db=hg19&position=chr9%3A136130563-136150630&hgt.psOutput=on
+If you'd like to share your annotation track with a broader audience, send the URL for your track—along with a description of the format, methods, and data used—to the UCSC Genome mailing list genome@soe.ucsc.edu.
A special blog post discusses and provides examples of many of these parameters such as
hgct_customText=<url>, db=<databaseName>,
hubUrl=<url>, and genome=<databaseName> to attach
custom tracks, track hubs, assembly hubs, and even track hubs to assembly hubs, all in a
single URL. Read an overview of ways to share Genome Browser data views in the