Visualizzazione dei risultati da 1 a 6 su 6

Discussione: Consiglio per PDF

  1. #1
    Utente di HTML.it L'avatar di Sonikag
    Registrato dal
    Mar 2004
    Messaggi
    2,080

    Consiglio per PDF

    Ciao a tutti!
    Avrei bisogno di un consiglio.
    Dovrei creare dei pdf partendo da un output HTML generato da PHP.
    Le cose più "complicate" sono tabelle e grafici in css.

    - TCPDF https://tcpdf.org//?lang=it mi sembra ottima e perfetta! E soprattutto è un open source che non è male

    - PDFLIB https://www.pdflib.it/product/pdflib/ non sembra male ed è a pagamento.

    Chiedevo se qualcuno di voi ha esperienze in merito, se le ha provate e come si è trovato. Si tratta di un progetto a lungo termine, per cui il cliente è disponibile anche a pagare una licenza se ho più affidabilità.

    Oppure sono aperta anche ad altre opzioni.
    Grazie
    Sonia

  2. #2

  3. #3
    wkhtmltopdf per linux

    E' un eseguibile, quindi dovrai posizionarlo eventualmente in una cartella leggibile dall'utente sotto cui gira il server (apache?).
    Gli dai in pasto l'html e ti genera il pdf
    codice:
    wkhtmltopdf /path/to/input/file.html /path/to/outpu/file.pdf

  4. #4
    Utente di HTML.it L'avatar di Sonikag
    Registrato dal
    Mar 2004
    Messaggi
    2,080
    Grazie adesso li valuto!
    Attualmente però il sito è su un hosting condiviso e non posso fare installazioni, in futuro sarà portato sul server interno.

  5. #5
    Quote Originariamente inviata da Sonikag Visualizza il messaggio
    Grazie adesso li valuto!
    Attualmente però il sito è su un hosting condiviso e non posso fare installazioni, in futuro sarà portato sul server interno.
    Wkhtmltopdf allora non è adatto, per un condiviso.

    "Server interno" cioè lo avrete su un vostro server personale interno all'azienda? O intendi dire su un dedicato?

  6. #6
    Utente di HTML.it L'avatar di Sonikag
    Registrato dal
    Mar 2004
    Messaggi
    2,080
    Intendevo un server personale interno all'azienda.
    Attualmente è su un pubblico condiviso, poi per una serie di motivi (tra cui maggiore sicurezza) sarà spostato sul server interno all'azienda dove potrò installare ciò che voglio.

  7. #7
    Quote Originariamente inviata da Sonikag Visualizza il messaggio
    Intendevo un server personale interno all'azienda.
    Attualmente è su un pubblico condiviso, poi per una serie di motivi (tra cui maggiore sicurezza) sarà spostato sul server interno all'azienda dove potrò installare ciò che voglio.
    Ok capito.
    Beh in questo caso, se i tempi te lo permettono, ti consiglio di attendere di avere il server "personale" e di usare wkhtmltopdf. Come detto è un eseguibile di appena 500k e svolge il suo lavoro egregiamente
    Synopsis:
    wkhtmltopdf [GLOBAL OPTION]... [OBJECT]... <output file>

    Document objects:
    wkhtmltopdf is able to put several objects into the output file, an object is
    either a single webpage, a cover webpage or a table of contents. The objects
    are put into the output document in the order they are specified on the
    command line, options can be specified on a per object basis or in the global
    options area. Options from the Global Options section can only be placed in
    the global options area


    A page objects puts the content of a single webpage into the output document.


    (page)? <input url/file name> [PAGE OPTION]...
    Options for the page object can be placed in the global options and the page
    options areas. The applicable options can be found in the Page Options and
    Headers And Footer Options sections.


    A cover objects puts the content of a single webpage into the output document,
    the page does not appear in the table of contents, and does not have headers
    and footers.


    cover <input url/file name> [PAGE OPTION]...
    All options that can be specified for a page object can also be specified for
    a cover.


    A table of contents object inserts a table of contents into the output
    document.


    toc [TOC OPTION]...
    All options that can be specified for a page object can also be specified for
    a toc, further more the options from the TOC Options section can also be
    applied. The table of contents is generated via XSLT which means that it can
    be styled to look however you want it to look. To get an idea of how to do
    this you can dump the default xslt document by supplying the
    --dump-default-toc-xsl, and the outline it works on by supplying
    --dump-outline, see the Outline Options section.


    Description:
    Converts one or more HTML pages into a PDF document, *not* using wkhtmltopdf
    patched qt.


    Global Options:
    --collate Collate when printing multiple copies
    (default)
    --no-collate Do not collate when printing multiple
    copies
    --copies <number> Number of copies to print into the pdf
    file (default 1)
    -H, --extended-help Display more extensive help, detailing
    less common command switches
    -g, --grayscale PDF will be generated in grayscale
    -h, --help Display help
    --license Output license information and exit
    --log-level <level> Set log level to: none, error, warn or
    info (default info)
    -l, --lowquality Generates lower quality pdf/ps. Useful to
    shrink the result document space
    -O, --orientation <orientation> Set orientation to Landscape or Portrait
    (default Portrait)
    -s, --page-size <Size> Set paper size to: A4, Letter, etc.
    (default A4)
    -q, --quiet Be less verbose, maintained for backwards
    compatibility; Same as using --log-level
    none
    --read-args-from-stdin Read command line arguments from stdin
    --title <text> The title of the generated pdf file (The
    title of the first document is used if not
    specified)
    -V, --version Output version information and exit

Tag per questa discussione

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.