cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Landscape pages Publish Upside Down

SarahPrice
10-Marble

Landscape pages Publish Upside Down

We have just upgraded to 6.0 M020. Since doing so the XSL-FO stylesheets that we use to produce landscape pages are publishing the pages as PDFs upside down. The page is set up as a 11x8.5. Has anyone else experienced this type of behavior? I have tested this using Print Composer and PE Server I get the same results with both.

Thanks in advance for all your help.


17 REPLIES 17

Is the entire page landscape or is it just the flowtext area? In other words, do the landscape pages have the header and footer on the long edge of the page or the short edge?

The entire page is upside down. Header footer and all.



sarah


Can you post the XSL-FO code that defines the page?
-Brandon 🙂


Nevertheless, there are two ways to make a landscape page:

1) Keep the header and footer on the short edge of the page and rotate only the text to landscape

2) Rotate header, footer and text to landscape.

Are your headers and footers (upside-down or not) on the narrow edge or the long edge of the page?

We have a page defined for the first page and then one for all the rest. They all publish upside down.

<fo:simple-page-master master-name="PageMaster-first" margin-top="0.50in" margin-bottom="0.50in" margin-left="0.25in" margin-right="0.25in" page-height="8.5in" page-width="11in">
<fo:region-before region-name="header" extent="1.25in"/">
<fo:region-start extent="0.25in"/">
<fo:region-body margin-top="1.25in" margin-left="0.25in" margin-right="0.25in">
<xsl:attribute name="margin-bottom">
<xsl:value-of select="$margin"/"><xsl:value-of select="$unit"/">
</xsl:attribute>
</fo:region-body>
<fo:region-after region-name="footer1st">
<xsl:attribute name="extent">
<xsl:value-of select="$margin"/"><xsl:value-of select="$unit"/">
</xsl:attribute>
</fo:region-after>
<fo:region-end extent="0.25in"/">
</fo:simple-page-master>

<fo:simple-page-master master-name="PageMaster-all" margin-top="0.50in" margin-bottom="0.50in" margin-left="0.25in" margin-right="0.25in" page-height="8.5in" page-width="11in">
<fo:region-before region-name="header" extent="1.25in"/">
<fo:region-start extent="0.25in"/">
<fo:region-body margin-top="1.25in" margin-bottom="0.55in" margin-left="0.25in" margin-right="0.25in"/">
<fo:region-after region-name="footer" extent="0.50in"/">
<fo:region-end extent="0.25in"/">
</fo:simple-page-master>

That all looks reasonable. How about the code that invokes those
pages? I'm guessing there may be an errant rotation applied,
somewhere. The other possibility would be that a rotation is getting
applied during PDF creation. Do you use Distiller or Direct PDF?

This exact XSL-FO style sheet worked in a previous version? Which
one? Any other changes at the same time (e.g., Distiller to Direct
PDF or vice-versa)?

-Brandon 🙂


On Mon, Dec 12, 2011 at 8:26 AM, Price, Sarah CTR
<sarah.r.price@uscg.mil> wrote:
> We have a page defined for the first page and then one for all the rest. They all publish upside down.
>
> <fo:simple-page-master master-name="PageMaster-first" margin-top="0.50in" margin-bottom="0.50in" margin-left="0.25in" margin-right="0.25in" page-height="8.5in" page-width="11in">
> <fo:region-before region-name="header" extent="1.25in"/">
> <fo:region-start extent="0.25in"/">
> <fo:region-body margin-top="1.25in" margin-left="0.25in" margin-right="0.25in">
> <xsl:attribute name="margin-bottom">
> <xsl:value-of select="$margin"/"><xsl:value-of select="$unit"/">
> </xsl:attribute>
> </fo:region-body>
> <fo:region-after region-name="footer1st">
> <xsl:attribute name="extent">
> <xsl:value-of select="$margin"/"><xsl:value-of select="$unit"/">
> </xsl:attribute>
> </fo:region-after>
> <fo:region-end extent="0.25in"/">
> </fo:simple-page-master>
>
> <fo:simple-page-master master-name="PageMaster-all" margin-top="0.50in" margin-bottom="0.50in" margin-left="0.25in" margin-right="0.25in" page-height="8.5in" page-width="11in">
> <fo:region-before region-name="header" extent="1.25in"/">
> <fo:region-start extent="0.25in"/">
> <fo:region-body margin-top="1.25in" margin-bottom="0.55in" margin-left="0.25in" margin-right="0.25in"/">
> <fo:region-after region-name="footer" extent="0.50in"/">
> <fo:region-end extent="0.25in"/">
> </fo:simple-page-master>
>

We are using Distiller. I've tried this in Distiller version 9.4 and 7.1, same result in both. The version it worked in was Arbortext 5.3 M090. I use an ACL to call the publish function and correct stylesheet.

Here is the publish part of the ACL. There was some package changes between the versions could it be something with the _pubpdf::run_distiller???:

