Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

HTML and PDF reports different, PDF looks broken

Locked
anorman
Posts: 66
Joined: Wed Apr 04, 2012 11:34 pm

HTML and PDF reports different, PDF looks broken

Unread post by anorman »

Hi,

I am new to NuBuilder, so maybe I am doing something wrong :-(

I am using version 12.02.15. This is my first and only version I have ever used, if that makes any difference.

I created some reports, and the HTML versions look "closer" to what I would expect.. The coloring is correct (The html invoice has the purple color in it), and with the exception that text areas don't always honor carriage returns the output is exactly as I planned it.

The PDF output however, is only black and white, and creates "black boxes" along with different formatted text. The "Company Name" area in the upper left is a single textarea in the database, and correctly displays in the form itself. Also, the section that begins with "Please send all payments ASAP." is a single text area. The PDF version prints out "closer" to what it actually is, as the "All payments should be sent to" including the address below that are actually in one textarea with carriage return formatting. The PDF version looks like it printed out both the textarea in a single line and also the textarea with proper formatting all at the same time. The HTML version looks like it just printed out everything as a single "line" that wrapped ignoring all carriage returns.

Any ideas?

Thank you for any and all help you can provide,

- Andre
html-invoice.png
html-invoice.png (153.46 KiB) Viewed 6669 times
pdf-invoice.png
pdf-invoice.png (115.79 KiB) Viewed 6669 times
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: HTML and PDF reports different, PDF looks broken

Unread post by admin »

Andre,

Are you able to send me the report (the sql record of this from the xxsys_activity table and a table that #dataTable# would have created) ? zipped up and attached here.

ta

Steven
anorman
Posts: 66
Joined: Wed Apr 04, 2012 11:34 pm

Re: HTML and PDF reports different, PDF looks broken

Unread post by anorman »

Couple other comments.

In the database, the "Company Name" is formatted as:

Company Name
Address 1
Address 2
City State Zip
Country

The HTML version outputted City after the address on the same line :-(

Also, if this helps in diagnosis.

I originally installed the "system" on my windows machine using the download from the nuBuilder website (It installed nubuilder, php, apache and mysql). Once I decided I liked the system and had developed some forms and the invoice report you see above, I "moved" the system to my production linux server (I downloaded and installed the linux version from your website) and just dumped the mysql database from my windows machine and sucked it into my linux box.

The html/pdf reports were broken BEFORE I moved the system from windows to linux, although I have tried creating other reports in the system since and am having similar issues with all reports I attempt to create.

The only reason I bring this up is I noticed that the "system" seems to have chosen by itself to create all database table/fields with "latin1_swedish_ci" collation. I just happened to notice that. Does this matter? Was this chosen specifically for nubuilder, or can I use UTF or other?
anorman
Posts: 66
Joined: Wed Apr 04, 2012 11:34 pm

Re: HTML and PDF reports different, PDF looks broken

Unread post by anorman »

Steven,

I have attached the activity table (It looks like it exported all the rows.. The form is contained in the "Generate the actual PDF invoice" row)..

I am not sure what table you want, as I have tons of __nu<random hexedecimal number> format tables.. Which one do you want, or how do I know which one is the correct one?

- Andre
Attachments
zzsys_activity (1).zip
(37.66 KiB) Downloaded 301 times
anorman
Posts: 66
Joined: Wed Apr 04, 2012 11:34 pm

Re: HTML and PDF reports different, PDF looks broken

Unread post by anorman »

Sorry, I think I misunderstood what you wanted with the table..

I just did a query creating a test table for the report..

Attached is the table with the single row it created for the record that you see attached to my original post.

- Andre
Attachments
TESTTABLE.zip
(1.36 KiB) Downloaded 328 times
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: HTML and PDF reports different, PDF looks broken

Unread post by admin »

Andre,

I have made some fixes to allow rgb() colors - that's what the problem was.
pdf_fixes.zip
(19.4 KiB) Downloaded 387 times
On pdfs, background colors don't work currently, so I made a field the same size and did a "send to back".
nuActivity.zip
(4.18 KiB) Downloaded 370 times
The pdf_fixes will also be in the next build (about a month away)

I hope this helps everybody.

Steven
anorman
Posts: 66
Joined: Wed Apr 04, 2012 11:34 pm

Re: HTML and PDF reports different, PDF looks broken

Unread post by anorman »

Thank you!!!!

The PDF works perfectly now!!!!!!

FYI: I will never use the HTML forms, although just in case you aren't aware, the html form still has the formatting issue with the textarea and carriage returns not working properly.. It isn't a big deal for me, as, again, I don't need the HTML forms!!!!

THANK YOU THANK YOU THANK YOU!!!!!!!!!!!!!!!!

- Andre
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: HTML and PDF reports different, PDF looks broken

Unread post by admin »

Andre,

What do you mean by HTML forms?

Do you mean HTML reports?

Steven
anorman
Posts: 66
Joined: Wed Apr 04, 2012 11:34 pm

Re: HTML and PDF reports different, PDF looks broken

Unread post by anorman »

That is correct Steven. Since I don't need the HTML report, I just selected "PDF" instead of "HTML and PDF" for output.. But the HTML certainly is not honoring the carriage return formatting properly.

Thank you again for everything..

- Andre
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: HTML and PDF reports different, PDF looks broken

Unread post by admin »

.
Locked