These are chat archives for speedata/publisher

15th
Feb 2018
Patrick Gundlach
@pgundlach
Feb 15 2018 08:56
@elmcrest Overlay is just special purposes (for example when you want to mention the author of an image and stack the thing on top of each other. - see https://doc.speedata.de/publisher/de/tabellen2/#ch-tab-hintergrund)
@elmcrest All other elements are printend as they come, later objects are printed on top of earlier objects. See https://doc.speedata.de/publisher/de/grundlagen/objekteausgeben/#ch-objekteausgeben
@elmcrest there: Reihenfolge der Objekte
Marius Räsener
@elmcrest
Feb 15 2018 09:15
@pgundlach ok thx, I’m continuing now. Hopefully I get a working example done in the next couple hours :)
Currently I was thinking I need to set the allocation to zero for the background PDF
as things are right now, the PDF doesn’t compile if I also want to use PositioningAreas
Marius Räsener
@elmcrest
Feb 15 2018 09:28
Page of type "first_page" created (1)
Number of rows: 30, number of columns = 21
Searching for image "soft_briefbogen.pdf"
PlaceObject: Image in row 0 and column 0, width=10, height=15 (page 1)
Error: Something is wrong with the current page, expect strange results
Error: ...st/projects/speedata-publisher/sw/lua/publisher/grid.lua:695: attempt to perform arithmetic on field 'column' (a nil value)
stack traceback:
    .../projects/speedata-publisher/sw/lua/publisher/spinit.lua:48: in function 'call'
    .../projects/speedata-publisher/sw/lua/publisher/spinit.lua:305: in function 'main_loop'
    .../projects/speedata-publisher/sw/lua/publisher/spinit.lua:337: in main chunk
    [C]: in function 'require'
    [\directlua]:1: in main chunk
Stop processing data
2 errors occurred
Duration: 0.228597 seconds
In case you’re here, any hints apprecieated :P
Patrick Gundlach
@pgundlach
Feb 15 2018 09:29
Can you send me the layout file?
Marius Räsener
@elmcrest
Feb 15 2018 09:29
Patrick Gundlach
@pgundlach
Feb 15 2018 09:31
The positioningframe is incorrect. You need four values: widht height row and column
all of these have to be numbers without dimensions (grid cells)
Marius Räsener
@elmcrest
Feb 15 2018 09:31
ah ok
works ok! :)
ok, are fractions of grid cells allowed for positioning?
I’ve noticed that performance drops if I create a 1mm x 1mm grid :)
well, I’ll just try
Patrick Gundlach
@pgundlach
Feb 15 2018 09:32
Try out the fractions, I don't think it will work
Marius Räsener
@elmcrest
Feb 15 2018 09:33
nope, it does
so that’s nice
now with a grid of 10mm x 10mm a decimal place for a row or column is a Millimeter
Patrick Gundlach
@pgundlach
Feb 15 2018 09:35
If this is a one-off thing (like a recipient in letter), you can always use absolute positioning with PlaceObject row="10mm" column="14mm" or so
then you don't need an area for that
Marius Räsener
@elmcrest
Feb 15 2018 09:35
I see
for the actual content, I still need an area, right?
Patrick Gundlach
@pgundlach
Feb 15 2018 09:36
In a strict sense you migh not need them, but they make life easier
Marius Räsener
@elmcrest
Feb 15 2018 09:37
ok
Marius Räsener
@elmcrest
Feb 15 2018 10:14
https://dpaste.de/znH0
ok, now I’m stuck trying to align right the second table cell in the first Table
actually, what I want to have, is a Single line with the document titel align left and the document date align right
also the Title has a bigger Font Size
table_align.jpeg
Patrick Gundlach
@pgundlach
Feb 15 2018 10:32
don't use textformats in table cells unless necessary.
And use break-below="no" in Tr, not textformat
I should document this too
Marius Räsener
@elmcrest
Feb 15 2018 10:39
ok, how else do I format text in cells?
removing textformat from the cell worked for the alignment
Patrick Gundlach
@pgundlach
Feb 15 2018 10:40
what other formats do you need?
Marius Räsener
@elmcrest
Feb 15 2018 10:40
ah
ok, so fontface works and is suitable?
Patrick Gundlach
@pgundlach
Feb 15 2018 10:41
yes, fontface is fine
Marius Räsener
@elmcrest
Feb 15 2018 10:41
ok, now I’m just curious why the Tr isn’t split at 50% width
currently it’s roughly 1/3 first <Td> and 2/3 second <Td>
it depends on the contents
Marius Räsener
@elmcrest
Feb 15 2018 10:43
ok thx
Marius Räsener
@elmcrest
Feb 15 2018 11:02
ok I just noticed that the letterhead isn’t placed/embedded 100% as it should
my document is DIN A4 and the letterhead is also DIN A4 …
ah, now I remember the PDF Box model … maybe I can solve it
Marius Räsener
@elmcrest
Feb 15 2018 11:09
ok tried all box variants, no change at all :/
Patrick Gundlach
@pgundlach
Feb 15 2018 11:09
how do you include the letter head?
Marius Räsener
@elmcrest
Feb 15 2018 11:09
Patrick Gundlach
@pgundlach
Feb 15 2018 11:13
can you send me the letter head?
the <Image ... > looks fine
Marius Räsener
@elmcrest
Feb 15 2018 11:14
see your inbox
Marius Räsener
@elmcrest
Feb 15 2018 11:21
ok I have Illustrator and Acrobat but it seems I can’t show the boxes :D
I have to leave for some meetings … I’m continuing with sp later today
Patrick Gundlach
@pgundlach
Feb 15 2018 11:56
@elmcrest When you have a page without margins, you need to have 1,1 as the top left corner
  <Record element="data">
    <PlaceObject row="1" column="1">
      <Image file="soft_briefbogen.pdf" page="1"></Image>
    </PlaceObject>
  </Record>
I always prefer absolute positioning with positon 0mm, 0mm:
    <PlaceObject row="0mm" column="0mm">
      <Image file="soft_briefbogen.pdf" page="1"></Image>
    </PlaceObject>
Then the page margins don't matter
Marius Räsener
@elmcrest
Feb 15 2018 14:49
I see... thx again for your help
Marius Räsener
@elmcrest
Feb 15 2018 19:20
so, currently I think I’m going to dynamically create the layout.xml with my app. this leads to the Idea that I won’t need a data.xml at all … or are there reasons against this approach?
Patrick Gundlach
@pgundlach
Feb 15 2018 19:57
@elmcrest No, that is fine. You can run sp --dummy to go without a data file
Marius Räsener
@elmcrest
Feb 15 2018 20:57
ok cool
next step after this will be to read the layout.xml from STDIN or somehing to avoid the step of saving a file to the FS
Marius Räsener
@elmcrest
Feb 15 2018 21:15
ok, paddings don’t work for me in the <Column> defintion … in a single <Td> they work.
Marius Räsener
@elmcrest
Feb 15 2018 21:21
solved with columndistance
Marius Räsener
@elmcrest
Feb 15 2018 22:17
ok, so this is what I got so far … https://dpaste.de/3YsY
so, a Schusterjunge is appearing an the page break in the table
maybe you have an Idea how to solve this? …
Seems like all the importance of a beautiful document gets lost when using tables :/
not just publisher, but all PDF rendering libraries I’ve tried and used
but, to be fair, at least publisher already does a better job on hyphenation within table cells, so that’s a clear plus :)