Git Product home page Git Product logo

publisher's Introduction

Join the chat at https://matrix.to/#/#speedata_publisher:gitter.im Fund the development Platforms

speedata Publisher

About

The speedata Publisher is a full featured and mature database publishing software. It generates PDF files from XML data and XML layout instructions. It is used to make product catalogs and other documents with high demands on the layout.

Its built-in layout description language allows you to create almost arbitrary layouts, while keeping the job as simple as possible.

Think of it as “XSL-FO on steroids” or “server side InDesign”.

Examples

There are some examples in the example repository on GitHub. Also, there are lots of small examples in the qa subdirectory that is used for quality assurance. See also our showcase.

Can I use this in production?

Yes. Absolutely. We release stable (long term support) versions once in a while which are heavily tested in commercial environments and we release development versions often. Note that these development are still safe to use, they just might contain some experimental new features.

Funding

This project heavily depends on business and user funding. Every bug report is welcome and every feature request is carefully considered. But without time to spend, this is very hard for me to work on. I might add the “needs funding” label on a bug report or feature request once in a while if I think that I can't implement this while doing other things.

To support the sustainable development of the speedata Publisher, please consider clicking on the “sponsor” button or request a support and maintenance pack by contacting speedata.

For a list of upcoming and recent features see the news file.

Installation

Just get one of the ready-to-run packages from https://download.speedata.de/ and follow the directions inside the ZIP file (=just extract and set the PATH variable). See the installation instructions in the manual.

Manual

Our documentation is available online: https://doc.speedata.de/ and included in the distribution (sp doc).

Bugs

Please use the GitHub bug tracker for reporting bugs or write an email. See below for contact details.

License / Contributing

The license is AGPLv3, see the file COPYING in the root directory.

We welcome contributions. Just follow the GitHub procedure (fork, pull requests). The installation manual has a section on building the binary from the source code.

Contact / Support

We offer commercial support for the speedata Publisher. You can find the contact information on the webpage.


Source: https://github.com/speedata/publisher/
News: https://news.speedata.de/
Webpage: https://www.speedata.de/
Chat: https://matrix.to/#/#speedata_publisher:gitter.im

publisher's People

Contributors

danielhjames avatar demosteneus avatar iclukas avatar langmic avatar ousia avatar pgundlach avatar pr-apes avatar sgershon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

publisher's Issues

Placing header/footer outside pagecontent? (Rendering table with "Ausgabe")

Working with speedata publisher is a pleasure and while doing another proof of concept a few questions came up.

The given document needs an permanent (on each page) header and footer outside the general page/content area. That was realized by defining a "Rand" and a smaller "Platzierungsbereich" while placing the header/footer content inside the Rand but outside the Platzierungsbereich.

  <Seitentyp name="Seite rechts" bedingung="sd:ungerade( sd:aktuelle-seite() )">
    <Rand links="2.5cm" rechts="2cm" oben="1.7cm" unten="1cm" />
    <Platzierungsbereich name="text">
        <Platzierungsrahmen breite="{ sd:anzahl-spalten() }" höhe="{ sd:anzahl-zeilen() - 2 }" zeile="2" spalte="1"/>
    </Platzierungsbereich> 
    <BeiSeitenAusgabe>
<!-- header -->
<ObjektAusgeben spalte="1" zeile="1">
            <Textblock breite="12">
              <Absatz schriftart="Kopfzeile" textformat="links"><Wert>Header</Wert></Absatz>
            </Textblock>
          </ObjektAusgeben>
...

In general text ist rendered using "Ausgabe" with target Platzierungsbereich "text" to take care of the header-area if content fits more than one page.

<Datensatz element="Text">
    <Ausgabe bereich="text">
      <Text>
        <Absatz>
            <FürAlle auswahl="*">
                <Wert auswahl="." />
            </FürAlle>
        </Absatz>
....

