Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7166347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:23:55+00:00 2026-05-28T14:23:55+00:00

I have two files. I want to create pdf with these two files. does

  • 0

I have two files.

I want to create pdf with these two files.

  1. does anyone know program on linux that can do that?
  2. whats the command?

The first one is xhtml/xml file:

<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<table border="1">
    <tr>
        <td>Day/Time</td>
        <td>7.30</td>
        <td>8.15</td>
        <td>9.05</td>
        <td>9.50</td>
        <td>10.40</td>
        <td>11.25</td>
        <td>12.15</td>
        <td>13.00</td>
        <td>13.50</td>
        <td>14.35</td>
        <td>15.25</td>
        <td>16.10</td>
        <td>17.00</td>
        <td>17.45</td>
        <td>18.35</td>
    </tr>
    <tr>
        <td>Monday</td>
        <td colspan="4"></td>
        <td colspan="2">UvIn 134 1.P</td>
        <td colspan="3">Mult 134 3.P -> 137</td>
        <td colspan="6"></td>
    </tr>
    <tr>
        <td>Tuesday</td>
        <td colspan="2">InTe 135 1.P</td>
        <td></td>
        <td colspan="3">MaAn 336 1.P</td>
        <td></td>
        <td colspan="2">AlSu 134 1.P</td>
        <td colspan="2"></td>
        <td colspan="2">AlSu 135 1.P</td>
        <td colspan="2"></td>
    </tr>
    <tr>
        <td>Wednesday</td>
        <td colspan="2"></td>
        <td colspan="3">Kart 134 2.PV</td>
        <td colspan="2">INTE 041 2.PV</td>
        <td></td>
        <td colspan="2">Aj 139 1.P</td>
        <td colspan="5"></td>
    </tr>
    <tr>
        <td>Thursday</td>
        <td colspan="2"></td>
        <td colspan="2">GeIn 139 2.PV</td>
        <td colspan="3">SePr 135 1.P</td>
        <td colspan="8"></td>
    </tr>
    <tr>
        <td>Friday</td>
        <td colspan="15"></td>
    </tr>
</table>
</body>
</html>

and the second one is .xsl file – combined xslt+xsl-fo:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"     xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:a="http://www.w3.org/1999/xhtml">
  <xsl:template match="a:html">
    <fo:root>
      <fo:layout-master-set>
        <fo:simple-page-master master-name="a4">
          <fo:region-body padding-top="1in" padding-left="1.5mm" background-color="#222"/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <xsl:apply-templates/>
    </fo:root>
  </xsl:template>

  <xsl:template match="a:body">
    <fo:page-sequence master-reference="a4">
      <fo:flow flow-name="xsl-region-body">
        <fo:table>
          <fo:table-body background-color="#333">
            <xsl:for-each select="a:table/a:tr">
              <fo:table-row>
                <xsl:for-each select="a:td">
                  <fo:table-cell padding="0.5mm" border-width="2mm" border-style="outset" border-color="#bbb" color="#aaff00" font-weight="bold" font-family="arial" text-align="center">
                    <xsl:if test="@colspan"><xsl:attribute name="number-columns-spanned"><xsl:value-of select="@colspan"/></xsl:attribute></xsl:if>
                    <xsl:value-of select="."/>
                  </fo:table-cell>
                </xsl:for-each>
              </fo:table-row>
            </xsl:for-each>
          </fo:table-body>
        </fo:table>
      </fo:flow>
    </fo:page-sequence>
  </xsl:template>
</xsl:stylesheet>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:23:56+00:00Added an answer on May 28, 2026 at 2:23 pm

    You’ll need an XSLT processor, xsltproc is probably already in your Linux distribution. Then you’ll need a processor to convert the FO (Formatting Objects) to a PDF. Apache has a free FO processor (FOP): Apache™ FOP: Downloading A Distribution

    Once you have a FOP downloaded and extracted, your pipeline might look something like this:

    $ xsltproc so.xsl so.xml > so.fo
    $ <path-to-extracted-fop-dir>/fop so.fo so.pdf
    

    I’ve tried as much with your provided XML source and XSLT, and there were errors when running Apache FOP. I don’t know anything about your XSLT, so you might be able to get around the errors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose that you have two huge files (several GB) that you want to concatenate
On windows, I have two source files and want to create a patch with
I want to create a program that creates .txt files with random characters, but
I have two plist files that I'm using as datasources to create NSArray and
I want to merge two CSV files that I have read into python using
I have two text files, I want to place a text in the middle
i have the form, and i want to upload two files. here is the
I have an ANSI C program comprising two files. The first file contains the
i am using zend_pdf to create pdf files from persian language texts. i have
I'm using python 2.6 on linux. I have two text files first.txt has a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.