Printing on a large-format printer

If you are having problems with QCAD 2.1/2.2, post here. Please report bugs here.

Moderator: andrew

Printing on a large-format printer

Postby edi » Tue Apr 03, 2007 11:38 pm

Hi,

my printing problems persist, unfortunately. I have a 24" printer (HP DesignJet 430) and the paper sizes I need are usually something between 1,50m and 2,00m lengthwise. Right now, I am resorting to Windows programs to do this.
Printing to the printer will print only an A4 size part of the file. Exporting to pdf gives me a rather large file with a square (!) bounding box and nothing inside. So I have no way out of this right now. I had hoped the new release would fix it because a) the associated Qt bugs may have been fixed or b) there might be a workaround now in Qt.
The preview window looks ok apart from the fact that the landscape/portrait checkbox from Edit->Application Preferences seems to get ignored.

Any ideas? QCad is such a great program, but I do need to print my files, too (which is a pain with both AXCAD and Autodesk, but somehow works, at least). :cry:
edi
Active Member
 
Posts: 26
Joined: Tue Apr 03, 2007 9:59 pm

Re: Printing on a large-format printer

Postby andrew » Wed Apr 04, 2007 9:29 am

edi wrote:I have a 24" printer (HP DesignJet 430) and the paper sizes I need are usually something between 1,50m and 2,00m lengthwise.


My best advise is to print to a postscript file in A4 format and then use some Postscript utility (poster, pstops, ...) to blow the PS up to the desired size.

As for Qt, you might want to follow the progress on that in their issue tracker:
http://www.trolltech.com/developer/task-tracker/index_html?method=entry&id=99441

Unfortunately, the feature has been postponed from Qt 4.1 to 4.2 and now to 4.3. I have very little hope that this will be fixed in Qt 4.3...
User avatar
andrew
Site Admin
 
Posts: 2745
Joined: Fri Mar 30, 2007 6:07 am

Postby edi » Wed Apr 04, 2007 10:52 am

I have just had a look at it: The priority is "no priority", and the resolution is "pending" (of course). I doubt they will *ever* fix it. :cry:

So I take it that your pdf export uses the same routines, otherwise it wouldn't be broken as well, right?

But since it is your software they are breaking, maybe you could fix it if this isn't asked too much? I am only an amateur programmer with no C++ experience, and I couldn't fix my professional release anyway. But my guess is that it shouldn't be too hard to track down (since printing as such does work).
edi
Active Member
 
Posts: 26
Joined: Tue Apr 03, 2007 9:59 pm

Postby andrew » Wed Apr 04, 2007 11:49 am

edi wrote:I have just had a look at it: The priority is "no priority", and the resolution is "pending" (of course). I doubt they will *ever* fix it. :cry:


Yes, unfortunately.

edi wrote:So I take it that your pdf export uses the same routines, otherwise it wouldn't be broken as well, right?


Yes

edi wrote:But since it is your software they are breaking, maybe you could fix it if this isn't asked too much? I am only an amateur programmer with no C++ experience, and I couldn't fix my professional release anyway. But my guess is that it shouldn't be too hard to track down (since printing as such does work).


Unfortunately that would be very costly to fix. The printing mechanism is one of the more complex parts in a cross-platform software. On the other hand there are very few people who have printers in formats other than A4, so for 99% of all QCad users there would be no benefit of such a fix.

Since you are using a rather exotic printer, I strongly suggest that you look into those PostScript utilities. You might well discover that they offer some cool features for you.
User avatar
andrew
Site Admin
 
Posts: 2745
Joined: Fri Mar 30, 2007 6:07 am

Postby edi » Wed Apr 04, 2007 2:13 pm

andrew wrote:
edi wrote:But since it is your software they are breaking, maybe you could fix it if this isn't asked too much? I am only an amateur programmer with no C++ experience, and I couldn't fix my professional release anyway. But my guess is that it shouldn't be too hard to track down (since printing as such does work).


Unfortunately that would be very costly to fix. The printing mechanism is one of the more complex parts in a cross-platform software. On the other hand there are very few people who have printers in formats other than A4, so for 99% of all QCad users there would be no benefit of such a fix.


