Landscape page formatting in pdf Chemistry
Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
Landscape page formatting in pdf Chemistry
I have a couple of issues with the formatting on landscape pages. I have set wide tables with an outputclass = 'wide' and likewise applied the same to some figures. Using the following CSS, the pages are set to landscape:
In cases that the wide table or figure is the only content of the section, the header for the section is at the top of the previous portrait page, with a blank page below it, and then the table or figure is on the next (landscape) page.
Is there a way in these situations to keep the section header with the figure or table on the landscape page? At present there is a lot of blank space showing in the document.
The second issue is with figures showing on landscape pages. For some reason the caption for the figure is showing on the next page, thus the figure is the only content on the landscape page. I have tried a few different approaches including:
Is there any way to force the caption to stay with the figure?
As a side note on the above: when a table has an attribute orient = land, the landscape page headers behave differently to pages where outputclass = 'wide' is used, even though it has the same rule:
The header content is different from the rest of the document and is rotated down the right side of the page vertically - as if a portrait page has just been rotated 90 deg.
Thanks
Code: Select all
*[outputclass = 'wide'] {
page: wide-page;
}
*[orient = 'land'] {
page: wide-page;
}
@page wide-page{
size: A4 landscape;
margin-left: 1.5cm;
margin-right: 1.5cm;
page-break-after: avoid;
page-break-before: avoid;
}
Is there a way in these situations to keep the section header with the figure or table on the landscape page? At present there is a lot of blank space showing in the document.
The second issue is with figures showing on landscape pages. For some reason the caption for the figure is showing on the next page, thus the figure is the only content on the landscape page. I have tried a few different approaches including:
Code: Select all
*[class ~= "topic/fig"] {
page-break-inside:avoid;
page-break-before:avoid;}
As a side note on the above: when a table has an attribute orient = land, the landscape page headers behave differently to pages where outputclass = 'wide' is used, even though it has the same rule:
Code: Select all
*[orient = 'land'] {
page: wide-page;
Thanks
Re: Landscape page formatting in pdf Chemistry
Hello,
For landscape tables, please read this topic:
https://www.oxygenxml.com/doc/versions/ ... aid-title3
The other issues may be already fixed on the development stream. In case you want to test the fixes, please write us on support (support@oxygenxml.com) in order to receive access to the nightly build.
Many regards,
Dan
For landscape tables, please read this topic:
https://www.oxygenxml.com/doc/versions/ ... aid-title3
The other issues may be already fixed on the development stream. In case you want to test the fixes, please write us on support (support@oxygenxml.com) in order to receive access to the nightly build.
Many regards,
Dan
Re: Landscape page formatting in pdf Chemistry
Hi Dan,
I've reviewed the topic you referenced but couldn't see a fix to avoid the blank space between the topic title and the table. Is that correct?
In some cases I may be able to set the entire topic to outputclass = 'wide' which may resolve the issue. I would then need to apply another rule to start that particular topic on a new page. Any recommendations for this?
I now understand the reason the @orient = 'land' page headers are behaving as they are: [PLUGIN_DIR]css/print/p-pages-and-headers.css. Please excuse my lack of knowledge on this but it should be straight forward to overrule shouldn't it? My attempts to define the landscape page headers don't appear to be working as expected:
Thanks.
I've reviewed the topic you referenced but couldn't see a fix to avoid the blank space between the topic title and the table. Is that correct?
In some cases I may be able to set the entire topic to outputclass = 'wide' which may resolve the issue. I would then need to apply another rule to start that particular topic on a new page. Any recommendations for this?
I now understand the reason the @orient = 'land' page headers are behaving as they are: [PLUGIN_DIR]css/print/p-pages-and-headers.css. Please excuse my lack of knowledge on this but it should be straight forward to overrule shouldn't it? My attempts to define the landscape page headers don't appear to be working as expected:
Code: Select all
@page landscape-page, chapter:left:right {
size: A4 landscape;
@top-left {
content: none
}
@top-center {
content: string(maptitle);
}
@top-right {
content: none
}
@right-bottom {
content: none
}
}
Re: Landscape page formatting in pdf Chemistry
Hello,
To override the content defined in the page rules from the plugins/com.oxygenxml.pdf.css/css/print/p-pages-and-headers.css, you need to just copy the selectors from that CSS and change the generated text.
Many regards,
Dan
Please send us a sample (PDF and .style.xml file from the output folder) to the support@oxygenxml.com email address. We will try to see the exact situation.I've reviewed the topic you referenced but couldn't see a fix to avoid the blank space between the topic title and the table.
To override the content defined in the page rules from the plugins/com.oxygenxml.pdf.css/css/print/p-pages-and-headers.css, you need to just copy the selectors from that CSS and change the generated text.
Many regards,
Dan
Re: Landscape page formatting in pdf Chemistry
Hi Dan, I have finally sent the files over to the support address.Please send us a sample (PDF and .style.xml file from the output folder) to the support@oxygenxml.com email address. We will try to see the exact situation.
-
- Posts: 495
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Landscape page formatting in pdf Chemistry
Post by julien_lacour »
The outputclass solution works as expected:
Regards,
Julien
It's also possible to move the @outputclass on the containing paragraph or inside a div element.Moving the outputclass onto either the <topic>, or the <figure> worked as desired. In each case it will depend on the content, so for some documents setting outputclass = wide on the figure, instead of the image, will work to keep the caption with the figure(image) instead of on the next page.
Regards,
Julien
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service