Printing an HTML email that contains a table longer than 1 page - html

When I try printing an HTML-email with a table that stretches multiple pages then Windows-Mail and IE7 will only print whatever fits on the first page but Firefox prints everything just fine.
Any thoughts how I can make the Microsoft products print the entire thing?
Regards, Pieter

If this is just for a one-off email, you can try one of the following:
1) Click on file > print to ensure you get the print dialog box
2) Ensure that "all pages" is selected in the print dialog
3) Confirm the print job
or
1) Copy and paste the email into another application, such as Word and print the document from there.
If this is not a one-off issue, you could look at generating the information as a printable attachment, for example PDF format - which gives you more control over print-layout than HTML does.

I just dove into the problem again and found out that Internet Explorer and windows mail as well (same html engine?) cannot handle nested tables (a table inside the cell of another table) very well when it comes to printing them.
Removing the nested tables from the html-email solved the problem (and created another one but i was able to solve the layout issues without nested tables nicely ;) )

Related

When using officedown changing from portait to landscape causes problems with page numbering

I have been using officeR and officedown a lot in the past months. These are great packages sparing me a lot of time and effort, since many of my collaborators want *.docx files.
However, I have one problem which can be reproduced using the bookdown example included in the package. After installing the packages you need to run:
dir <- system.file(package = "officedown", "examples", "bookdown")
file.copy(dir, getwd(), recursive = TRUE, overwrite = TRUE)
rmarkdown::render_site("bookdown")
browseURL("bookdown/_book/bookdown.docx")
The resulting word document shows all the possibilities of officedown. However, you see a word document with 10 pages. Word “says” that there are 11 pages. After inserting page numbers using the MS word function, you see that in the bookdown-example page 5 is in portrait and then the next page (landscape ) has the number 7. Page 6 seems to be missing. If you print or convert the file in pdf, there is now an (empty) page 6 . I have faced the problem always and only when I included pages in landscape using “<!---BLOCK_LANDSCAPE_START---> “ and “ <!---BLOCK_LANDSCAPE_STOP---> “. A change from landscape back to portrait does not seem to cause problems.
Any ideas to solve this?
Best wishes
Jörg
I don't think the issue is related to BLOCK_LANDSCAPE_START because my current documents do not run into this error. I think it might be related to how you are producing your document.
Is there a reason you are using these 2 lines?
rmarkdown::render_site("bookdown")
browseURL("bookdown/_book/bookdown.docx")
Assuming you have officedown installed try the following steps
When rendered using the knit button (Ctrl+Shift+K), it does not produce the extra page you describe.

Html code broke when shiny upgraded to bootstrap 3

When Shiny upgraded to bootstrap 3, some of my programs looked wonky as a result. So I used shinybootstrap2 for backward compatibility. Unfortunately, there's still a chunk of code that's not being displayed properly (see column Link in the snapshot below). Before the upgrade, this column used to display hyperlinks which take the user to an external website upon clicking. However, now they are just being displayed as text and do not behave interactively. Here's the code I used to populate the column:
paste('<a href = ', shQuote(url), '>', 'Click</a>')
the url is just another variable where the actual link address is stored.
Any clue/thoughts as to why this might be happening?
Try this to allow parsing of links...
output$table <- renderDataTable({
get_table()
},escape=FALSE)
Or escape individual columns as indicated in the documentation

How to print or view HTML from a TDBGrid?

I was, until now, unable to find or create a good component to print the result of a TDBGrid, so what I did was to create a couple of for ... do and then save the result in a text file and opened right after with Notepad, so the user could print or save from there. Pretty ugly, right?
Now it just came to me that I could use those loops to create HTML code instead, which is more presentable. But how can I use, for example a TWebBrowser or something else to show that result instead of the TDBGrid approach?
And how can I print this HTML (with or without the TWebBrowser, as for example if I still use the TDBGrid to show the report and the HTML approach just if the user wants to print it)?
You can use either
TWebBrowser printing abilities,
Or a pure VCL component like THtmlViewer.
I like very much THtmlViewer since it won't depend on the IE installation, is pretty fast and has good printing abilities. You can even export to pdf if needed, using e.g. Open Source SynPdf unit.

Inputs print without text inside them, but are visible on the screen

I have a problem with a project that I have been working on for a while now. When I open an entry, the inputs all have data in them. However when I go to actually print the entry (using the print-mode, CTRL+P), I notice that the select, and textarea fields are missing the selected or input text on paper. What's going on here? I have googled for hours and can't come up with anything relevant... help! Thanks!
Link to Project (Click "Demo" to create a session - required)
Link to Entry (Click this after you click the 1st link)
Update : Before now I have just been using Google Chrome to test printing. However, when I tried FireFox, it printed alright, is there anything special I need to do to get Chrome to work??...
RESOLUTION : I am using jQuery and I found that by removing the ui-corner-all class from the inputs before printing, I could then print. Thanks anyways!
If you're using Internet Explorer, then this discussion thread may help you (summary: IE can get confused when printing malformed docs). Check your doctype tag matches your output (the w3c markup validator is very useful)
Edit - I see you're using chrome, but I suggest you still check your page is well formed :)
RESOLUTION: I'm using jQuery and I found that by removing the ui-corner-all class from the inputs before printing, I could then print. Thanks anyways!

Text formatting within textarea

Variations on my problem have been discussed elsewhere, so I hope I'm not duplicating!
I'm implementing a simple Private Messaging System as part of a web app. I've got an annoying problem though when dynamically inserting text into a textarea box in order to make a reply. Getting the content and displaying it is fine, but I can't work out how to format it correctly.
Obviously, I can't use html tags, but plain text formatting like line breaks and carriage returns seem to be ignored too.
This happens when an existing message is being displayed either as part of a reply or as a thread in a new message.
How do I check what formatting is being saved in my db? Or indeed what formatting is being sent back from my db?!
What about using some for of HTML editor for the replies. Save the html in the database and shown them again in the editro on your web site.
Check this wiki page for a list of possible editors
UPDATE:
Thanks for your replies, but I've worked it out. I was playing around and realised the problem was at the stage of sending the data to the db. I passed the text through the nl2br() function before sending it to the db and this seems(!) to have done the trick!