Hi:
I ran a quick test using SASHELP.PRDSALE using THIS code:
options orientation=landscape topmargin=.25in bottommargin=.25in rightmargin=.25in leftmargin=.25in;
ods graphics / width=10.5in height=7.5in;
ods pdf(id=1) file='c:\temp\test_graf.pdf' style=htmlblue nogtitle nogfootnote;
proc sgplot data=sashelp.prdsale;
title 'Test difference HTML/PDF';
where product in ('DESK' 'CHAIR' 'SOFA' 'TABLE');
vbar product / response=actual group=region groupdisplay=cluster clusterwidth=.50;
xaxis display=(nolabel);
yaxis label='Level of Agreement' values=(0, 50000, 80000) valuesdisplay=("None (0)" "The Middle (50K)" "The Highest (80K)");
footnote "N: Institute = 10, National = 100";
run;
ods pdf(id=1) close;
ods html(id=2) path='c:\temp\' file='test_graf.html' style=htmlblue nogtitle nogfootnote;
proc sgplot data=sashelp.prdsale;
title 'Test difference HTML/PDF';
where product in ('DESK' 'CHAIR' 'SOFA' 'TABLE');
vbar product / response=actual group=region groupdisplay=cluster clusterwidth=.50;
xaxis display=(nolabel);
yaxis label='Level of Agreement' values=(0, 50000, 80000) valuesdisplay=("None (0)" "The Middle (50K)" "The Highest (80K)");
footnote "N: Institute = 10, National = 100";
run;
ods html(id=2) close;
I didn't mess with fonts or DPI, all I did was generate 2 different files, one HTML and one PDF that sort of copied your general VBAR.
Here's the PDF file viewed in Acrobat Reader:
And here's the HTML file viewed in Chrome:
They look fairly similar to me as far as fonts and readability. (and yes, I know that 50K isn't the middle...my bad) Of course, it's not an apples-to-apples comparison because I can resize the browser window and the graph resizes and same with the PDF file in Acrobat. So I did my best to have them both at 100%.
All I did was use the same ODS options as far as STYLE, and NOGTITLE, NOGFOOTNOTE and then for ODS PDF, I made sure to change the margins and the orientation before ODS PDF started. I also changed the WIDTH and HEIGHT for ODS GRAPHICS, just to be sure that the image filled the entire PDF "page". As you can see I have the date turned off, but page numbering turned on in the other options. Since HTML ignores date/number options, I wanted to leave the page number in so you could see it placed on the top of the output, with the TITLE.
When I am making 2 files for comparison purposes, I like to use the ID= suboption to make sure that I am opening the right output file for comparison. In this case, ID= wasn't absolutely necessary, but I also didn't want to clobber any of the automatic HTML files that SAS creates by default (or default PDF files if you have that turned on in EG or SAS Studio).
If you try using the ODS example and options that I've used and you are still seeing big differences in the 2 different output files, then I would recommend that you open a case with SAS Tech Support so they can help you zero in on what is happening to make your PDF file so different from your HTML file.
You should be able to run my example and only need to change the path from c:\temp to your path to be able to run the code as a test. Hope this helps,
Cynthia
... View more