Page 1 of 1

Not a Problem, But an HTML and PDF Publishing Question

Posted: Tue Aug 02, 2022 11:17 pm
by patjporter
Hello again,
I have a question I was hoping your could help with regarding publishing HTML to PDF. The source file is an HTML file, and I have an accompanying PDF file.
Does Oxygen have the capability to produce a PDF from HTML if the source is not DITA XML?
I am using these files (see attached .zip file please) to create a 5.5in x 8.5in wide PDF "cover page" for PDF documents, so that as I add PDF documents to the aggregated PDF, I can easily update the cover page with an entry and an href to a named destination in the PDF.
As a related question, I am trying to get the <footer> with the <table> and <img> elements to "stick" on the bottom of the page and repeat on each page if the content overflows...I have tried a few techniques I found online but they don't appear to be working for me and was wondering if you had a technique that would work. I thought maybe I could "borrow" from your Styles Basket template and CSS
I realize this is outside the normal scope of PDF Chemistry but since I used Oxygen to create it, I thought I might ask.
Thank you for any help you may be able/willing to provide.
Sincerely,
Pat
Tab Index Pages.zip
(2.16 KiB) Downloaded 136 times

Re: Not a Problem, But an HTML and PDF Publishing Question

Posted: Wed Aug 03, 2022 1:23 pm
by chrispitude
Hi Pat,

I have never used it (we publish only DITA), but indeed PDF Chemistry supports publishing not only DITA, but also HTML and XML content. If you look at the documentation:

https://www.oxygenxml.com/pdf_chemistry ... ation.html

you will see documentation for each flow.

Note that PDF Chemistry is the publishing engine that Oxygen's PDF-CSS-HTML5 transformation provides to you. However, PDF Chemistry can also be purchased as a standalone command-line publishing tool for automated production flows (which is something that we also do).

As long as your own HTML matches the CSS selectors in the Styles Basket CSS, you should have reasonable results. Depending on how those selectors are written, you might need to add @class attributes to your HTML to match the selectors, or you might need to modify the CSS selectors to match your HTML.

Re: Not a Problem, But an HTML and PDF Publishing Question

Posted: Wed Aug 03, 2022 2:00 pm
by julien_lacour
Hi Pat,

As Chris mentioned, Oxygen PDF Chemistry basic functionality is to convert XML and HTML documents into PDFs using CSS, the DITA to PDF is an extension to this process.

Regarding the "cover page", I should highly suggest you to use an SVG file instead of creating tables and move them into the page header and footer.
If it's too hard like this you can still divide the SVG into 3 SVGs: one for the main cover, one for the footer and one for the header. As SVG format supports link, it should be easy to reproduce this output in an image.

Regards,
Julien

Re: Not a Problem, But an HTML and PDF Publishing Question

Posted: Wed Aug 03, 2022 2:14 pm
by patjporter
Thank you Julien, I will try that!
My fundamental problem seems to be that the "footer" does not stick to the bottom of the page, it seems to appear directly under the previous content. Is there any "trick" to making sure the footer stays on the bottom of the page when the page height is specified in the css, in this case 8.5" page height?
Thank you!
Pat

Re: Not a Problem, But an HTML and PDF Publishing Question

Posted: Wed Aug 03, 2022 4:01 pm
by julien_lacour
Hi Pat,

If you are using the 3 images solution, you move the header and footer image into the @top-left/@bottom-left margin boxes:

Code: Select all

@page {
  background-image: url("img/cover.png");
  background-repeat: no-repeat;
  @top-left {
    content: " ";
    background-image: url("img/header.png");
  }
  @bottom-left {
    content: " ";
    background-image: url("img/footer.png");
  }
}
If you only use one image as a cover, you only need the @page background-image (with the no-repeat).

Regards,
Julien

Re: Not a Problem, But an HTML and PDF Publishing Question

Posted: Wed Aug 03, 2022 6:32 pm
by patjporter
Thank you Julien!
Now I just have to learn how to create these as svg’s and add the hyperlink info to them :wink:

Pat