SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict KJedi's Avatar
    Join Date
    Sep 2005
    Location
    Ukraine, Nikolaev
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Web to print solution (actually rendering system)

    Problem outline:
    The heart of every web2print system is:
    1) template system for the business cards
    2) rendering system

    First one is quite clear, but rendering system can be done in different ways. Main requirement - output from the rendering system should go straightly into the printing software. I'm not familiar with typography, but seems PDF or EPS output format should be fine. Both of them are open and can be generated using some tools. I'm not limited to open-source, but prefer them.

    So I need a system, that takes XML (or plain text) specification of the printing material and produces PDF for it.
    Requirements for resulting PDF:
    - CMYK colors
    - Unicode
    - rotated text
    - unlimited number of fonts

    Requirements for the tool used:
    - allow using:
    + CMYK
    + Different fonts
    + Absolute text positioning
    + Block rotation
    + Unicode
    - produce truly vector result (Imagemagik does not do so)
    - run fast or have capabilities for caching (or both)
    - work in LAMP environment
    - preferably open-source

    Known solutions:
    - TCPDF - PHP package for PDF creation
    Advantages:
    - Does not depend on server.
    - Quite simple in use
    - Good support for fonts
    - 100% unicode support
    Disadvantages:
    - Uses PHP, so performance is not very high
    - Not sure if allows CMYK
    - Poor support and no bugfixing

    - Latex - world-class publishing system
    Advantages:
    - Excellent support, huge number of resources, number of packages for any needs
    - Not sure about performance and comparing it to TCPDF. I guess, it's better
    - A number of built-in tools for including EPS graphics, conversion between open vector formats etc.
    - Ability to include any vector graphics
    - Reliable system, no errors (as D. Knuth states)
    Disadvantages:
    - Depends on server configuration
    - Configuring Latex distribution to use all fonts and packages needed is quite tricky
    - Usage is also not simple (actually writing articles or books is great, but developing business card is a nightmare - it was not designed for this)
    - Not sure about unicode
    - Bad support for different fonts, need conversion between font types.

    - PDFLib - commercial package for PDF creation
    Advantages:
    - Should be fastest of all alternatives
    - Supports Unicode
    - Excellent font support
    Disadvantages:
    - Costs $$$
    - Support is included, but 100% worse, than for Latex
    - Doesn't support EPS graphics (can't include eps into PDF)

    Question itself:
    From these alternatives I think, I can't select anytng but Latex, because I definitely need inserting EPS into PDF (EPS logo is inserted into PDF business card).
    But working with such non-standard features like different fonts or non-standard formatting, absolute block positioning (but I still want text inside the block to be laid out correctly and automatically) and other things needed is quite complex.
    Actually, I discovered how to do everything there except of non-standard font inclusion and form management.

    Maybe anybody can propose other alternatives? I have no restrictions about complexity of use (Latex is OK for me, but I want something more up-to-date, that has better font scheme), but sure want system, that has simple interface.

    Maybe my solution to use PDF/EPS as output is incorrect? Then which is correct one?

    Thanks beforehand for any help!

  2. #2
    SitePoint Enthusiast benno23's Avatar
    Join Date
    May 2008
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'll find it difficult to come up with a totally open source system for this.
    Personally I have only seen Professional design applications used for this kind of variable data publishing.
    ie: Indesign / Quark Xpress with third party plug-ins used to retrieve data and produce dynamic layouts. Usually database driven.

    I've not heard of some one doing VDP in a LAMP open source environment.
    I'd be interested to see what you come up with.
    Last edited by benno23; May 25, 2008 at 02:51. Reason: typo, expect more

  3. #3
    SitePoint Addict KJedi's Avatar
    Join Date
    Sep 2005
    Location
    Ukraine, Nikolaev
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I see this solution as following - JS WYSIWYG interface for template creation (backend) and template customizing (frontend). Resulting XML is processed with my renderer, which produces LaTeX document. Then Latex renders it into DVI and then to PNG for preview, PDF for production.
    The most tricky thing is that renderer...
    I can't afford Indesign or QuarkXpress, so I'll try this variant. And let you know when get some results.

  4. #4
    SitePoint Addict KJedi's Avatar
    Join Date
    Sep 2005
    Location
    Ukraine, Nikolaev
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alternative - good HTML2PDF convertor, but I haven't seen such

  5. #5
    SitePoint Addict
    Join Date
    Aug 2007
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is the output format restricted to a pdf? if not you could always produce a jpeg or something along those lines

  6. #6
    SitePoint Enthusiast benno23's Avatar
    Join Date
    May 2008
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A PDF will always be best for use with printing equipment.
    What sort of Machinery will you be using?

    I've been looking for a good way of converting HTML to PDF myself.
    I'd like a way of combining multiple HTML files into 1 multi-page
    PDF. Or at least combining one big long HTML file into a multi page PDF.

    Ive found three possible solutions but have not tried any of them yet
    All of them are classes:

    dom PDF
    http://www.digitaljunkies.ca/dompdf/

    This one looks promising. It doesn't have any serious dependencies by the look
    of things.

    HTML to PDF
    http://www.rustyparts.com/pdf.php

    Might be OK. Has a few dependencies

    Also called HTML to PDF
    http://www.phpclasses.org/browse/package/2905.html

    This uses current web based PDF creation web services to do the work
    which might not be around forever.

  7. #7
    SitePoint Wizard Hammer65's Avatar
    Join Date
    Nov 2004
    Location
    Lincoln Nebraska
    Posts
    1,161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only thing that can render current HTML/CSS pages to anyone's satisfaction is a browser engine. No PHP based system is going to render that format well enough and fast enough to be a good solution.

    I have used DOMPdf for several projects, and while it's a nice try, it is buggy and very resource intensive. Most other solutions are limited to a very small subset of HTML 4 and little or no CSS. No surprise there, browser manufacturers have gone through a lot to get browsers where they are in terms of rendering quality.
    Visit my blog
    PHP && Life
    for technology articles and musings.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •