pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tres Finocchiaro <tres.finocchi...@gmail.com>
Subject Re: help using PDFBox to print HTML > PDF
Date Wed, 17 Dec 2014 20:16:14 GMT
>
> I'm looking for a command line utility that i can incorporate in a script.
> I'm converting the XML to HTML, and was interested in a way to convert it
> to PDF.


This might be a nice place to start... http://wkhtmltopdf.org/

If that doesn't work, there are about 100 trial-ware apps out there that
can do this.  If you need pure Java, then we can discuss that too. :)

- Tres.Finocchiaro@gmail.com

On Wed, Dec 17, 2014 at 3:08 PM, Amanda Burma <amanda@froglogic.com> wrote:
>
> On 12/17/14, 12:55 PM, Ken Bowen wrote:
>
>> Amanda,
>>
>> Depending on your needs, most browsers have a “Save as PDF” facility.  If
>> all you need is a series of one-off conversions, that might work well for
>> you.
>>
> I'm looking for a command line utility that i can incorporate in a script.
> I'm converting the XML to HTML, and was interested in a way to convert it
> to PDF.
>
>
> Amanda
>
>> Ken
>>
>> On Dec 17, 2014, at 12:45 PM, Amanda Burma <amanda@froglogic.com> wrote:
>>
>>  Brzrk,
>>>
>>> On 12/17/14, 12:38 PM, Brzrk One wrote:
>>>
>>>> I read Amanda as wanting to convert HTML => PDF,
>>>> and Tilman wanting to convert PDF => HTML.
>>>>
>>> That is correct. I want to take an HTML and convert it to PDF.
>>>
>>> Amanda
>>>
>>>> On Wed, Dec 17, 2014 at 2:37 PM, Tilman Hausherr <THausherr@t-online.de
>>>> >
>>>> wrote:
>>>>
>>>>> Use a PDF for the PrintPDF feature, this works much better.
>>>>>
>>>>> To create a HTML from PDF, use the ExtractText feature with the "-html"
>>>>> option
>>>>> https://pdfbox.apache.org/commandline/#extractText
>>>>>
>>>>> Tilman
>>>>>
>>>>> Am 17.12.2014 um 20:30 schrieb Amanda Burma:
>>>>>
>>>>>  Hello,
>>>>>>
>>>>>> I just found this solution, and am not certain where I've gone wrong.
>>>>>>
>>>>>> Anyone have any tips based on the following error?
>>>>>>
>>>>>> MandyBookAir:Downloads amanda$ java -jar pdfbox-app-1.8.8.jar PrintPDF
>>>>>> -silentPrint /Users/amanda/Documents/froglogic/Marketing/Partners/
>>>>>> Polarion/results/HTMLReports/report.html
>>>>>> PrintPDF failed with the following exception:
>>>>>> java.io.IOException: Error: End-of-File, expected line
>>>>>>      at org.apache.pdfbox.pdfparser.BaseParser.readLine(
>>>>>> BaseParser.java:1517)
>>>>>>      at org.apache.pdfbox.pdfparser.PDFParser.parseHeader(
>>>>>> PDFParser.java:372)
>>>>>>      at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.
>>>>>> java:186)
>>>>>>      at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.
>>>>>> java:1219)
>>>>>>      at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.
>>>>>> java:1186)
>>>>>>      at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.
>>>>>> java:1111)
>>>>>>      at org.apache.pdfbox.PrintPDF.main(PrintPDF.java:100)
>>>>>>      at org.apache.pdfbox.PDFBox.main(PDFBox.java:74)
>>>>>>
>>>>>> Thanks,
>>>>>> Amanda
>>>>>>
>>>>>>
>>>>>>
>>> --
>>> *View our upcoming webinars & events <http://www.froglogic.com/
>>> news-events/events/>*
>>> --
>>>
>>> Amanda Burma | Technical Marketing & Sales Engineer
>>> froglogic <http://www.froglogic.com> | Automated GUI Testing & Code
>>> Coverage
>>> amanda@froglogic.com | LinkedIn <http://www.linkedin.com/
>>> groups/GUI-Test-Automation-froglogic-Squish-3774650>
>>>
>>
>
> --
> *View our upcoming webinars & events <http://www.froglogic.com/
> news-events/events/>*
> --
>
> Amanda Burma | Technical Marketing & Sales Engineer
> froglogic <http://www.froglogic.com> | Automated GUI Testing & Code
> Coverage
> amanda@froglogic.com | LinkedIn <http://www.linkedin.com/
> groups/GUI-Test-Automation-froglogic-Squish-3774650>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message