XSL FO Cover page in PDF-readers double page view - xslt

Is there a way to mark the title page as such in xsl fo? When I open my document in the pdf reader in double page mode I would like to see the cover page alone first and then the content pages next to each other.
so:
page 1 : cover -> single view
Page 2 : Content -> double view left side
Page 3 : Content -> double view right side
Instead, I'm currently having
Page 1 : cover -> double view left side
Page 2 : Content -> double view right side
Page 3 : Content -> double view left side
etc.
There must be an attribute for this, or not?
I am using Apache FOP v2.3

You can set custom PDF properties using FOP (see https://xmlgraphics.apache.org/fop/2.4/output.html#custom-document-properties), but I can't see how to influence the PDF display.
If you were using AH Formatter, you'd use axf:document-info (see https://www.antennahouse.com/product/ahf70/docs/ahf-ext.html#axf.document-info), but I can't see an equivalent for FOP in https://xmlgraphics.apache.org/fop/2.4/extensions.html.

Related

Oracle APEX - hyperlink shown as text on a static region

I have a static region and I want to set it to some text with a hyperlink. Text comes from the database - returned by a function.
So I added a page item (P1_LINK_TEXT) to the page and added a computation to my page item that is set to PL/SQL expression:
MyFunction('MY_TEXT')
The region Header Text to &P1_LINK_TEXT.
It works great, except the hyperlink displayed as is - Click here
instead of displaying the link. I made sure that Attributes->Settings->Output As is set to HTML but still, the hyperlink is not displayed correctly. What am I doing wrong?
Use the escape filter to ensure html characters are not escaped. To display the item as html use this notation:
&P1_LINK_TEXT!RAW.

Oracle Apex How to display page item as url

I have a page item which stores URL.
How do i change its type to URL so that the link becomes clickable.
As of now, there is page subtype url, but setting it doesn't make any difference.
Apex 21.1
A text field is an html input element, that will display text only, you probably could write some javascript to open whatever is in the page item in an url but that is confusing functionality. What should happen if the user clicks in the input element ? Should it open the link or should the user be editing the value ?
This is a possibility.
Create a page item on your page, say P1_URL
Add the following in the "Post Text" attribute of the page item (style it to your own preference):
<span class="fa fa-external-link" aria-hidden="true"></span>
Add a dynamic action on change of the element P1_URL with a true action of "Execute Javascript Code" and the following code:
$("#myurl").attr("href", apex.item( "P13_URL" ).getValue())
Check "Fire on Initialization" for the true action.
That is all there is to it, now when you add something in the page item P1_URL and click the link, it will open the that url in a new window.
UPDATE: Technique for read only text field.
For a read only text field, the input element is hidden and an additional span element is rendered with an the page item name as id, suffixed by _DISPLAY. The trick is to grab the content of that span element and add an anchor with attributes. This can be done with an onload dynamic action:
Create a page item on your page, say P1_URL, set it to "Read-Only: Always"
Add a dynamic action on Page Load with a true action of "Execute Javascript Code" and the following code:
let itemVal = $("#P1_URL_DISPLAY").text()
$("#PP1_URL_DISPLAY").html(`<a href='${itemVal}' target='_blank'>${itemVal}</a>`)
Make sure that when you copy this, the quotes are exactly the same: the outer quotes are backticks, those are needed for the ES6 syntax.
Note: check the page documentation for the subtype url - it explains exactly what it does.

Adding a multiple Image gallery to a page with text?

I'm learning Wagtail and I'm trying to make a basic Ecommerce style site. The layout will be:
Home Page
-> Products
-> Product 1
-> ...
-> Product N
-> About
-> Contact
In the Product page I want to have a Title, Description, Picture gallery or just display a few pictures and eventually tags (But this post is about the Images). I have checked this Documentation which explain how to add Abstract Images in the View but it leaves me confused on what to import and add to the model, what type? when I just want to add 1,2...n Images on a Product page. The documentation only explains how to add an Image into a form and it leaves me wondering should I use a Django type or Wagtail type?
How would I add the ability to upload/remove images from the admin console Product page?

ORACLE APEX: Getting the value from page item and use it to another page item

I have two forms:
first one:
5000_Works,
with items:
P5000_ID,
P5000_Working_Date,
P5000_QTY
and the second form:
5001_Tasks,
with items:
P5001_ID,
P5001_QTY
I open the second form from the first one and i want to put the value of P5000_QTY to the second page item P5001_QTY.
How can i do that?
Thank you
One option is to create a button which - when pushed - redirects to another page in this application. When you click on the "Target" (in "Behavior" properties section), you can tell Apex to:
navigate to page 5001
set item P5001_QTY to value &P5000_QTY. Note leading ampersand & and trailing dot .
And that's it ...
If it isn't a button but a branch, the principle is the same - using the Link Builder you'd do exactly the same.

Footer on First page only with FreeMarker

I am using FreeMarker to generate pdfs
I need the footer to only be shown on the first page only no matter how many pages long my content becomes
If I use #footer {position: running(footer);}
It is shown on all pages, I do not want that, how can I achieve it only on 1 page