Hello!
I'm using TechDraw to show and save in pdf a draw and a Spreadsheet into one page, but with newer versions of FC the text size and cell size do not coincide and some text go out of the page, with the olds versions it work good
On freecad 0.19.17651 works good
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17651 (Git)
Build type: Release
Branch: master
Hash: 16c26cb3b1cd7209ea8efc8cb30b3b18fd80cf95
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)
On freecad 0.19.18284 it does not
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18284 (Git)
Build type: Release
Branch: master
Hash: cd8f0e0960d048032b6967edb9e8952541a5eb6c
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)
MODIFIED: NOT A Bug? inserting Spreadsheet in a Page
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
MODIFIED: NOT A Bug? inserting Spreadsheet in a Page
- Attachments
-
- ProvaSpreadsheet.FCMacro
- Macro
- (2.71 KiB) Downloaded 38 times
Last edited by dino on Thu Sep 26, 2019 4:31 pm, edited 1 time in total.
- wandererfan
- Veteran
- Posts: 6324
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Bug? inserting Spreadsheet in a Page
Not sure where row height is determined. Will have to do some digging.
- wandererfan
- Veteran
- Posts: 6324
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Bug? inserting Spreadsheet in a Page
TD gets the row height from the spreadsheet (30 in this case).
37 rows * 30 pixels/row = 1110 pixels. At 92 pixels per inch, that's > 12 inches or ~305 mm which is taller than A4 page. Which is what we get with freecad-daily.
I can't figure out why it worked in earlier builds. From the pictures, the row height is noticeably smaller in the earlier version.
I haven't found where the row height is set in Spreadsheet yet. Maybe the default height of a row changed?
Re: Bug? inserting Spreadsheet in a Page
I think we have to search the problem in cell and text heights becouse with FC 0.18 the sheet is ok (same as 0.19 old) but the text is bigger then 0.19 as "old" and "new" version.
In FC 0.19 the "old" and "new" versions cell hegth is different but the text heigth is the same.
For me the best way is to set the heitght of the cell in mm (or inch) and the text in pt (1pt = 0,352778mm), so we can export it in pdf file easealy
In FC 0.19 the "old" and "new" versions cell hegth is different but the text heigth is the same.
For me the best way is to set the heitght of the cell in mm (or inch) and the text in pt (1pt = 0,352778mm), so we can export it in pdf file easealy
Re: Bug? inserting Spreadsheet in a Page
The row heigth in TechDraw is setted by Spreadsheet row heigth, the same as column width!
Code: Select all
sp = App.ActiveDocument.Spreadsheet
sp.setColumnWidth("B", 30)
sp.setRowHeight("10", 15)
App.activeDocument().recompute()
Re: Bug? inserting Spreadsheet in a Page
NOT a BUG!
the difference is that olds versions sets by default Row Height to 20 the newer to 30 px
the difference is that olds versions sets by default Row Height to 20 the newer to 30 px
- wandererfan
- Veteran
- Posts: 6324
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact: