The Link Importer in eMagStudio lets you import the links in your PDF file into your eMag, by analyzing the PDF and its text content converting found links to active links in eMagStudio.

The Link Importer allows you to style your links with a variety of options, and also supports many advanced features, including the option to search the text of your eMag using simple wildcard search patterns or even advanced regular expressions, automatically marking up text that matches these patterns with custom links.

Basic Link Import

For a quick introduction to the basic functions of the link importer, we recommend that you watch this video.

Advanced Link Import

The advanced functions of the Link Importer can be accessed by clicking the "Settings" button, next to the "Advanced Links" label. This will open the Advanced Link Settings dialog, which contain the following functions:

  • Search Patterns

The Search Patterns area allows you to work with several search patterns at the same time. Search patterns can be created and deleted, and by selecting individual search patters from the drop-down selector you can edit each one individually. When the Link Importer imports links, it will run each search pattern defined against the text of the PDF.

  • Properties

The Properties area lets you define the top-level properties of your search pattern. Each pattern must have a name for your reference, and can be of either the "Simple Search" or "Regular Expression" kind determining how your PDF will be searched for potential matches. Below you can see an overview of each of these methods:

  • Simple Search Settings

The Simple Search allows you to scan the text of your eMag using a normal search algorithm looking for matches to whatever you type in the "Find:" field. The Simple search also supports using a wildcard character like * (representing any number of arbitrary characters) and ? (representing a single arbitrary character), and can be set to run in Case Sensitive or non Case Sensitive mode.

  • Resulting Links (Simple Search)

Links imported using the Simple Search method can be marked up in one of two methods: As external or internal links. External links will send the reader to the URL defined in the "URL" field, and the Internal link option will send the user to the page number in the publication set in the "Page" box.

  • Regular Expression Settings

The Regular Expressions Settings makes it possible to search the PDF using an advanced Regular Expression engine. Making use of this system requires a strong understanding of how Regular Expressions work, and how they can be used to identify character patterns. For more information on regular expression we recommend visiting this site which contains lots of great tutorials and documentation on how to use regular expressions. The regular expression engine employed by eMagStudio follows the standard Java implementation of RegExp (see here), and expressions built for Java will generally work well in eMagStudio.

  • Resulting Links (Regular Expression)

The Resulting Links section is where the real strength of the Regular Expression search comes into play. Using advanced variables and CSV lookup, you can automatically markup large e-commerce catalogs using a database of part-numbers, or convert product name into product searches on your website with very little work for even very large catalogs. Links can be created using two different methods: "Regular Expression" or "CSV", each representing different approaches to creating the links based on the search settings you defined in the "Regular Expression Settings":

  • Links from Regular Expressions

When creating links directly using Regular Expression, you can make use of backreferences to access the entire result of your search, or individual groups (if you created a grouped pattern). We recommend forming a strong understanding of the core concepts of grouping and backreferencing before attempting to use these features (see here). The URL and Page fields both support the use of the $X syntax described here to access the full regexp result or individual groups. For instance $0 represents the full result of the RegExp search, while $2 only represents the second group (if such exists)

  • Links from CSV

Importing Links from CSV files further expand on the capabilities of the RegExp import function, by letting you do a look-up of any of the $X search results in the first column of a local or online CSV file, and use the data in the corresponding columns of the matching row to create your links. To use the CSV import function, start by loading a CSV file defining what search result should be used for the look-up. Once this is done, you can use the special look-up result variables in your resulting URL or Page links by using the $CSVX variable system, with X representing the desired column in the CSV file.

  • Link Target and Tooltip

In the Link Target and Tooltip section, you can define the specifics of how you would like your link to be opened by eMagStudio when the eMag is read online, and how Tooltips should be generated for the links. The tooltip field also supports numbered group search results as well as CSV lookup variables (when applicable).