Have searched help etc but cannot find. I want to include a "Print this page" command on a web page, typically to download an application form. Terry
Printable View
Have searched help etc but cannot find. I want to include a "Print this page" command on a web page, typically to download an application form. Terry
Terry, the simplest if the form is the web page is to have a button "Print this page" with a web link of javascript:window.print();.
If you want a genuine download link then that is a different kettle.
Simplest would be to create a rectangle Placeholder with body code of <a href="index_htm_files/151by6 source.pdf" download="fred";>Download this form!</a>.
The PDF would have to be dragged onto the page as a link for Xara to know about it.
This only works on modern browsers, otherwise it just opens the form.
Acorn
I would use a .pdf with the necessary link to it. You could add a short instructions text box for those that are computer challenged and even include a link to a reader such as Foxit or Adobe. Most modern browsers will guide the user once a link is clicked, so the user can choose to download the form or open the form if the browser is not configured to open it within the browser. I personally don't want a button that automatically prints a .pdf or any other document until I have seen it as some files have blank pages or unneeded pages and I can choose which page(s) to print. Just my way of working with forms but it does work and Xara / Magix makes it easy to add the link - no coding necessary.
Acorn The simplest form is exactly what I wanted and believe it or not I have got it working. Many thanks as normal. Terry
Thanks for the reply, as you can see I have used the simplest solution as per Acorn's reply. However I don't think my terminology refers to the "forms" as you know it. We have a pre printed application form that has to be posted back to us with other documents. Apologies if my statement was confusing. However I think your instruction will be needed in the future. Terry
Had to abandon the "Print Page" option for now. I could only get it to work correctly with Edge. Chrome, IE and Firefox printed offset and small, have I missed something.
Pleased that it printed but not any good if it is not correct. Terry
Thanks for coming back to me, as most of the site is working well, I will come back to this problem later. Terry
All pages on the site are displaced to the right. I have had to attach the complete site because I did not know how or if I could attach a single page. The particular page I'm interested in callers to print is the "Seniors Open". When I go to other sites their "Print Page" comes out perfectly OK, whatever browser I'm using so I assume it is my error. Any ideas please.
Further question how do I delete captured images in the "File Upload Manage" Terry
Terry, part of a solution for you to try.
change the link tothe problem with Xara centring web pages is he left margin becomes part of the printed page and is therefore dependent on the width of the browser at the time. If the browser has a horizontal scrollbar then the whole page is placed nicely.Code:javascript: var pWindow = window.open(window.location, "Print Window", "width=840,height=1400", "toolbar=no,scrollbars=no,resizable=no,top=100,left=100"); pWindow.print();
This fix open a new window to such a width and then enables the print.
Acorn
Try this tweak, which should close the pop-up after 10 seconds if the print is cancelled or committed.
AcornCode:javascript: var pWindow = window.open(window.location, "Print Window", "width=840,height=1400", "toolbar=no,scrollbars=no,resizable=no,top=100,left=100"); pWindow.print();void(setTimeout('pWindow.close()',10000));
Thanks Acorn. I think we/you are nearly there, my page I think needs some tweeks but haven't time to finish tonight, it is printing centrally but has rubbish amongst it, will sort tomorrow. Thanks for your help.
Terry
Apologies Acorn but I cannot get it to work. The print option appears once, with the page having spurious items on it, then it just stops working. Tried various tweaks but still struggling. Terry
Terry, both work on my browsers with your site. The length of your current page is force a two-page print. Only Edge is awkward and sometimes won't automatically close. The print layout in Edge is also weird.
Tweaks won't help as even a missing semi-colon and the code will not play.
Here is a sampler: Attachment 121842
Acorn
It seems that nearly the entire page is a link to the tee times page. Could that be a problem?
It could be I will correct this later today and try again, however Acorn has said it works OK on his browsers using the same page. Thanks bk. Terry
https://www.talkgraphics.com/showthr...812#post597812Quote:
... I have had to attach the complete site because I did not know how or if I could attach a single page....
Terry, I have raised this as a Dear Xara as it is not just you who needs it: https://www.talkgraphics.com/showthr...7-Consequences.
Also your 'seniors open' page has a different structure to other pages in that is only has a Layer 1 and not MouseOff & MouseOver layers. This should not be a problem but it might be part of your muck-up.
Acorn
Thanks Acorn. I made the Seniors Open page different because I did not want the navigation bars and header picture printed. The page prints but it is different with each browser I use and I do not get a print preview with some. I have been on a number of other sites and every one gives options in print preview mode. Two points 1 should I have constructed the said page differently? 2 How will I know if Xara comes up with a solution. Terry
Personally I prefer to create a pdf document for this sort of thing. Copy & Pasting into Word would be my last choice. To start with there's an expectancy that everyone uses Word that's far from the truth. Far more people have Acrobat Reader or similar installed.
But that said I've been trying to get this print page option to work. It's very frustrating but I believe this works. The page is a supersite. This seems to eliminate the left margin that you get on a standard website but also means you can't implement it into your standard site but would require it to be opened in a new tab (I think this is the case?)
I've tried the attached xar printing in Chrome, Firefox, IE & Edge and for me they all print as expected. That said it's a torturous procedure to go through especially in Edge, when after eventually getting a preview & hitting print you may as well go & make a cup of coffee.
I no longer have Word installed but I've found that importing a Word .docx file (beloved by Tel ;)) seems to work fine.
Here's an example for you to test:
DEMO
Hi Egg Thanks for working on the Print problem. Like the nice clean layout you produced. Maybe you are leaving me behind, I opened your sample and went into xara "Preview" and the "Print Page" did not work, I assume this is the only way I can test this.
You mentioned "Supersite" that needs some explanation for me please. I know we have had this conversation a number of times re Word. Of the 6/7 reports that are sent to me a week for inclusion on the our web site all are Word docs, converting those to PDF's is time consuming and if I get the Word docs to work in Xara I find that's OK. Also producing links in an imported PDF into Xara does not appear to work for me. Also if I have a long document like our "Events Diary" when I import a PDF into Xara I will get several seperate pages where as with word I extend the page length and and can import as a one document. I'm not trying to sell Word I'm just saying it's the only way I can produce our website. Also as Acorn suggested some time ago if the are problems with importing a Word doc into Xara then putting it into a dummy page and the copying it and pasting it into the real site seems to cure any problems.
This is far removed from the Print problem, maybe I'm not trying your sample correctly, so help please. Terry
Egg Just gone to Print Page from our WEB page in various browsers again, funny how our experiences differ so much. IE print small and cannot adjust in preview. Chrome can adjust but preset itself at 79% and adjustable, good result. Edge adjustable, set at 75% quick and best result!!!. Firefox did not work at all. Android did not work using my "Print Page" but could print page OK.
Thought you would be interested. Terry
I believe the Print Screen is a pigs ear Tel, but try this;
Egg Many thanks for that, must have taken some time to compose. Most of my pages in print preview are positioned to the right of the page, believe or not except for Edge where it is as near perfect. I think I will re compose my page and see what happens. In the mean time I have to say using the "Print Page" link, that is using Acorn's code, on my page is give the best overall result as I have it.
Thanks again for your time and effort. Terry
No problem Tel ;)