Ask Your Question
2

Converting HTML forms to PDF [closed]

asked 2013-01-31 20:27:02 +0200

granolageek gravatar image

I have an HTML form that I'm trying to convert to PDF/A using LO. (rightly or wrongly I'm just using the same form the users fill out.)

Headless always insists on inserting a blank first page into the file, which is always a fillable PDF form, when what I want is an archive. If I use the Gui I get what I want, and I've been told that headless will then use those settings. It won't.

Anyway, I'd rather not try to duplicate the for as either straight HTML or ODT. I'm also aware of Unoconv, but wary of spending several hours to demonstrate that it works just like headless.

Has anyone any other suggestions?

Thanks

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-11-01 14:03:22.921887

4 Answers

Sort by » oldest newest most voted
2

answered 2013-02-05 20:21:49 +0200

granolageek gravatar image

OK, here we go again. I don't see how to comment on QBit's second answer, so I'm posting as an "answer" myself.

Anyway:

I have used LO to convert .doc and .odt to PDF, with success. I have never tried HTML before, but HTML --> PDF is in the documentation as working, and in my immediate experience it does except for this anomaly.

I agree it is quite possible that I am describing two separate problems. It is also two contemporaneous and colocated instances of unexpected behavior. In my experience it is safer to report something like that, than not.

I'm about 95% sure that the form being two pages long when all the data is on one page is a flat out bug.

I do not know whether having LO produce a fillable form if input doc contains <form> tags, and a static PDF if it does not is as designed, or not. I find that if I use the GUI to export a PDF of the form file, it will default to a static document, and that I must tell it to export a form. The command line flat out does a form, period, the end. I do find it odd that the GUI and the command line should have different defaults, as they appear to.

The idea that the command line would take the options that cannot be specified on the command line from the last settings in the GUI came from a thread here on "ask" last spring. The docs are silent on the subject. I've commented on that thread that there are, at least, exceptions.

OK, I'll go play with 4.0 and see what it does.

edit flag offensive delete link more

Comments

@granolageek -- It sounds like you think that there are some bugs here, and based on all of the legwork you've done, I'm pretty inclined to believe you :-)

I would definitely try to write up some bugs for these things. Only a handful of our developers frequent the Ask site, and if there's something that you'd like to get in front of their eyes, a well-written, narrowly-focused bug will probably get their attention faster than a thread on the Ask site.

qubit gravatar imagequbit ( 2013-03-10 04:27:40 +0200 )edit

@granolageek -- Here's the link to file a bug.

Please post a link to any bugs you file in a comment below using the format "fdo#123456".

Thanks!

qubit gravatar imagequbit ( 2013-03-10 04:28:23 +0200 )edit
0

answered 2013-05-22 14:08:05 +0200

Mukut gravatar image

I had similar is similar issue while converting html to pdf. After I inserted meta tag in htm head pdf generated without blank.

<meta name="GENERATOR" content="LibreOffice 4.0 (Linux)"> <meta name="AUTHOR" content="Mukut"> <meta name="CHANGEDBY" content="Mukut">

edit flag offensive delete link more

Comments

I signed up just to say thank you! Adding the meta tags fixes the blank first page problem.

Nick Loadholtes gravatar imageNick Loadholtes ( 2013-12-06 22:03:28 +0200 )edit

Thank you too very much. Adding the meta tags works also for me.

Martin Enders gravatar imageMartin Enders ( 2015-04-28 12:10:22 +0200 )edit
0

answered 2013-02-05 17:10:19 +0200

granolageek gravatar image

updated 2013-02-05 17:23:43 +0200

qubit gravatar image

I'm sorry, I don't immediately see how to link to another thread. However, according to this one "unoconv headless multiple options, secure PDF", it strongly appears that the problem lies in LO (v3.6 for me), and unoconv suffers from it too.

edit flag offensive delete link more

Comments

Hi @granolageek, The thread you reference has an answer from @dag (developer of unoconv) that indicates that there was a bug (now fixed) in the unoconv source. From what shared problem do you believe both LO 3.6 and unoconv are suffering?

qubit gravatar imagequbit ( 2013-02-05 17:28:21 +0200 )edit

The last response, from Terry Carmen, saying that he had put debugging code into unoconv, seen it pass the parameters to LO, and seen them have no effect.

granolageek gravatar imagegranolageek ( 2013-02-05 18:56:50 +0200 )edit

> 0

answered Aug 19 '12 Terry Carmen gravatar image Terry Carmen 1

It doesn't work here either.

I added debugging code to unoconv and the parameters do seem to be passed to LO, although they don't seem to have any effect. I can't generate any sort of protected PDF either.

LO does create a prote

granolageek gravatar imagegranolageek ( 2013-02-05 18:56:57 +0200 )edit

Terry Carmen's comment appears to predate @dag's (Aug 19 vs. Aug 20), so perhaps Carmen was just using an older (and unfixed) version of LO? Please try a LO 4.0 build and provide us with repro steps on what features aren't working for you in unoconv or in LO.

qubit gravatar imagequbit ( 2013-02-05 19:14:48 +0200 )edit

Sorry, I'm still learning my way around. I hadn't noticed that comments are in chronological order and answers are in reverse chronological order. I can deal, but the practice will be found in no ease of use manual, ever.

granolageek gravatar imagegranolageek ( 2013-02-05 19:43:14 +0200 )edit
0

answered 2013-02-05 19:25:50 +0200

qubit gravatar image

@granolageek -- I have a few q's about your original question.

I have an HTML form that I'm trying to convert to PDF/A using LO. (rightly or wrongly I'm just using the same form the users fill out.)

Is this something you've done before with success? (I haven't used LO for this purpose)

Headless always insists on inserting a blank first page into the file, which is always a fillable PDF form, when what I want is an archive.

I'm confused. It sounds like you're describing two separate problems

  1. Headless mode inserts a blank first page.
  2. You want an archive (compressed file?), but presumably you're not getting an archive

If I use the Gui I get what I want, and I've been told that headless will then use those settings. It won't.

What settings have you configured in the GUI that you expect to carry over into headless mode? Is there documentation that indicates that headless will use the settings configured in the GUI?

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-31 20:27:02 +0200

Seen: 3,212 times

Last updated: May 22 '13