The reason why i create this issue: If i gonna place a table inside the document i cannot use "Ausgabe" but only "ObjektAusgeben" which doesn't respect the Platzierungsbereich "text" and overwrites the header-area on the second page if the table is longer than one page.

  <Datensatz element="Tab">
  <ObjektAusgeben spalte="1">
    <Tabelle border-collapse="collapse" breite="42" padding="1mm" zeilenabstand="0mm" spaltenabstand="0pt" dehnen="max">
...

Is there a solution for that? The only workaround (i actually see) is to do a first pdf-generation without header/footer and a second run with different configuration to place header/footer outside the pagecontent.

Thanks in advance and kind regards!

Issue with textframe example

I changed one col of the textframe layout.xml example document to a width of 3 units

<Platzierungsbereich name="text">
  <Platzierungsrahmen breite="4" höhe="17" zeile="2" spalte="1"/>
  <Platzierungsrahmen breite="3" höhe="10" zeile="3" spalte="6"/>
  <Platzierungsrahmen breite="4" höhe="24" zeile="1" spalte="11"/>
</Platzierungsbereich>

The middle box is rendered with a 3 units wide however the text flows over 4 units...bug or feature?
screenshot 2014-10-05 14 10 54

grid cells rounding error

Unconfirmed, but very likely :)

one has give 69,99mm instead of 70mm grid size (height?, probably both)

Linux binary releases older than Win/Mac and not 32bit

Hi Patrick,

I have just been searching for binary Linux releases of Publisher and I have realized two things:

  • Binaries aren’t provided for 32bit architectures.
  • Linux binaries are older than the Windows or Mac binaries.

Is there any reason, at least for the second issue.

Many thanks for your help,

Pablo

hyphenation patterns for grc missing

Hyphenation patterns for ancient Greek are missing (to be found here).

Just in case you wonder, polytonic Greek is the way modern Greek was written until the monotonic ortography reform in 1982. Hyphenation rules for polytonic Greek and ancient Greek are different.

[Sorry, if the previous explanation was obvious to you.]

Many thanks for your help.

LuaTeX error

<Layout
  xmlns:sd="urn:speedata:2009/publisher/functions/en"
  xmlns="urn:speedata.de:2009/publisher/en">

  <DefineTextformat name="foo" margin-top="2mm"/>

  <Record element="data">
    <PlaceObject>
      <Table>
        <Tr>
          <Td>
            <Paragraph textformat="foo"/>
          </Td>
        </Tr>
      </Table>
    </PlaceObject>
  </Record>
 </Layout>

gives me:

!LuaTeX error: There should have been a lua <node> here, not an object with type nil!
 ==> Fatal error occurred, no output PDF file produced!

[2.0.0] Using B-Tag to format Wert taken from xml-node-text (dynamic)

While creating some test-layouts i'm trying to format text bold with B-Tag. In my case it works only for static input and not for value taken from xml.

      <Textblock breite="20" schriftart="Deckblatt">
        <Absatz>
<!-- works -->
          <B><Wert>Dieser statische Text erscheint fett</Wert></B>
<!-- doesn't work -->
          <B><Wert auswahl="titel" /></B>
         <!-- text of "titel"-node will be displayed, but not in bold format -->
        </Absatz>
      </Textblock>

Is this behaviour a bug and is there a workaround?

Kind regards

btw: using version 2.0.0 on MacOSX

css parsing error

 .foo {padding-right:2mm;padding-left:2mm;valign:top;}

=>

Error: /Users/patrick/work/software/publisher/src/lua/css.lua:58: attempt to perform arithmetic on local 'rule_stop' (a nil value)
stack traceback:
    ...ick/work/software/publisher/src/lua/publisher/spinit.lua:39: in function 'call'
    ...ick/work/software/publisher/src/lua/publisher/spinit.lua:232: in function 'main_loop'
    ...ick/work/software/publisher/src/lua/publisher/spinit.lua:264: in main chunk
    [C]: in function 'require'
    [\directlua]:1: in main chunk

