New bug saving spool of charts to pdf

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

JeffvdN
Posts: 24
Joined: Thu Aug 02, 2018 12:18 pm

New bug saving spool of charts to pdf

Postby JeffvdN » Wed Oct 16, 2024 12:10 pm

I have been running programs for years that ran this command, but now that I upgraded from v12 to v14, I am getting 2 errors. It often crashes eviews completely.
SpoolEQ.save(t=pdf, landscape, mode=i) chartsxl\EQ '<<< bug crashes here

I get 2 error messages, first this one
1051.png
1051.png (10.3 KiB) Viewed 41000 times
then this one
1025.png
1025.png (10.11 KiB) Viewed 41000 times
Let me know if you want the program and workfile so you can try it.

I tried playing with all of the options but none avoided the bug. I also tried creating the spool 2 different ways (print to output, and spool.append). Manually printing the spool using the Microsoft print to pdf driver works, but I think it looks a little different and I am not sure how to do that using code.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13583
Joined: Tue Sep 16, 2008 5:38 pm

Re: New bug saving spool of charts to pdf

Postby EViews Gareth » Wed Oct 16, 2024 5:33 pm

Could you provide the workfile and the save command you’re using?

JeffvdN
Posts: 24
Joined: Thu Aug 02, 2018 12:18 pm

Re: New bug saving spool of charts to pdf

Postby JeffvdN » Wed Oct 16, 2024 10:03 pm

Attached is a little program and workfile that should duplicate the problem.

I isolated the problem to one particular chart. The chart is supposed to have lines that are solid and dashed even if it is printed in color so it has a line that sets the option to linepat
graEQPE{%pfx}.options linepat

When that line is removed, the resultant charts do not crash the save to pdf command. When I add it back, the save command crashes.

Let me know if you want me to send you the code that creates the chart that is causing the problems. Here is a snip of some of the code that creates the problematic chart.

graEQPE{%pfx}.options linepat '<<< this line causes the save to pdf command to crash - removing it lets it run without errors.
graEQPE{%pfx}.setelem(1) lcolor(blue)  
graEQPE{%pfx}.setelem(1) linewidth(.5)
graEQPE{%pfx}.setelem(1) linepattern(1)
graEQPE{%pfx}.setelem(2) lcolor(blue)
graEQPE{%pfx}.setelem(2) linewidth(.5)
graEQPE{%pfx}.setelem(2) linepattern(2)
graEQPE{%pfx}.setelem(3) lcolor(red)  
graEQPE{%pfx}.setelem(3) linewidth(.5)
graEQPE{%pfx}.setelem(3) linepattern(1)
graEQPE{%pfx}.setelem(4) lcolor(red)
graEQPE{%pfx}.setelem(4) linewidth(.5)
graEQPE{%pfx}.setelem(4) linepattern(7)
Attachments
bug_save_spool_to_pdf.prg
(706 Bytes) Downloaded 21590 times
bug.wf1
(274.56 KiB) Downloaded 21757 times

EViews Steve
EViews Developer
Posts: 844
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: New bug saving spool of charts to pdf

Postby EViews Steve » Tue Oct 22, 2024 2:50 pm

Released a new patch with a possible fix.

JeffvdN
Posts: 24
Joined: Thu Aug 02, 2018 12:18 pm

Re: New bug saving spool of charts to pdf

Postby JeffvdN » Fri Oct 25, 2024 9:51 am

Yes, the patch fixed the bug.

I am noticing that the v14 version of eviews is creating a much larger file size. Did it increase the resolution? They look the same to me.

For example, my old version 12 had a program that created a pdf files that was 3.5 Meg. It is a 172 page file with 6 line charts per page. Now version 14 is creating the same pdf file that is 26.692 Meg (almost 5 times the size). When I zip the 2 files, they are both around 3.4 Meg. I think pdf files are supposed to be compressed so it looks to me like the new pdfs are not compressing as they should. Is there a way to get the file sizes back down?


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest