WebSite X5Help Center

 
Aleksej H.
Aleksej H.
Moderator

Print part of the blog post page  en

Autore: Aleksej H.
Visite 2247, Followers 3, Condiviso 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.

Postato il
14 RISPOSTE - 3 UTILI - 1 CORRETTO
Aleksej H.
Aleksej H.
Moderator
Autore

WebSite X5 Professional 16.2.1

Leggi di più
Postato il da 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.

     

       

Leggi di più
Postato il da Giorgio C.
Aleksej H.
Aleksej H.
Moderator
Autore

What can I do to solve this problem?

Leggi di più
Postato il da 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

.

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪
Aleksej H.
Aleksej H.
Moderator
Autore

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

Leggi di più
Postato il da Aleksej H.
Aleksej H.
Aleksej H.
Moderator
Autore

Foto

Leggi di più
Postato il da 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

Leggi di più
Postato il da Stefano G.
Aleksej H.
Aleksej H.
Moderator
Autore

"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.

Leggi di più
Postato il da 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

.

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪
Claudio D.
Claudio D.
Moderator
Utente del mese 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

Leggi di più
Postato il da Claudio D.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

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

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪
Aleksej H.
Aleksej H.
Moderator
Autore

Thanks, it helped.

Leggi di più
Postato il da Aleksej H.