Printtopdf doesn't work in landscape

i’m printing a form with the data on a tile 8.5 wide and 3.3 tall.

executing this
printtopdf dsk + ‘lidlabels15.pdf’, ‘height’, 3.3, ‘width’, 8.5, ‘orientation’, 'landscape’
results in a 37 page pdf in the right size and right orientation but with no content. nothig actually prints.

printtopdf dsk + ‘lidlabels15.pdf’, ‘height’, 8.5, ‘width’, 3.3, ‘orientation’, 'landscape’
produces exactly the same results, that is, switching dimensions has no effect.

printtopdf dsk + ‘lidlabels15.pdf’, ‘height’, 3.3, ‘width’, 8.5
produces a page 3.3 wide x 8.5 tall, and it has live matter, but, of course, its just the first 3.3" of an 8.5" wide page, so not much help.

again, reversing the dimansions has no effect.

how do i fix this?

Your first two versions are both giving me a page that is 3.3 high and 8.5 wide, with content. If I don’t use a data tile, there is no content, but without the data tile, the third version doesn’t have any content either.

It would seem that specifying landscape makes the longer dimension the width, regardless of whether you call it the height or width. Specifying portrait, which is the default, makes the longer dimension the height.

thanks for looking at this.
this is a database from pan6. i had already replaced or edited most of the objects, but not the tile. however, i have now replaced the tile, but i’m still getting the same results.

i tried rebuilding the entire form from scratch: new form, new objects. the only thing i copied from the old form was the formulas for text display objects which i pasted into objects in the new form.

like the original form, the new form looks fine on screen; prints on a laser printer; but the pdf still has no content.

since that failed, i had to give up on the panx file.
i exported the data to load in the corresponding pan6 file which, no surprise, worked.

although my immediate problem is no longer pressing, i hope the group and provue wont abandon this issue. panx OUGHT to be able to print pdfs in landscape aspect ratio.

My tests showed it can print PDFs in landscape aspect. The open question is, under what conditions does it fail?

has there been any progress on this issue?
i’m in panx 0.9.002 (2495) now, os 10.12.5.

here’s my proc:
printtopdf ‘labels.pdf’,
    ‘width’, 8.5,
    ‘height’, 3.3,
    ‘orientation’, ‘landscape’,
    ‘form’, ‘lid label pdf’

this creates a pdf with pages 8.5 wide x 3.3 tall and NOTHING on them.

specifying a 8.5 x 3.3 page in page setup, then printing the form from the menu with ‘save as pdf’ works as expected.

In Pan 6 it’s crucial that you go through the Page Setup and Print steps manually before using printtopdf. Then save.

Rather than doing your page setup on the fly, what happens if you first do Page Setup and Print on Pan X, then use printtopdf without including the page setup?

I am successfully using the printtopdf statement to save PDF files from one form in a database in portrait orientation and from another form in the same database in landscape orientation.

(There is only one difference to Sam’s code: I am using double quotes – as documented – for the options of the statement.)

Sam, you are saying that your data tile is 8.5 wide and 3.3 tall. Now you are setting exactly the same width and height for the paper format. What happens if you add some margin? Perhaps the page setup is using some amount of additional margin, and your tile won’t fit onto the (virtual) paper?

Just as an experiment, try setting the “scale” in your printtopdf statement to something less than 100, say 80% (0.8). Even though scaling is not well supported at the moment, I found that some of my forms will print 2 blank pages instead of the one filled page I am asking for, unless I set scaling to less than 100%. They don’t scale to what I asked for, but they do now obey some of the other parameters. Not a solution necessarily, but it may provide a hint to the eventual solution.

The information that you want to print needs to be on tiles. If there is no tile, nothing prints. Put a data tile under it if there is no tile. To print envelopes, for instance, I have a data tile the size of the envelope, and the return address and mailing address are on top. Everything prints fine, in landscape. It even chooses the proper printer tray!

Also, you cannot print from the data sheet, in case you are doing this. No matter what form you put in the printtopdf statement, only the data sheet will print, so you need to open a form first.

It’s not currently supported at all. Changing the scaling has zero effect, the code currently ignores that value.

I have done some investigation into this recently, but haven’t solved it yet.

I was able to reproduce the problem that Sam reported:

this creates a pdf with pages 8.5 wide x 3.3 tall and NOTHING on them.

The pdf did not contain any data when the data tile in the form was larger than the paper size in the printtopdf statement. If the data tile was smaller than the paper size then the pdf contained data.

Here’s my procedure:

printtopdf "lidlabels15.pdf", 
"form", "landscape report", 
"height", 3.3, 
"width", 8.5, 
"orientation", "landscape"

The data tile in the “landscape report” form is 600px wide and 235px high.

Running the procedure with “landscape report” as the active window printed the data as laid out in the data tile.

Running the procedure with the data sheet as the active window printed the data sheet info and ignored the data tile layout.

This problem may be complicated because inches are used in referring to paper size in the printtopdf help topic but pixels are used in the form properties panel. (Inches for the properties panel may not be implemented yet; at least, I could not find where to change the measurement dimensions.)

I think this is a completely different issue from the problem with scaling, so I’ve put in a new bug report. BTW - I was able to duplicate the problem.

If you can fix this, would it be possible to have something like a data tile which would automatically be as big as the form’s window, so that the form would print whether or not there is a data tile on it?

I assume this is a typo, and you mean “if I can’t fix this”. My assumption is that this problem is fixable.

If you print a form that doesn’t have a data tile, Panorama automatically creates a 8.5 x 11 tile for the duration of the print job. However, due to this bug it could be that isn’t doing any good.

It’s always a good idea to explicitly make a data tile though, then you can really see and control what is going on.

As I recall, I got blank pages printing 8.5 x 11 forms.

Perhaps what would be desirable is to set the size of the form as a property of the form, and automatically making the tile from those dimensions. This could then be the default for the page size in printtopdf, rather than having to define it each time.