if ($allData)
{
set printstylesheet="AllData-fo.xsl";
$psname = "c:\\_epictemp\\" . $model . "_alldata.ps"
$pdfname = $outdir . $model . "_alldata.pdf"
print composed wait printer="$useprinter" file="$psname";
_pubpdf::run_distiller("$psname","$pdfname");
message "Published All Data Report"
$correct='1';
remove_file "$psname";
}

Here is where it calls the Pagemaster:

<xsl:template match="index">
<fo:page-sequence master-reference="PageMaster" initial-page-number="1">
...
<fo:flow flow-name="xsl-region-body" margin-top="1.00in">
<fo:block-container>
<fo:table border-style="solid" border-color="black" border-width="1pt">
<fo:table-column column-width="0.50in"/">
<fo:table-column column-width="0.50in"/">
<fo:table-column column-width="0.75in"/">
<fo:table-column column-width="0.70in"/">
<fo:table-column column-width="2.25in"/">
<fo:table-column column-width="0.80in"/">
<fo:table-column column-width="0.75in"/">
<fo:table-column column-width="1.00in"/">
<fo:table-column column-width="1.00in"/">
<fo:table-column column-width="1.75in"/">
<fo:table-body>
<xsl:apply-templates select="./item">
<xsl:sort select="mpcnum"/">
</xsl:apply-templates>
</fo:table-body>
</fo:table>
</fo:block-container>

I'd try eliminating the variables one at a time. First, take your
custom ACL out by just doing a "File", "Publish", "PDF File" and
specifying your XSL-FO style sheet. You may not get the right overall
result without your custom code, but if it exercises the landscape
page code in your style sheet without the upside-down page problem,
you'll know where to focus your efforts next.

If you still get upside-down pages, try the same thing after a "set
usedistiller=off" so that Direct PDF is used, instead.

If that fails, too... I noticed you skipped some code between the
fo:page-sequence and fo:flow starting tags. Are you sure there isn't
anything fun and exciting going on there? 🙂

-Brandon 🙂


On Mon, Dec 12, 2011 at 10:13 AM, Price, Sarah CTR
<sarah.r.price@uscg.mil> wrote:
> We are using Distiller. I've tried this in Distiller version 9.4 and 7.1, same result in both. The version it worked in was Arbortext 5.3 M090. I use an ACL to call the publish function and correct stylesheet.
>
> Here is the publish part of the ACL. There was some package changes between the versions could it be something with the _pubpdf::run_distiller???:
>
> if ($allData)
> {
> set printstylesheet="AllData-fo.xsl";
> $psname = "c:\\_epictemp\\" . $model . "_alldata.ps"
> $pdfname = $outdir . $model . "_alldata.pdf"
> print composed wait printer="$useprinter" file="$psname";
> _pubpdf::run_distiller("$psname","$pdfname");
> message "Published All Data Report"
> $correct='1';
> remove_file "$psname";
> }
>
> Here is where it calls the Pagemaster:
>
> <xsl:template match="index">
> <fo:page-sequence master-reference="PageMaster" initial-page-number="1">
> ...
> <fo:flow flow-name="xsl-region-body" margin-top="1.00in">
> <fo:block-container>
> <fo:table border-style="solid" border-color="black" border-width="1pt">
> <fo:table-column column-width="0.50in"/">
> <fo:table-column column-width="0.50in"/">
> <fo:table-column column-width="0.75in"/">
> <fo:table-column column-width="0.70in"/">
> <fo:table-column column-width="2.25in"/">
> <fo:table-column column-width="0.80in"/">
> <fo:table-column column-width="0.75in"/">
> <fo:table-column column-width="1.00in"/">
> <fo:table-column column-width="1.00in"/">
> <fo:table-column column-width="1.75in"/">
> <fo:table-body>
> <xsl:apply-templates select="./item">
> <xsl:sort select="mpcnum"/">
> </xsl:apply-templates>
> </fo:table-body>
> </fo:table>
> </fo:block-container>
>

Publish to PDF using to the Direct to PDF method works, but turning the use Distiller on and setting the Adobe PDF printer it does not work.