[2.1.26] Creating a Rahmen enclosing TextBlock and Tabelle only surrounds Tabelle

The following code produces a border that encloses the table, but not the contained text.
Any ideas how to create such a bounding box without placing the text in the table.

    <ObjektAusgeben spalte="1" zeile="43" vreferenz="bottom">
        <Rahmen linienstärke="0.5pt">
            <Textblock>
                <Absatz>
                  <Wert>Headline</Wert>
                </Absatz>
            </Textblock>
            <Tabelle breite="42" padding="1mm" zeilenabstand="0mm" spaltenabstand="0pt" dehnen="max">
                <Spalten>
                    <Spalte breite="7" />
                    <Spalte breite="35" />
                </Spalten> 
                    <Tr>
                        <Td><Absatz><Wert>Zelle A</Wert></Absatz></Td>
                        <Td><Absatz><Wert>Zelle B</Wert></Absatz></Td>
                    </Tr>
            </Tabelle>
        </Rahmen>
    </ObjektAusgeben>

Absolute positioning with respect to area

When we use PlaceObject with an absolute position (row="3cm" column="5cm") the given lengths are from the top left corner of the page. These should be from the top left corner of the current area.

issue when listing fonts

Hi Patrick,

when I tried to list fonts in Windows, I got the following output:

c:\Documents and Settings\user\Desktop>sp --xml list-fonts

Loading file sdini.lua ......eedata-publisher-windows-i386-1.6.8\sw\lua\sdini.lu
a:64: ...eedata-publisher-windows-i386-1.6.8\sw\lua\sdini.lua:48: attempt to ind
ex local 'attr' (a nil value)
Total run time: 16.1696885s
exit status 1
Total run time: 16.1696885ss

I don’t know whether this might be a bug.

Many thanks for your help,

Pablo

speedata Publisher drops some characters

Some characters, such as à, are not present in the output. This is probably due to a behavior in the selene unicode library which doesn't look at complete utf-8 sequences, but only at single bytes. So C3A0 matchs %s. Adding anchors to the pattern fixes that problem.

indirect grid size

It would be nice to say something like grid="6x9" instead of cell height / width.

Endless loop

Using the textframe example. I adjusted the SetzeRaser.breite from 1cm to 10cm (for evil reasons):

<Seitenformat breite="16cm" höhe="12cm"/>
<SetzeRaster breite="10cm" höhe="12pt"/>

<Seitentyp name="page" bedingung="true()">
  <Rand links="1cm" rechts="1cm" oben="1cm" unten="1cm"/>
  <Platzierungsbereich name="text">
    <Platzierungsrahmen breite="4" höhe="17" zeile="1" spalte="1"/>
    <Platzierungsrahmen breite="4" höhe="10" zeile="1" spalte="6"/>
    <Platzierungsrahmen breite="4" höhe="24" zeile="1" spalte="11"/>
  </Platzierungsbereich>
</Seitentyp>

<Datensatz element="data">
  <Ausgabe bereich="text">
     <Text>
     <Absatz>
       <Wert auswahl="string(.)"/>
     </Absatz>
    </Text>
  </Ausgabe>
</Datensatz>

Running sp results in an infinite loop showing

Page of type "page" created (3898)
Number of rows: 24, number of columns = 2

Shipout page 3898
Page of type "page" created (3899)
Number of rows: 24, number of columns = 2
Shipout page 3899
Page of type "page" created (3900)
Number of rows: 24, number of columns = 2
Shipout page 3900

on the console - sp never stops.

Check examples

There seems to be a problem with the correct rendering of the examples.

Frame / backgroundcolor broken

