Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Can you build a Report, and Rotate the page?

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
pdfqwebprinting
3 Răspunsuri
7506 Vizualizări
Imagine profil
John M. Adams

Hi,

I'm trying to create a pallet label report to print on a 4x6 label printer.  The report fits best landscape, but the print drivers do not rotate landscape pages.

What I need to do is build a landscape report, and rotate it 90 degrees to fit on a portrait-oriented pdf page.

The report I have works, if I open it in an external editor, switch to portrait, and rotate the contents.

Is there an easy way to do this, or will I need to rebuild the report, using rotated text elements and images, to make this work?

I am using Enterprise Hosted Odoo 11.0

Thanks,

John

1
Imagine profil
Abandonează
Imagine profil
faOtools
Cel mai bun răspuns

Try to wrap all your elements inside a report into the div with the attribute 'transform'. An example of the style for the div class 'rotated':

.rotated {transform: rotate(90deg);}

Not sure it will work fully correctly. Perhaps, there would be still a need to change some element classes. 

UPDATE

Reports styles differ from website styles. You either need to pass those styles right in the report, or, simpler in that case, assign the style right in the qweb xml:

<div style="-webkit-transform: rotate(90deg);-moz-transform: rotate(90deg);-o-transform: rotate(90deg);-ms-transform: rotate(90deg);transform: rotate(90deg);"></div>

P.S. I haven't tested this solution, it is just my idea.



0
Imagine profil
Abandonează
Imagine profil
John M. Adams
Autor Cel mai bun răspuns

Thank you,

So far it doesn't work... but I'll play with it.  I applied the style to the class="page article" element, and to the one child below the page element (a table). In both cases it showed the content rotated 90 degrees in the web preview, but not in the final printed PDF.

Perhaps that's a CSS property not supported well by wkhtmltopdf?

Thanks,

John

(I would have posted this as a comment to your answer, but not enough Karma yet)


Update:

The solution requires a blend of Odoo Tools' and Anu's answers.  In experimenting, I found that the version of wkhtmltopdf used by hosted Odoo 11 does not support transform unless it is prefixed. It uses webkit to render, so this *does* work in the preview, and in print:

<div class="page article" style="transform: rotate(90deg); -webkit-transform: rotate(90deg);">

What made this confusing is that the non-prefixed property works fine in the preview, because of course I'm using a current browser.



0
Imagine profil
Abandonează
faOtools

look at the updated answer

John M. Adams
Autor

Yes, I did apply style in-line. Sorry, I mentioned the classes to identify the element that was styled...

<div class="page article" style="transform: rotate(90deg);">

I also tried moving the style up and down the parentage, with similar results.

John M. Adams
Autor

Please update to add the webkit prefix for wkhtmltopdf, and I'll mark as the correct answer. :)

faOtools

yes, sure. It definitely depends on a browser. I have added into my answer styles from various browsers, as the accepted answer on the SO - https://stackoverflow.com/questions/14233341/how-can-i-rotate-an-html-div-90-degrees

John M. Adams
Autor

Actually, that's the problem: it doesn't matter what browser you use, it won't print that way without the webkit vendor prefix, because the client browser doesn't render the PDF... it's the webkit engine in wkhtmltopdf.

faOtools

It is correct. Thank you for sharing the results of your investigation! Just toggled like for your question

Imagine profil
Anusha
Cel mai bun răspuns

Hi,

   use this css

.rotate {

/* Safari */
-webkit-transform: rotate(90deg);

/* Firefox */
-moz-transform: rotate(90deg);

/* IE */
-ms-transform: rotate(90deg);

/* Opera */
-o-transform: rotate(90deg);

/* Internet Explorer */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);

}

                                                                                                   

0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
print pos receipt
pdf pos qweb printing
Imagine profil
1
iul. 15
5435
Addressing Duplex Printing Issues in Qweb: Ensuring Order Separation for Odd-Page Orders
qweb printing
Imagine profil
0
iun. 24
1948
How to print payslip batches
pdf qweb
Imagine profil
0
ian. 21
804
render_qweb_pdf() returns empty string
pdf qweb
Imagine profil
Imagine profil
2
apr. 20
11473
Printing/Exporting Web Quotes in Odoo 12e
pdf qweb quote printing odoo12
Imagine profil
Imagine profil
2
aug. 19
4610
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now