Bug 347801

Summary: Size of PDFs generated by Kexi Reports increased 10x
Product: [Applications] KEXI Reporter: clickoclunko
Component: Reports and PrintoutsAssignee: Kexi Bugs <kexi-bugs>
Status: CONFIRMED ---    
Severity: normal CC: adam, inksi, raypapworth, staniek
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Raydeo_042315.pdf
Raydeo_052314.pdf
attachment-23225-0.html
Exported to pdf (j.staniek)
11.pdf: printed to pdf (j.staniek)
Sreen shot with report open
Screenshot
the kexi file
Linux srp.pdf

Description clickoclunko 2015-05-16 15:46:13 UTC
I insert 2 small jpegs into a report for invoicing.

In the past the pdf file size was app. 30-40k,  after one of the latest updgrades the file size has increased 10x  (400-500k). 

I assume whatever generates the pdf is now including too many fonts.

Reproducible: Always

Steps to Reproduce:
1
2.
3.
Comment 1 Jarosław Staniek 2015-05-17 11:10:50 UTC
Recently we've increased quality for printing. I'll check if we do the same for PDFs. I agree by default it's better to have lower quality for PDFs.
Comment 2 Jarosław Staniek 2015-05-17 11:13:33 UTC
To check if it's about fonts it will help if you send me 2 PDF files: old one generated with old Kexi and a new one. Or at least a new one. We can see what fonts are embedded. We have not changed anything explicitly regarding fonts in Kexi 2.
Comment 3 Jarosław Staniek 2015-05-17 11:15:27 UTC
PS: Please specify in the box above what's your Kexi version.
Comment 4 clickoclunko 2015-05-17 14:49:24 UTC
Created attachment 92657 [details]
Raydeo_042315.pdf

2 pdfs attached....the file size actually increased about 20x.

the images are identical in both invoices.

please please please add support for the sum() or total() function in a
report  :p

On Sun, May 17, 2015 at 7:13 AM, Jarosław Staniek <staniek@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=347801
>
> --- Comment #2 from Jarosław Staniek <staniek@kde.org> ---
> To check if it's about fonts it will help if you send me 2 PDF files: old
> one
> generated with old Kexi and a new one. Or at least a new one. We can see
> what
> fonts are embedded. We have not changed anything explicitly regarding
> fonts in
> Kexi 2.
>
> --
> You are receiving this mail because:
> You reported the bug.
>
Comment 5 clickoclunko 2015-05-17 14:49:26 UTC
Created attachment 92658 [details]
Raydeo_052314.pdf
Comment 6 Adam Pigg 2015-05-17 14:57:40 UTC
BTW, reports have support for SUM, MIN, MAX, AVG and COUNT, but only when using scripting .... and its probably not a widely known feature! that should improve with better scripting docs in the next version.

its quite fiddly to get right, but if you send me a simple database with report setup, i'll send it back with a summed field to show you how.
Comment 7 Adam Pigg 2015-05-17 15:02:15 UTC
Actually, its not that complicated, no need to write a full report script....

in the datasource for the field on the report, write:

=field.sum("fieldname")

also, available is min, max, avg and count
Comment 8 Jarosław Staniek 2015-05-17 18:01:26 UTC
All pretty, please let's use forum or another wish entry for this topic, thanks.
Comment 9 clickoclunko 2015-05-17 18:05:30 UTC
Created attachment 92663 [details]
attachment-23225-0.html

this doesn't work for me Adam.
the data field name is icost.........when i use this
....=field.sum("icost")............it
returns 0

On Sun, May 17, 2015 at 11:02 AM, Adam Pigg <adam@piggz.co.uk> wrote:

> https://bugs.kde.org/show_bug.cgi?id=347801
>
> --- Comment #7 from Adam Pigg <adam@piggz.co.uk> ---
> Actually, its not that complicated, no need to write a full report
> script....
>
> in the datasource for the field on the report, write:
>
> =field.sum("fieldname")
>
> also, available is min, max, avg and count
>
> --
> You are receiving this mail because:
> You reported the bug.
>
Comment 10 Jarosław Staniek 2016-01-23 20:41:45 UTC
BTW, The field.sum(...) works for queries since 2.9.11. This may be important for you if you use query as report's data source, not just a table. Discussed at https://forum.kde.org/viewtopic.php?f=221&t=130345.

But this is not the topic of this bug. It's quality, can we change it to a wish such as "Add quality option for report generation"?
Comment 11 Ray 2019-05-30 14:47:45 UTC
The problem seems to be that the PDF output is an image: searching for text doesn't find anything.

Using Kexi version  3.2 on windows 10
Printed report using Foxit reader pdf printer gives a file size 6081 KB. And takes several minutes.

Using the same pdf printer to print a similar report from Microsoft Access 2000 gives a file of 175K in which search for text works so it is not just an image.
Comment 12 Jarosław Staniek 2019-05-30 14:58:39 UTC
KEXI 3.2.0 on Linux: searching for text find text. 2-page PDF is a 6KB file. See 10.pdf attached.

Printing to file gives similar reason. See 11.pdf attached.
Comment 13 Jarosław Staniek 2019-05-30 14:59:40 UTC
If this bug report is confirmed for specific KEXI vesion and OS, please state it in the bug properties. Also the Qt version.
Comment 14 Jarosław Staniek 2019-05-30 15:00:11 UTC
Created attachment 120406 [details]
Exported to pdf (j.staniek)
Comment 15 Jarosław Staniek 2019-05-30 15:00:23 UTC
Comment on attachment 120406 [details]
Exported to pdf (j.staniek)

10.pdf
Comment 16 Jarosław Staniek 2019-05-30 15:01:29 UTC
Created attachment 120407 [details]
11.pdf: printed to pdf (j.staniek)
Comment 17 Jarosław Staniek 2019-05-30 15:03:58 UTC
@Ray: Have you compared "Printed report using Foxit reader" vs "Report -> Export As -> PDF" ?

Issue in the former may be related to specifics of the Foxit driver or the way how KEXI interacts with it (albeit via Qt).
Comment 18 Ray 2019-05-30 15:52:02 UTC
Created attachment 120409 [details]
Sreen shot with report open
Comment 19 Ray 2019-05-30 15:54:30 UTC
The option "Report -> Export As -> PDF" does not seem to exist in kexi Version 3.2 (3.2.0, git e2eb6f4 3.2). At least I could not find it. Screen shot attached.
Comment 20 Jarosław Staniek 2019-05-30 16:42:19 UTC
Thanks Ray, on the screen shot, can you spot the "Report" menu?
Comment 21 Ray 2019-05-30 17:25:36 UTC
Created attachment 120412 [details]
Screenshot

Thanks. I didn't realise it was a menu, it looks just like a label.

However it always fails as in screen shot.
Comment 22 Jarosław Staniek 2019-05-30 17:43:58 UTC
Ray, by chance, do you select new and not existing filename? 
I've seen problems with existing filenames. Also please try different folder.
Note, my todays testing for this bug is on Linux.
Comment 23 Ray 2019-05-30 17:51:37 UTC
Created attachment 120414 [details]
the kexi file

I tried it again with a new filename in a different folder but it still fails.
Here is the actual kexi file.
Comment 24 Jarosław Staniek 2019-05-30 18:01:02 UTC
Thanks Ray, we will need to test this on Windows more. The All items report worked on my Linux box, attaching result.
Comment 25 Jarosław Staniek 2019-05-30 18:01:32 UTC
Created attachment 120415 [details]
Linux srp.pdf