Not quite. This only works for people who don't *design* anything bigger than A4. Otherwise, you would still need to print to a file *correctly* and then use the PS utilities for tiling since QCad doesn't do that. What might work would be printing scaled to A0 (redirected to a pdf file), write down the scale factor, crop the file and print it out enlarged by 1/scale factor. But what a mess, especially since I have to write down the scale factor every time and calculate the inverse! :(

Couldn't that be done in Qcad somehow? It could be a printing option like "print everything visible" with the possibility of selecting a scale factor. Qcad could then internally scale to a known (=working) paper size, crop the margins and write the stuff to a pdf file (scaled back). Apart from the "scaled back" bit everything is there already in some form or other. Wouldn't that also be a workaround for the custom paper size?

andrew wrote:Since you are using a rather exotic printer, I strongly suggest that you look into those PostScript utilities. You might well discover that they offer some cool features for you.


Like what? I am just looking for a possibility of getting my design onto paper in a quality I can give away to others, nothing more :(
edi
Active Member
 
Posts: 26
Joined: Tue Apr 03, 2007 9:59 pm

Partial workaround for mac printing

Postby led » Sat Apr 28, 2007 10:35 pm

I spent a saturday morning on this, so I hope at least it can be useful to someone else.

My problem is more generic; I have large drawings and a normal sized printer so I need to use a tiling utility. Alas, fig2dev doesn't understand .dxf files.

After much fiddling, I can print a full sized drawing as follows:

(for qcad 2.1.3.0 intel under OSX.4.8 )

If your drawing fits on an available papersize, set that papersize in (drawing prefs. Otherwise set to A4. (I have not tried custom sizes)

Fit the drawing to the page.

Note the scale factor if not one. Compute 1/scalefactor in your head
(well, ok, let's be user friendly and say you can use a calculator).

In print preview, print to pdf. (Note that printing to postscript results in a pdf file! This doesn't happen in Preview or other mac apps so I don't know what's going on there.)

From a shell prompt, convert the pdf to eps (NOT PS.) I modded pdf2ps into pdf2eps; I'll put that code at the end of this post.

sh ./pdf2eps infile.pdf

Now, at last, run poster on it:

poster -v -mletter -s<1/scalefactor> -w10% infile.eps > outfile.ps

the 10% is to deal with unprintable borders on my printer, you may have to adjust to suit. If you are using different sizes in your printer, set the -m option to suit. Note that the 1/scalefactor scales the drawing to the bounding box so the -m option is independent of the paper you saved to in qcad.

One more thing: preview won't open any of the postscript files. However, gs and gv (ghostscript and ghostview) both will. I use gv to print. gv requires that you're using X11, but that goes without saying.

(You can also print with "lpr outfile.ps", hopefully.)

I upgraded to GPL Ghostscript 8.56 (2007-03-14)
from http://www.cs.wisc.edu/~ghost/doc/GPL/gpl856.htm
(dont forget the fonts directory; it goes in
/usr/local/share/ghostscript/fonts)

here is a link to poster:
http://www.geocities.com/SiliconValley/5682/poster.html

and got gv from fink commander, along with psutils

I hope that's as useful as it was painful!

Here's my hacked version of ps2eps; just paste it into a file named
ps2eps along with your drawings. Set permissions etc if you know how to do that. Otherwise, run as above.

Code: Select all

#!/bin/sh
# modified from pdf2ps
# Convert PDF to encapsulated PostScript.

# This definition is changed on install to match the
# executable name set in the makefile
GS_EXECUTABLE=gs

OPTIONS=""
while true
do
        case "$1" in
        -?*) OPTIONS="$OPTIONS $1" ;;
        *)  break ;;
        esac
        shift
done

if [ $# -eq 2 ]
then
    outfile=$2
elif [ $# -eq 1 ]
then
    outfile=`basename "$1" \.pdf`.eps
else
    echo "Usage: `basename $0` [-dASCII85EncodePages=false] [-dLanguageLevel=1|2|3] input.pdf [output.eps]" 1>&2
    exit 1
fi

# Doing an initial 'save' helps keep fonts from being flushed between pages.
# We have to include the options twice because -I only takes effect if it
# appears before other options.
exec $GS_EXECUTABLE $OPTIONS -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=epswrite "-sOutputFile=$outfile" $OPTIONS -c save pop -f "$1"

led
Newbie Member
 
Posts: 3
Joined: Sat Apr 28, 2007 9:04 pm

Postby andrew » Fri Aug 01, 2008 7:07 pm

Custom paper sizes will be fully supported in the next QCad release.
User avatar
andrew
Site Admin
 
Posts: 2745
Joined: Fri Mar 30, 2007 6:07 am

Postby Mortamus » Tue Aug 05, 2008 4:19 am

I'm a noobie here so I might be doing something wrong, however, when I print on tabloid (11x17 inches or 279x432mm whichever you prefer) the printed page is offset about 1/3 of the page length, hence, I lose most of the drawing. If I export to PDF first then I can print the PDF with no offset. I have verified that the print preview and printer are both set to the proper page size and orientation. Any suggestions?
Mortamus
Registered Member
 
Posts: 1
Joined: Tue Aug 05, 2008 4:06 am

Postby andrew » Tue Aug 05, 2008 4:28 pm

Mortamus wrote:when I print on tabloid (11x17 inches or 279x432mm whichever you prefer) the printed page is offset about 1/3 of the page length, hence, I lose most of the drawing. If I export to PDF first then I can print the PDF with no offset.


Since QCad uses the same code and logic to print as to produce PDFs, there is probably a problem in either the underlying Qt printing mechanism, the printer driver, or the combination of the two. I.e. that's not something we can easily fix or even reproduce. Printing PDFs might be your best option at this point.
The problem might go away in future releases if the bug is fixed wherever it is in the tool chain.
User avatar
andrew
Site Admin
 
Posts: 2745
Joined: Fri Mar 30, 2007 6:07 am


Return to QCAD 2.1/2.2 Troubleshooting and Problems

Who is online

Users browsing this forum: No registered users and 3 guests

cron