Switching a artistic force web page right into a Word Document

Switching a artistic force web page right into a Word Document

Therefore I’ve been doing a bit of Salesforce development and Visualforce that is using I’ve attempting to develop a term document. Sounds not difficult, but that you run into all sorts of issues if you’ve tried it you know.

Salesforce features this great thing with visualforce pages where you could make it as a PDF but, to produce a term document you've still got to do it the conventional method and set this content type to application/msword, just like you'd from the html page that is regular.

Issue # 1 had been that the document would open with Internet n’t Explorer. It worked good in Firefox and Chrome and Safari and [insert new internet web web browser right here], but in IE it can appear asking in the event that you desired to start or conserve the document. All is well so far. Then nothing would happen if you clicked Open it would appear to be doing what its supposed to do but. Term performedn’t available and no error was got by you message. Odd. In the event that you clicked Save it can provide you with a mistake message saying it couldn’t start the page or something like that. Crap.

Solution # 1. To fix this problem I’ve found that you'll want to set that is cache=”true the label.

Issue # 2 had been that We would have to be in a position to place page pauses within the document at particular things and, being unsure of just what will be into the document until it absolutely was really produced made that rather hard. Used to do the typical google search and there have been all kinds of responses that seemed great but not one of them really worked…..until We tried one example that is last. This 1 worked perfectly for me personally.

Solution number 2. To fix this nagging problem i had a need to just add this tag wherever i desired truth be told there to be a web page break.

Today the just problem that I’m left with is I can’t get web web page figures to be placed in to the document (SOLVED: see the Update below) and I also can’t have it to open up in publications see. We have a remedy this is certainly likely to work, and it also does work with a html that is regular not in Visualforce. The matter i do believe is the fact that visualforce web page you don’t have the label when you look at the signal to include the schemas that is proper. We will upgrade this if I determine the problem.

Additionally, if anybody has actually any queries on how to obtain a footer or header in to the word document, or other things I will do my best to help that I may be able to help with please leave a comment and.

ENHANCE (for Ryan):

To place the header and footer in to the doctor there isn't any “GOOD” solution that I'm able to discover regrettably. The solution that is best I’ve been able to find out nevertheless departs you with an additional “header/footer” from the last web web web page of the document that you've to remove.

It is possible to proceed with the measures right right right here. The situation with this particular hack is that you must place the header/footer someplace in your articles human anatomy in order to make use of it like a header/footer. I place it at the end of the document regarding the final web page so it is kind of out-of-the-way. Today i ought to point out I used that I only added a footer, no header but, this is basically the code.

—YOUR REGULAR CONTENT HERE—

It has a picture within the footer also, which works for myself. Two things in regards to the image url. The image is had by me kept in Salesforce like a document (.png) along with to make certain that the Externally obtainable Image checkbox is examined. The url should really be similar to:

To obtain the url for the image it is possible to go directly to the document in salesforce and right-click in the image and choose properties. Regarding the properties web web page it'll have “Address (URL)”, http://www.essay-writing.org/ you won’t have the ability to look at entire target but then you can right-click and select copy which will give you the whole thing if you double-click on it, the whole address will be highlighted.

When it comes to conserving it, I’m perhaps perhaps not yes when you're attempting to conserve it you can do this that it’s saving as html but, in your apex page tag:

This may set the document title to anything you desire while the type to .doc, So when the doc is saved by you it must be preserving being a .doc type.

ENHANCE:

I’ve finally managed, after some time far from it, to obtain the web web web page figures to get results into the footer.

Previously, from signal we saw on another web site, I happened to be placing with regards to must have only been with no dual estimates.

כתיבת תגובה

תפריט

×