LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-25-2016, 01:20 PM   #1
esteeven
Senior Member
 
Registered: Oct 2001
Location: Bristol UK
Distribution: Arch Slackware Ubuntu
Posts: 1,082

Rep: Reputation: 52
Output to PDF contains html mark up


I am using Simple Invoices on a LAMP server. The system works very well, apart from the conversion of the invoice data to PDF or DOC formats.

I realise that not everyone will know this invoicing system but I just I suspect the issue might be more to do with my LAMP set up than Simple Invoices.

An example is this:

I input the following into an invoice text box:

Quote:
test
test
test
The conversion to PDF or DOC formats produces this:

Quote:
test<br>test<br>test
The text appears fine in the invoicing systems display ie in the invoice summary. The problem only occurs during the conversion.

Needless to say that other users are not experiencing the same issue.

Can anyone point me in the right direction of what to look at? Could it be a php setting or something else?

Thanks in advance.
 
Old 06-25-2016, 02:12 PM   #2
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
First off, I'm not familiar with any of the software which you're using but maybe I can help... The page that get's converted .. Does it have some custom html markup (maybe in Simple Invoices you can set-up how your invoice will look?)? Errors in parsing HTML might produce such results... But they might also appear in the log files so please check any log files you might have..
 
1 members found this post helpful.
Old 06-25-2016, 02:51 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Not familiar either but it appears that SimpleInvoices uses tufat html2ps/pdf php code. Check your apache error_log for errors but I would guess that either the GD library is not installed or configured correctly.

http://www.tufat.com/html2ps-and-html2pdf/

Last edited by michaelk; 06-25-2016 at 02:57 PM.
 
1 members found this post helpful.
Old 06-27-2016, 10:43 AM   #4
esteeven
Senior Member
 
Registered: Oct 2001
Location: Bristol UK
Distribution: Arch Slackware Ubuntu
Posts: 1,082

Original Poster
Rep: Reputation: 52
Thanks for your replies Smokey_justme and michealk. I tried a different invoice template and the problem went away. The template I was using must be broken in some way. I'll have a proper look at it as soon as I have some time to see if I can find the error. In the short term, I'll use a different template.

Many thanks.
 
Old 06-28-2016, 06:30 AM   #5
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
You could replace all <br>s with the carriage returns using MS Office (since DOC files are an output option). Using the "Special" button in the "find and replace" option.

I checked open office 3.2.1 and libre office 4.2.7.2 and they don't seem to allow replacing with special characters.

Possibly a free pdf editor may have such a feature.

OK
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge Of Html Files Into A Single Html (or Pdf) fiomba Linux - Software 10 05-11-2018 11:28 AM
[SOLVED] Getting xdebug 2.0.5 switch text output to html output lhorace Linux - Server 1 11-01-2009 05:23 PM
How to mark up a pdf document? taxpayer Linux - Software 7 08-15-2008 07:40 AM
Convert pdf to html or txt or remaster the pdf? jago25_98 Linux - Software 1 12-13-2005 01:11 AM
Control print output from PHP/HTML... PDF? alar Linux - General 1 08-05-2004 01:20 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration