Menu

#510 Generated Postscript remains at A4

Next release
closed-wont-fix
postscript (1)
5
2015-04-24
2015-03-22
No

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)
8 Attachments

Discussion

  • John Coppens

    John Coppens - 2015-03-23

    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?

     
  • John Coppens

    John Coppens - 2015-03-24

    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)

     
  • John Coppens

    John Coppens - 2015-03-24

    To check the postscript file, open it in an editor. At the beginning there is a line which determines the size:

    %!PS-Adobe-1.0
    %%BoundingBox: 0 0 595 841    <--------------
    %%Creator: Qt 4.8.6
    %%CreationDate: Tue Mar 24 12:31:14 2015
    %%Orientation: Landscape
    

    595/72*25.4 = 209mm
    841/72*25.4 = 297mm

     
  • John Coppens

    John Coppens - 2015-03-24

    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.

     
  • Dongxu Li

    Dongxu Li - 2015-04-24
    • status: open --> closed-wont-fix
    • assigned_to: Dongxu Li
     

Log in to post a comment.