<?xml version="1.0" encoding="UTF-8"?>
<Layout 
  xmlns="urn:speedata.de:2009/publisher/en" 
  xmlns:sd="urn:speedata:2009/publisher/functions/en">

  <DefineColor name="red" value="#f00"/>

  <Pageformat width="5cm" height="5cm"/>

  <Record element="data">
    <PlaceObject >
      <Frame backgroundcolor="red" framecolor="red">
        <Textblock>
          <Paragraph>
            <Value>Text text text text</Value>
          </Paragraph>
        </Textblock>
      </Frame>
    </PlaceObject>
  </Record>
</Layout>

should give a red box. Instead, its background is white.

whitebg

No comment after ?xml possible

Layout:

<Layout xmlns="urn:speedata.de:2009/publisher/en">
  <Record element="data">
    <Message select="'hello from data'"/>
  </Record>
</Layout>
<?xml version="1.0"?>
<!-- WTF, no comment allowed here? -->
<data>
    <titel>Hello world!</titel>
</data>

Breaks

Documentation of Stylesheet usage/support

Is there any documentation of Stylesheet definitions supported by elements using the "class" attribute like "Absatz"? Maybe i missed something in the reference/documentation section.
(Even a shortcode to the related source-code in repo may help.)

Best regards
M. Deutschmann

Building documentation fails

Using sprun --docto build the documentation brings up only this result: The file /Users/daniel/Repos/publisher/build/handbuch_publisher/index.html does not exist.

document merging?

Patrick,

[Excuse me for my stupid (i.e. too basic) question.]

How could I use document merging with Publisher?

I would like to use Publisher for document merging at work and I wonder whether this would be possible without external tools.

Many thanks for your help,

Pablo

[2.1.26] Create internal links?

Is it possible to create pdf-internal hyperlinks with A-Tag? How to place an anchor and how to format the href-attribute of the A-Tag?

Thanks in advance and kind regards!

Error on EAN13 when showtext="yes" and not enough numbers

<?xml version="1.0"?>
<Layout
  xmlns:sd="urn:speedata:2009/publisher/functions/en"
  xmlns="urn:speedata.de:2009/publisher/en">

  <Record element="data">
    <PlaceObject>
      <Barcode select="'123456789012'" type="EAN13" width="4cm" showtext="yes"/>
    </PlaceObject>
  </Record>
</Layout>

gives this error:

!LuaTeX error: There should have been a lua <node> here, not an object with type nil!
 ==> Fatal error occurred, no output PDF file produced!
Total run time: 311.732ms
exit status 70

.css direct formatting?

After reding this article, I wonder whether it would be possible to format XML sources with only CSS.

It seems that O’Reilly is moving their book publishing from DocBook to HTMLBook.

Maybe it would be interesting to you.

--jobname ignored

sp --jobname foo

is supposed to generate foo.pdf? The result PDF is always needs publisher.pdf (tested with the unstable release as of today).

Filling table cells from XPath

When filling table cells from XPath returns the following error:

/Users/daniel/Repos/publisher/src/lua/xpath.lua:319: bad argument #1 to 'ipairs' (table expected, got nil)stack traceback:
    .../daniel/Repos/publisher/src/lua/publisher/spinit.lua:51: in function 'call'
    .../daniel/Repos/publisher/src/lua/publisher/spinit.lua:250: in function 'main_loop'
            <Tabelle breite="1">
                <Tr>
                    <Td align="center"><Absatz><Bild breite="1" datei="loginpriintsuite.png" /></Absatz></Td>
                </Tr>
                <Tr>
                    <Td align="center"><Absatz><Wert auswahl="ArtikelNr" /></Absatz></Td>
                </Tr>
                <Tr>
                    <Td align="center"><Absatz><Wert auswahl="Bezeichnung" /></Absatz></Td>
                </Tr>
                <Tr>
                    <Td><Absatz><Wert auswahl="UPE" /></Absatz></Td>
                </Tr>
            </Tabelle>

Formatting issue in issueshape/layout.xml

