Docusign API - Setting margins for HTML documents - docusignapi

I'm working on integrating a PHP app with the DocuSign REST API. I'm creating new documents from HTML, similar to document 1 in the example here. The structure comes through just fine, but the margins on the resulting document are way too wide for my purposes, and I can't find a way to set them to a custom value. It seems to ignore the margins on my HTML body and just set it to a default of 1 inch.
Normally if you create a document using a pdf for example, the custom margins on the pdf would be used, so it seems like there should be some way to do this for HTML. Am I missing something?

I would try a negative value for the outermost div's margin value. Eg
<div style="margin:-2em;">
<p>Blah blah blah</p>
</div>

Related

How to display default text when translation is missing using jhiTranslate

in JHipster application I want to display a default text within a html element when a translation is missing.
I use angular ngFor directive to display elements in an array, some of which have a translation and some of which are inserted by a user, and therefore have no translation in i18n json. I couldn't find any documentation that explained how to use jhiTranslate
I was thinking about syntax like this
<div jhiTranslate="example.1">Default Text</div>
and if this particular translation was missing a "Default Text" would be shown. for now it shows "translation-not-found[example.1]".
Is there a way to achieve this using jhiTranslate?

Is there a way how to adjust HTML generated by xPage from document rich text field?

Is there a way how to adjust HTML generated by xPage from document rich text field? I have q document from which the rich text field content is displayed on xPage using computed text control. Solution works nice except, that xPages engine generates strange HTML from the rich text field. When displaying page on web using standard form, all texts written by default font and default size doesn't contain markup arround so on could use CSS to style it. Not this way in xPages. Everything have tag around and its not funny seeing generated font tag around the div tag :-(
<div class="tcl-columns3-in">
<font size="2" face="sans-serif"></font>
<font size="2" face="sans-serif">
<b>Header text ...</b>
</font>
<font size="2" face="sans-serif">
<div class="tcl-box-outlined">
text ...<br>
</div>
</font>
</div>
Is there a way how to get rid of out of generated HTML?. I looked to html filtering option with ASF filter but it requires to adjust settings on filesystem, which not option for me ...
There are a number of steps you narrow down your problem. RichText -> MIME -> RichText is not a problem free relationship. As Carl pointed out, you can have a look at the raw RichText -> Mime conversion result. Does that look OK? Then you could use a Dijit ContentPane to pull that content in.
It also depends on what control you use to display the content. You might have different success with textbox and RichText editor. If you look for very high fidelity you either store your RT as mime (a property of a RT field) or use Coex Edit a commercial server plug-in
use a computedField in your Xapge, and set the value to something like this
var rt = document1.getDocument().getFirstItem("Body");
return rt.getUnformattedText()
using this technique you can also format the content the way you like as it is all text. I use this to display colored and formatted json and xml

Display content part in Orchard

I would like to be able to specify exactly where a ContentPart is rendered in a view.
For example, in my Content.Summary.cshtml I want to wrap my title and first image from the gallery (I'm using ZenGallery) in an anchor tag. I thought I would be able to do it like this but the gallery template is not rendered.
<a href="#Url.ItemDisplayUrl((IContent)Model)">
<h2>#Model.ContentItem.TitlePart.Title</h2>
#Display(Model.ContentItem.ZenGalleryPart)
</a>
But if I do the following then the gallery template (ZenGallery.Summary.cshtml) is shown along with all other parts.
#Display(Model.Content)
I understand that the recommended way to do this is probably using Placement.info, is that right? But this way makes more sense to me and would allow for more fine grain control of the end markup. How could I achieve the markup I'm looking for?
This should give you a pretty good start on doing precisely what you want: http://weblogs.asp.net/bleroy/archive/2011/07/31/so-you-don-t-want-to-use-placement-info.aspx

web part title in xsl

I'm investigating a possible solution where all web parts on my page should be rendered without a chrome, meaning that the default title portion of the web part will be hidden, but the title supplied in the web part properties should be used elsewhere in the web part.
I have found several solutions on how to get the page title but none around how I can crab the web part title and display it using Xsl, would like to return this within the ItemStyle.xsl
I used a method of return the raw xml data for the web part, but by default is the title of the web part not return, and I found no reference other than OuterTemplate.GetTitle() which points to the Title column of a list, to support my solution.
Is this possible?
It is probably not accessible through the xsl itself, as the title of the webpart is not part of the xml data coming through. If you really need it, you could show it on the page and use JQuery/Javascript to scrape it off. Otherwise, I might find a different way to provide the name, maybe with a query parameter.

SharePoint 2007 - How To Change Attachment Paperclip Image

When a list item has an attachment, SharePoint automatically renders a paperclip image for that particular row, which indicates that the item has an attachment. Is there any way to change the image that is rendered?
The site is in a shared hosting environment, so I can't simply replace the image on the file system. Also, there are other lists that are part of the same site that should use the default image.
Is there any way to change the image that is rendered for items with an attachment on an individual list basis?
EDIT: Following is the HTML that is rendered:
<td class="ms-vb2">
<img align="absbottom" src="http://devsandbox/_layouts/images/attach.gif" alt="Attachment"/>
</td>
The only real way you'll be able to do this is to use jQuery (or some other javascript library). You'll need to locate the elements you want to update on the page and change the URL's
$('img[src*=attach.gif]').each(function() {
$(this).attr('src', '/path/to/new/image.png');
}
My jQuery may be a touch wrong but that should be near enough to give you an idea of what to do
Edit - The best way to have this down would be via a custom WebPart which renders the JavaScript. This way it can easily be dropped into any page you want
i don't know which element off the top, but I would look for it in one of the stylesheets and use SharePoint designer to do the replacement work for a specific list.
Use Firebug to inspect the element that you want to revert. This will tell you the css class and other properties used by that element. Then write your own class and add it to the core.css file or if you want, add it to the css for the Site/Site Collection through the MasterPages link in Site Settings.
EDIT
I used firebug to look at an image in SharePoint and here is how it is rendering.
<img id="img_1-2_" class="rpo-gif rpo-gif-2" border="0" style="padding: 0px;" alt="Expand/Collapse" src="/_layouts/images/minus.gif"/>
As you can see it is using a class and setting a src to '/_layouts/images/minus.gif'. Well you can go find that file in the 12Hive directory and then replace it with an image of your choice that has the same name.

Resources