I am evaluating Docusign API to automate document signing process.
I see that we need to add Tabs, Anchor tags and provide with the X,Y coordinates/offsets to place the signatures. Is there a easier way to do this. I was wondering if I can add embed this information within my document so that recipient can see this while signing.
Really appreciate any advice.
Thanks
N
With the DocuSign API you have two main methods of positioning your Stick-eTabs. One method is through Absolute positioning, where you use X and Y coordinates to place your tabs at specific locations on the document(s). The other method is through Relative or Anchor Based positioning, where tab placement is based on actual document content.
For instance, you could use Absolute positioning to place a signature tab at a location 200 pixels to the right, and 100 pixels down from the top left of the document using the following (partial) JSON body:
"tabs": {
"signHereTabs": [
{
"xPosition": "200",
"yPosition": "100",
"documentId": "1",
"pageNumber": "1",
}
]
}
On the other hand, if you wanted to use Relative positioning you can actually place any tab at a location based on document content. For instance, if you had the text "Please Sign Here" somewhere in your document, you can place any tag right on or near this text very easily. You could place a signature tab 1 inch to the right, or an initial tab 5 pixels to the left and 10 pixels down, or a date tab 1 cm up and 2 cms to the right, for example. To do this you could use the following JSON to define your tab(s):
"tabs": {
"signHereTabs": [
{
"anchorString": "Please Sign Here:",
"anchorXOffset": "1",
"anchorYOffset": "0",
"anchorIgnoreIfNotPresent": "false",
"anchorUnits": "inches"
}
]
}
The above example would place a signature tab 1 inch to the right and at the same height as the text "Please Sign Here". One common approach that many developers take here is to embed content into the documents themselves such as the string \s1 for example. They additionally set the font color to the same color as the background where the string is placed (usually white) and this in turn makes the string \s1 invisible so that the recipient only sees the DocuSign tab at this location. For more information on this and absolute vs. relative tagging please read the Tab Positioning page on the Stick-eTabs features section.
Related
I'm using the API to set the signature area. Right now with the acnhorString I can set the area based on this text. Up to here everything ok.
But I need to do this with existing PDF document and have no opportunity to edit or put place holder text/pdf field. Thus how can we dynamically position the tab (signature field) at desired position.
I was following this documentation ->
https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/
https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs/auto-place/
https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs/
If you do this instead:
documentId : "1",
pageNumber : "1",
xPosition : "100",
yPosition : "100"
You can place it by picking the document, page and exact pixel position.
While I mostly use Sublime Text (with the Vintageous plugin) I'm trying to adopt Vim-style practices into my workflow. As you might expect, I'd like to learn how to more quickly jump around a document to edit its content.
For example, let's say I want to jump around and edit the ID values in a JSON file or perhaps jump from the first line of the document down to edit the first name of Gale Gomez.
I understand some of the basic commands like 'change inside quotes' (ci") or 'change word' (cw), I'm hoping to get better at page navigation.
Thoughts or suggestions?
{
"id": 5,
"firstName": "Jayne",
"lasttName": "Norris",
"email": "jaynenorris#talae.com"
},
{
"id": 6,
"firstName": "Gale",
"lasttName": "Gomez",
"email": "galegomez#talae.com"
},
{
"id": 7,
"firstName": "Garner",
"lasttName": "Crane",
"email": "garnercrane#talae.com"
},
{
"id": 7,
"firstName": "Gill",
"lasttName": "Carter",
"email": "gillcarter#talae.com"
},
{
"id": 8,
"firstName": "Evans",
"lasttName": "Douglas",
"email": "evansdouglas#talae.com"
}
To jump to the next ID and edit it:
/"id<return>3wcw
(searches for string "id, goes forward 3 words, then edits the next word, which is the ID's value)
To edit another ID:
n3wcw
(repeats the last search with “n”, then same as before)
Go to the first line of the document:
gg
Change first name of Gale Gomez:
/Gale<return>cw
(searches for “Gale”, then edits it)
And don't forget * to search the word under the cursor (for example id in your case), then n for next occurrence, N for previous occurrence.
# is the same as *, only it searches backward. Actually, I never use that.
If you press / and then <UP> and <DOWN>, then <CR>, you can select and repeat one of your previous searches.
And sometimes when a search hits the last line of the window you may wish to type zz to scroll the window so that the current line will be in the middle of it and you will see some lines below.
Also, you can press % while over an opening/closing parenthesis to jump to the corresponding closing/opening parenthesis.
1) I am currently using Anchor Tagging in my application.
2) The tab definition I am using is as follows
"tabs": {
"signHereTabs": [{
"anchorString": "Please Sign Here:",
"anchorXOffset": "1",
"anchorYOffset": "0",
"anchorIgnoreIfNotPresent": "false",
"anchorUnits": "inches"
}]
}
3) Given that 'anchorXOffset' is always computed from starting point of the 'Anchor string', I am currently facing an issue in which the Anchor string is getting overlapped by the signature tab.
4) This means that depending on the 'font size' of my 'anchor string' the 'signature tag' may or may not overlap the 'anchor string'
5) QUESTION : Is there any way such that 'anchorXOffset' is computed from end point of the 'anchor string'?
If Not, is there any way where we can place the 'signature tab' dynamically with respect to the 'Anchor string', such that the font size of the 'anchor string' does not affect the positioning of 'signature tab' and 'anchor string' is not overlapped by the 'signature tab'?
DocuSign doesn't know the layout or font sizes of the source documents, so the answer to your question is no.
What I'd suggest is that you place the anchor string directly adjacent to the label for the tag. That way if the font size of the label string is changed, the anchor string will be re-positioned too.
I realize that since the anchor string is invisible to the casual source document owner, they might mess up the anchor string when updating the document.
Another solution is to first make the source documents using PDF Form fields. The form fields can then be converted to tags. But using Acrobat or similar to create/manage the source documents is obviously more difficult and expensive than using Word or similar.
I have a font in both .otf and .ttf format. I'd like to use it on my Apple News article, but I keep getting the error Error: Custom font (postscript name=CustomFontName) not available. I know the JSON is correct because it works if I use a standard font. I've included the font in the same folder as article.json, but beyond that I can't find any documentation on how to do this.
I see no mention of custom fonts in the Apple News Format guidelines. It states in the docs:
fontName: The PostScript name of the font to apply, such as GillSans-Bold. You
can reference any font by name. see iOSfonts.com for a list of available fonts.
and elsewhere:
Fonts News supports all iOS system fonts except San Francisco, which
was introduced with iOS 9.
which originally led me to believe that it was being implied that custom fonts don't work, but experimenting with the format I see that my assumption was wrong.
Copying the PostScript name of the font (see info panel in OS X Font Book) and placing the font within the same folder as article.json file it works. But make sure if you're going to apply emphasis that you include the relevant italic or bold variants as well.
The fonts I used were open type true type from Google Fonts. You can get the exact ones from that link. I included Roman and Italic variants in my folder and referenced the font by calling it "IM_FELL_DW_Pica_Roman" within the Component Text Styles (i.e. paragraph styles). When I then applied markdown to identify italic text it automatically found the italic variant. I didn't need to reference the italic version separately (i.e. within inline text styles).
Here's my code:
{
"version": "1.1",
"identifier": "sketchyTech_Demo",
"title": "My First Article",
"language": "en",
"layout": {},
"components": [{
"role": "title",
"text": "My First Article",
"textStyle": "titleStyle",
"inlineTextStyles": [{
"rangeStart": 3,
"rangeLength": 5,
"textStyle": "redText"
}]
}, {
"role": "body",
"format": "markdown",
"text": "This is just over the minimum amount of _JSON_ required to create a valid article in Apple News Format. If you were to delete the dictionary enclosing this text, you'd be there.",
"textStyle": "bodyStyle"
}],
"componentTextStyles": {
"titleStyle": {
"textAlignment": "center",
"fontName": "HelveticaNeue-Bold",
"fontSize": 64,
"lineHeight": 74,
"textColor": "#000"
},
"bodyStyle": {
"textAlignment": "left",
"fontName": "IM_FELL_DW_Pica_Roman",
"fontSize": 18,
"lineHeight": 26,
"textColor": "#000"
}
},
"textStyles": {
"redText": {
"textColor": "#FF00007F"
}
}
}
(Note: Trying to add bold it silently fell back on italic because the relevant font wasn't available.)
One final thing I would say is that the use of custom fonts appears to be undocumented although it works. Therefore, it won't necessarily be the case (unless you've seen confirmation elsewhere) that Apple will accept the use of custom fonts when you upload.
There are some useful tips on how to get the actual name of your custom font in this answer - it isn't always what you'd expect. The same rules apply to the Apple News ecosystem.
Your font definition should look like this:
"fontName": "Raleway-ExtraLight"
I've got an index of hundreds of book titles in elasticserch, with documents like:
{"_id": 123, "title": "The Diamond Age", ...}
And I've got a block of freeform text entered by a user. The block of text could contain a number of book titles throughout it, with varying capitalization.
I'd like to find all the book titles in the block of text, so I can link to the specific book pages.
Any idea how I can do this? I've been looking around for exact phrase matches in blocks of text, with no luck.
You need to index the field title as not_analyzed or using keyword analyzer.
This will tell elasticsearch to do no operations on the field whenever you send a query and this will make you be able to do an exact match search.
I would suggest that you keep an analyzed version as well as a not_analyzed version in order to be able to do exact searches as well as analyzed searches. Your mappings would go like this, in this case I assume that the type name is movies in your case.
"mappings":{
"movies":{
"properties":{
"title":{
"type": "string",
"fields":{
"row":{
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
}
This will give you two fields title which contains an analyzed title and title.row which contains the exact value indexed with absolutely no processing.
title.row would match if you entered an exact