WebSite X5Help Center

 
Aleksej H.
Aleksej H.
Moderator

Print part of the blog post page  en

Autor: Aleksej H.
Visitado 2250, Followers 3, Compartido 0  

HelloI need to print part of the blog page.I am using this instruction. The problem is that the text inside the DIV is "not visible" for printing (an example in the picture).

If I write this way:

<div id="print-content">Test...</div>

That all works.

But if I write that way:

<div id="print-content">

Test...

</div>

A blank page is displayed for print (only with URL address and date). Example (with empty print page).

Please help solve the situation. Thank you very much for the answer.

Publicado en
14 RESPUESTAS - 3 úTIL - 1 CORRECTO
Aleksej H.
Aleksej H.
Moderator
Autor

WebSite X5 Professional 16.2.1

Leer más
Publicado en de Aleksej H.
Giorgio C.
Giorgio C.
User

Ogni riga di testo viene inserita tra i tag <div></<div> fino al ritorno a capo.
Quindi le istruzioni html che comprendono dei ritorno a capo non funzionano.

ciao

google:

Each line of text is inserted between the <div> </ <div> tags until the carriage return.
So html statements that include word wrap do not work.
 

ciao.

     

       

Leer más
Publicado en de Giorgio C.
Aleksej H.
Aleksej H.
Moderator
Autor

What can I do to solve this problem?

Leer más
Publicado en de Aleksej H.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Aleksej H.
What can I do to solve this problem?

(IT - EN)
1) - with "Ctrl + U" find the name "ID" of the selector / object to be printed on the page;
2) - in the EXPERT section, paste the JS code in HEAD:
<script> function printContent(ID){
var creaPagina = document.body.innerHTML;
var printContent = document.getElementById(ID).innerHTML;
document.body.innerHTML = printContent;
window.print();
document.body.innerHTML = creaPagina;
</script>
3) - for the LINK "type" use the HTML code:
<a href="javascript:void(0)" onClick="printContent('imCel1_01_Cont')">Print 1</a>

>> example ... (Ctrl + U ... to see the code used)
.
Hello - ciao

.

Leer más
Publicado en de  ‪ KolAsim ‪ ‪
Aleksej H.
Aleksej H.
Moderator
Autor

Thank you for trying to help.But these options also do not work.frownExample.

Leer más
Publicado en de Aleksej H.
Aleksej H.
Aleksej H.
Moderator
Autor

Foto

Leer más
Publicado en de Aleksej H.
Incomedia
Stefano G.
Incomedia

Hi Aleksej,

If I understood the issue correctly, I'm afraid this mostly has to do with custom code, for which unfortunately the Staff cannot provide support for.

Although, seeing that users already intervened to help you on this matter, I will gladly leave the topic open so that you might receive the support you need from other users eventually.

Let me know if I can help you with anything else

Thank you

Stefano

Leer más
Publicado en de Stefano G.
Aleksej H.
Aleksej H.
Moderator
Autor

"If I understood the issue correctly, I'm afraid this mostly has to do with custom code, for which unfortunately the Staff cannot provide support for." - Yes, I understand that.

"Although, seeing that users already intervened to help you on this matter, I will gladly leave the topic open so that you might receive the support you need from other users eventually." - Thank you.

Leer más
Publicado en de Aleksej H.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Aleksej H.
Thank you for trying to help.But these options also do not work.Example.

(IT-EN) Hello, unfortunately I do not have the program to check;
... in the code I see this error [<div id="prin"></span></div></div><div...etc.], perhaps generated for the formatting that is activated automatically;
try to do this test:
paste all this string without a carriage return, and check what happened:
<a href="javascript:void(0)" onClick="printContent('prin')" style="position:absolute;font-size:22px;right:0px">Print 1</a><br><br></span></p><p id="prin" style="font-size:22px;text-align:left">1 - Lorem ipsum dolor sit amet, <br>consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br> Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </p><p><span>
.
Hello  - Ciao

.

Leer más
Publicado en de  ‪ KolAsim ‪ ‪
Claudio D.
Claudio D.
Moderator
Usuario del mes IT

se ho capito ...

io ho provato il codice che ti ha gentilmente rilasciato KolAsim () sugli articoli del Blog e funziona benissimo...

qui la mia prova

if I understood correctly

I have tried the code that has kindly released you KolAsim on the Blog articles and it works very well ...

here my test

http://pcuty.altervista.org/16x/blog/index.php?terzo-articolo

Leer más
Publicado en de Claudio D.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

... grande! Claudio  ... grazie per il test! ... smile ... ... ciao...wink

Leer más
Publicado en de  ‪ KolAsim ‪ ‪
Aleksej H.
Aleksej H.
Moderator
Autor

Thanks, it helped.

Leer más
Publicado en de Aleksej H.