When printing to a postscript file, the output seems to be incorrect. At least, the Bounding box is not updated to the selected paper size. But it seems that of the generated image, only the elements in the basic A4 size area are printed.
Simple test: Set 'this drawing' paper size to A4, print to Postscript file, check BoundingBox in .ps file: %%BoundingBox: 0 0 595 841 (which is 210x297mm = A4)
Then set the paper size to A3, print again to .ps: BoundingBox is still at the same size.
Many (if not all) viewers only look at the Bounding box (evince, etc). xpdf permits setting the format manually, but the drawing is incomplete outside the A4 area (only arrows are drawn)
Attached:
File | Contents |
---|---|
squares.dxf | Test file with squares and dimensions |
A4-preview.png | Paper size set to A4 in librecad, Print preview. |
A4-evince.png | Image as seen in Evince (correct) |
A4-xpdf_as_A4.png | Image as seen in xPDF (correct) |
A4-xpdf_as_A3.png | Image in xPDF, with xPDF paper size set to A3 - note arrows |
A3-preview.png | Paper size set to A3 in librecad. Print preview |
A3-xpdf_as_A3.png | As seen in xPDF (xPDF paper size to A3) |
A3-xpdf_as_Bbox.png | As seen in xPDF (xPDF paper size to BoundingBox) |
Suggestion: I've tried to trace the value of the pagesize through the program, and I have the impression that the program takes the values from the boxes on the Current Drawing Preferences dialog, Paper page. But these values are not updated when another page size is chosen (eg. A1). Maybe because they are insensitive?
Steps to reproduce:
1) Load the 'squares.dxf' file
2) Go to Edit | Current Drawing Preferences | Paper. Set paper size to A3.
3) Go to Print..., Choose 'Print to Postscript'
4) Click Print
Observe the generated Postscript file: It's size should be A3 (it is always A4)
To check the postscript file, open it in an editor. At the beginning there is a line which determines the size:
595/72*25.4 = 209mm
841/72*25.4 = 297mm
After a prolonged IRC discussion with dli (Thanks!) the following came out:
1) Using 'Print...", the 'Write to file' in PDF and Postscript work unexpectedly: The outputs are limited to the page size of the printer. (So if you have an A3 drawing, and an A4 printer, you can NOT use this option.
Also, Postscript printing will be removed from future versions of the Qt library.
2) 'Export to PDF' works fine, at all formats. You can then print from a PDF viewer, or convert to Postscript with 'pdftops'. (I have had problems with the more popular 'pdf2ps' which is normally installed in Linux. However, pdf2ps generates files which are not compatible with 'poster').
The only problem with 'Export to PDF', is that the colors do not print well on a B/W printer. dli is working on that.
John,
Could you test the colors in "Export as PDF" with this new commit: https://github.com/LibreCAD/LibreCAD/commit/50c62b59676895a6fed86f5fbd94b4943875d90b
Thanks,