I am playing with the publisher example - in particular with issueshape/layout.xml. I changed the "breite" value to 8. My expectation is that the image size decrease and all text would continue to flow around.

  <Sonst>
    <ObjektAusgeben spalte="10" zeile="10" belegen="ja">
      <Bild datei="taschenuhr.pdf" breite="8"/>
    </ObjektAusgeben>
  </Sonst>

However there is some text into the image...bug or feature?
publisher-0

Bad table break / text overlaps

<Layout
  xmlns:sd="urn:speedata:2009/publisher/functions/en"
  xmlns="urn:speedata.de:2009/publisher/en">

  <Record element="data">
    <PlaceObject>
      <Table>
        <Columns>
          <Column width="1*"/>
          <Column width="1*"/>
          <Column width="32.5mm"/>
          <Column width="32.5mm"/>
          <Column width="32.5mm"/>
          <Column width="32.5mm"/>
        </Columns>
        <Tr>
          <Td><Paragraph><Value>Alongword (111.111)</Value></Paragraph></Td>
          <Td><Paragraph><Value>without text</Value></Paragraph></Td>
          <Td colspan="4"><Paragraph><Value>12345</Value></Paragraph></Td>
        </Tr>
      </Table>
    </PlaceObject>
  </Record>
</Layout>

yields

bildschirmfoto 2014-12-05 um 11 37 45

Version: 2.1.32-51d71d60

sprun:55: module 'optionparser' not found

/tmp/test/publisher/bin/sprun:55: module 'optionparser' not found:
no field package.preload['optionparser']
no file '/opt/texlive2011/bin/universal-darwin/src/lua/optionparser.lua'
no file '/opt/texlive2011/bin/universal-darwin/lib/optionparser.lua'
no file '/opt/texlive2011/bin/universal-darwin/src/lua/common/optionparser.lua'
no file './optionparser.so'
no file '/usr/local/lib/lua/5.1/optionparser.so'
no file '/usr/local/lib/lua/5.1/loadall.so'

The problem comes, when TeXlive is in the PATH.

superscript misaligned

Misaligned superscript in:

<?xml version="1.0" encoding="UTF-8"?>
<Layout 
  xmlns="urn:speedata.de:2009/publisher/en" 
  xmlns:sd="urn:speedata:2009/publisher/functions/en">
  <Options trace="no"/>

  <Record element="data">
    <PlaceObject>
      <Textblock>
        <Paragraph>
          <Value>99</Value><Sup><Value>9</Value></Sup>
        </Paragraph>
      </Textblock>
    </PlaceObject>
  </Record>
</Layout>

superscript

Building documentation with "sdcontrol -m" fails

Following the guidelines for documentation building process, only this error message shows up:

/Users/daniel/Repos/publisher/bin/sdcontrol:13: module 'optionparser' not found:
    no field package.preload['optionparser']
    no file '/usr/local/texlive/2011/bin/x86_64-darwin/src/lua/optionparser.lua'
    no file '/usr/local/texlive/2011/bin/x86_64-darwin/lib/optionparser.lua'
    no file '/usr/local/texlive/2011/bin/x86_64-darwin/src/lua/common/optionparser.lua'
    no file './optionparser.so'
    no file '/usr/local/lib/lua/5.1/optionparser.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'

issue with spaces in Windows directory names

Hi Patrick,

I have tried to list the system fonts using the instructions and I got the following result:

c:\Documents and Settings\USUARIO\Escritorio>sp --xml list-fonts
Script file C:\Documents not found
Total run time: 187.5ms
exit status 1
Total run time: 187.5ms

I don’t know whether I’m doing something wrong, but it seems that sp has problems with spaces in directory names.

Just in case it helps,

Pablo

binary names collision

I’m not a coder, and I might be wrong.

I have already luatex installed on my system twice (it comes with TeX Live 2013 and with ConTeXt Standalone).

Wouldn’t it be better to rename the luatex binary to luatex_sp, luatex-sp or something similar to avoid file name collisions.

Many thanks for your help,

Pablo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.