I can open the same file in Arbortext 5.3 M090 and with Distiller turned on and the Adobe PDF printer set, it works fine. MMMM!!! :-(! Arbortext 6.0 bug?

Yes, that sounds rather bug-ish. In fact, I just tried duplicating
this in 6.0 F000 with a very simple XSL-FO style sheet built in Styler
and my landscape page is upside-down, too (same thing happened after
switching the style sheet to FOSI). Time to get PTC Support on the
phone.

On the other hand, this might also be a good time to look at moving to
Direct PDF. If it can meet your requirements, you'd have one less
moving part (Distiller) in the system. I haven't done any serious
comparisons, myself, but I understand the reasons to stick with
Distiller have decreased significantly over the last couple of
versions, for many use cases.

-Brandon 🙂


On Mon, Dec 12, 2011 at 10:48 AM, Price, Sarah CTR
<sarah.r.price@uscg.mil> wrote:
> Publish to PDF using to the Direct to PDF method works, but turning the use Distiller on and setting the Adobe PDF printer it does not work.
>
> I can open the same file in Arbortext 5.3 M090 and with Distiller turned on and the Adobe PDF printer set, it works fine. MMMM!!! :-(! Arbortext 6.0 bug?
>

Adobe products make a best guess as to page orientation based on an interpolation of the majority of content on a given page.

There could be a difference in the output and how Adobe is seeing it---something that wouldn't be immediately obvious from reviewing your Arbortext code. This doesn't mean you're out of luck, but it does tend to warrant a PTC support case to ensure against a 6.0 bug.

As Brandon suggests, a careful analysis starting without your ACL is a good approach. Heck, I'd even test some landscape-oriented data using a sample Arbortext file from axdocbook or similar doctype and Distiller to see how that landscape page renders.

If the XSL-FO engine produces good landscape there, then you know it's something with your environment---which may still be triggering a 6.0 bug. I don't have Distiller, or I'd have tried that myself. 😉

Cheers,
Jason

Jason Aiken
Sr. Consultant
TerraXML, Inc.

Thanks for all your help. I will give PTC a call.

We are slowly moving our pubs over to the Direct to PDF method. With this promotion we will have 80% moved over but with this bug it might be more like 100%.

Thanks again! :-)!

A couple of other things you could try:

Do a Print Preview and see if the pages are upside down in that view. This is the TeX that gets transformed to Postscript that gets distilled into PDF.
You could also Print Composed -> print to file, which would make a Postscript file. You could distill that separately by opening it with Distiller and see if the PDF looks the same.

This might give you a clue as to where it is happening.

This might also very well be a Bug in Arbortext 6.0. We discovered an Arbortext 6.0 bug involving the inability to print in non-interactive mode. So there *are* bugs.

Thanks. I'm going to give PTC a call. I will post what they say.

Sarah

This may be a Windows 7 bug. When I use SDI Print-to-file to create a landscape cgm graphic at 90° rotation the graphic comes out rotated 270° (relatively upside-down compared to what it should be).

My documents are SGML with FOSI Style sheets, and the graphic mentioned above isn't touched by Arbortext until it is already a graphic. Microsoft doesn't answer the phone when I call. If anyone else solves it I am interested in hearing the solution.

Thanks,
-Andy

\/ AndyEsslinger LM Aero-TechOrderData
_____-/\-_____ (817) 279-0442 1 Lockheed Blvd,MZ4285
\_\/_/ (817) 777 3047 FortWorth,TX 76108-3916

Not sure what to suggest about the problem you describe, Andy, but
Sarah's problem doesn't seem to be related to Windows 7, as I was able
to easily reproduce it on my Vista system.

Jason, I liked your idea of trying to recreate the problem against a
supplied doctype and style sheet, such as Docbook, but I think all of
the supplied style sheets in 6.0 are built for APP, which doesn't play
with Distiller.

I went with the approach of creating a free-form XML document with
just 5 or 6 elements and a minimal Styler sheet that uses obvious
styles for everything, adding a header and footer to the default page
set, copying it and setting the new one to landscape, then invoking
that on a "foldout" element (hrm... clearly, someone's been hanging
out with military DTDs too much, lately) to layout the enclosed
"figure" (just a title and a short para) in landscape.

Both XSL-FO and FOSI engines produced the upside-down page via
Distiller, so it seems pretty likely that this issue is on the Print
Composer side, rather than anything in the style sheet. It'll be
interesting to see whether PTC or Adobe owns up to the root cause. Smiley Happy

-Brandon Smiley Happy


On Mon, Dec 12, 2011 at 11:48 AM, Esslinger, Andy W
<-> wrote:
> This may be a Windows 7 bug. When I use SDI Print-to-file to create a landscape cgm graphic at 90° rotation the graphic comes out rotated 270° (relatively upside-down compared to what it should be).
>
> My documents are SGML with FOSI Style sheets, and the graphic mentioned above isn't touched by Arbortext until it is already a graphic. Microsoft doesn't answer the phone when I call. If anyone else solves it I am interested in hearing the solution.
>
> Thanks,
> -Andy
>
> \/ AndyEsslinger LM Aero-TechOrderData
> _____-/\-_____ (817) 279-0442 1 Lockheed Blvd,MZ4285
> \_\/_/ (817) 777 3047 FortWorth,TX 76108-3916
>
>

Just go the official word from PTC. This is the work around:


"The Adobe PDF driver needs to be set up with a landscape letter page.

Adding the 11” wide by 8.5” tall page size to the Adobe PDF driver, Distiller will produce the desired result.

To do this, right-click on the Adobe PDF driver in the printers window and select properties. Then select Printing Preferences on the General tab, and go to the Adobe PDF Settings tab. There, press the Add button after “Adobe PDF Page Size” and add the landscaped letter page size. Set width to 11.0 and height to 8.5. Highlight whatever value appears in the Paper Names dropdown and give it a name like landscape, then select Add/Modify."


Announcements

Top Tags