Problem with pdf output
  • Hi,
    i set up a running booktype+objavi enviroment on my server (opensuse 11.4)
    The pdf-creation works so far but the layout is messed up (margin problems + non-ascii characters are not displayed correctly)
    i have attached an example.
    Any ideas?
    Thx!
  • 13 Comments sorted by
  • Problem is in that image of a flower. That image takes 100% of space and text size resizes accordingly. Either put smaller image or put css style IMG { max-width: 500px;} [or something like similar].

    When you are editing image you don't see real size of the image. Width of the image is just for the editing purposes set to be the size of the editor. That can lead to some confusion.
  • Vote Up0Vote Down adamadam
    Posts: 88Member
    max-width:100%;
    height:auto;

    works good for all outputs


    adam

    On Fri, Aug 3, 2012 at 2:50 PM, Aleksandar Erkalović <<br />booktype-support@lists.sourcefabric.org> wrote:

    > Problem is in that image of a flower. That image takes 100% of space and
    > text size resizes accordingly. Either put smaller image or put css style
    > IMG { max-width: 500px;} [or something like similar].
    >
    > When you are editing image you don't see real size of the image. Width of
    > the image is just for the editing purposes set to be the size of the
    > editor. That can lead to some confusion.
    >
    >
  • Thx for your help!
    But unfornutately my problem still consists.
    I have edited the css properties and tried to remove the image aswell. Nothing changed :(
    I am still stuck with my non-ascii problem + margin problems.

    Any other ideas?
    thx!!!
  • After long triying and failing i figured out my css files didnt work.
    What i have done so far:
    objavi/config.cgi:
    added
    SERVER_DEFAULTS = {
        '127.0.0.1/booktype': {
            'css-book': '/static/imb.css',
            'css-web': '/static/en.flossmanuals.net-web.css',
            'css-newspaper': '/static/en.flossmanuals.net-newspaper.css',
            'css-openoffice': '/static/en.flossmanuals.net-openoffice.css',
            'lang': 'en',
            'dir': 'LTR',
            'toc-encoding': None,
            'display': True,
            'interface': 'Booki',
            'toc_header': 'Table of Contents',
            },
    at "objavi/htdocs/static/" i have added imb.css

    But no css properties are loaded, just the default.

    Thx!

  • Vote Up0Vote Down adamadam
    Posts: 88Member
    maybe borko can help...

    On Tue, Aug 7, 2012 at 11:09 AM, Flo0502 <<br />booktype-support@lists.sourcefabric.org> wrote:

    > After long triying and failing i figured out my css files didnt work.
    > What i have done so far:
    > objavi/config.cgi:
    > added
    > SERVER_DEFAULTS = {
    > '127.0.0.1/booktype': {
    > 'css-book': '/static/imb.css',
    > 'css-web': '/static/en.flossmanuals.net-web.css',
    > 'css-newspaper': '/static/en.flossmanuals.net-newspaper.css',
    > 'css-openoffice': '/static/en.flossmanuals.net-openoffice.css',
    > 'lang': 'en',
    > 'dir': 'LTR',
    > 'toc-encoding': None,
    > 'display': True,
    > 'interface': 'Booki',
    > 'toc_header': 'Table of Contents',
    > },
    > at "objavi/htdocs/static/" i have added imb.css
    >
    > But no css properties are loaded, just the default.
    >
    > Thx!
    >
    >
    >
  • Hello!

    In Objavi's SERVER_DEFAULTS, try using whatever you have configured as THIS_BOOKI_SERVER in Booktype's settings.py instead of 127.0.0.1/booktype and see if that will get the CSS loaded.

    - Borko

    Flo0502 said:

    After long triying and failing i figured out my css files didnt work.
    What i have done so far:
    objavi/config.cgi:
    added
    SERVER_DEFAULTS = {
        '127.0.0.1/booktype': {
            'css-book': '/static/imb.css',
            'css-web': '/static/en.flossmanuals.net-web.css',
            'css-newspaper': '/static/en.flossmanuals.net-newspaper.css',
            'css-openoffice': '/static/en.flossmanuals.net-openoffice.css',
            'lang': 'en',
            'dir': 'LTR',
            'toc-encoding': None,
            'display': True,
            'interface': 'Booki',
            'toc_header': 'Table of Contents',
            },
    at "objavi/htdocs/static/" i have added imb.css

    But no css properties are loaded, just the default.

    Thx!




  • unfortunately the css didnt load.
    in the objavi tmp directory the objavi.css file still contains the default css (file attached).
    Any other tips, what might help?
    thx for your help so far!!

  • Reply to @Flo0502:

    If that is indeed the content of "objavi.css" file you have found in the "tmp" directory, it would mean that the Booktype server is supplying its own CSS rather than letting the Objavi server use it's own.

    Could you please go to the "Publish" tab on Booktype, then go to settings for "Book", clicking "Next" until you reach the "Advanced' settings.  There is "Override Server Default CSS" under "General" and "Booktype CSS" under "Advanced (style sheets)".  Try editing these options and see if that will get you anywhere.

    - Borko
     
    Flo0502 said:

    unfortunately the css didnt load.
    in the objavi tmp directory the objavi.css file still contains the default css (file attached).
    Any other tips, what might help?
    thx for your help so far!!




  • when i am editing these option it works fine, but how can i change this default values?

  • Hi,

    i set up a running booktype(1.5.3)+objavi2 environment on my server - ubuntu 12.04.
    I generate epub files without problems, but I can not generate pdf or odt. Please help.

    "The requested URL /books/test-en-2012.09.03-22.04.23.pdf was not found on this server."
    objavi-error.log:

    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21] ******* got message "__init__"
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21] xauth:  file /var/www/objavi2/htdocs/tmp/test-en-2012.09.03-22.04.23.pdfWQde9F/Xauthority does not exist
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21] notify_watcher called with 'FINISHED'
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21] ******* got message "FINISHED"
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21] NOT removing '/var/www/objavi2/htdocs/tmp/test-en-2012.09.03-22.04.23.pdfWQde9F', containing the following file
    s:
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21] Xauthority
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21] notify_watcher called with 'cleanup'
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21] ******* got message "cleanup"
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21] Traceback (most recent call last):
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]   File "/var/www/objavi2/htdocs/objavi.cgi", line 444, in <module>
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]     main()
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]   File "/var/www/objavi2/htdocs/objavi.cgi", line 437, in main
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]     output_function(args)
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]   File "/var/www/objavi2/htdocs/objavi.cgi", line 335, in mode_book
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]     book.spawn_x()
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]   File "/var/www/objavi2/objavi/fmbook.py", line 1150, in spawn_x
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]     '-nolisten', 'tcp',
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]   File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21] errread, errwrite)
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]   File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21]     raise child_exception
    [Mon Sep 03 22:04:24 2012] [error] [client 192.168.0.21] OSError: [Errno 2] No such file or directory
    [Mon Sep 03 22:04:32 2012] [error] [client 192.168.0.20] File does not exist: /var/www/objavi2/htdocs/books/test-en-2012.09.03-22.04.23.pdf, referer: http://192.168.0.2
    1/test/_edit/

  • Hello.

    Do you have the virtual framebuffer X server (Xvfb) installed on the system and in the default PATH?

    - Borko

  • I don't have Xvfb installed. But I will install and test it.

  • Hello

    my problem is solved PDF. Reinstall texlive-base and wkhtmltopdf  (download from http://code.google.com/p/wkhtmltopdf/).

    But I have question for epub format in discussion How to generate ePub3?
    Post edited by Emil Dautov at 2012-09-13 10:12:45