external stylesheet for pdf does not seem to work

Hello,

I try to use an external css file for custom styles into exported pdf.

According to the examples in the doc, I did the following:

	scheduler.exportToPDF({
				format:"A4",
				orientation:"landscape",
				zoom:zoom,
             header: '<link rel="stylesheet" type="text/css" href="custom_pdf.css">',
             name: groupname+".pdf"
			});

The pdf is generated, but the content of the css file does not seem to have any influence on the appearance of the pdf. The css file is in the same folder as the scheduler page.

The content of the file is:

.dhx_cal_event div{background-color: #FFFFAA !important;  color: black !important; }

Any suggestions as to what I’m doing wrong? If I use styles directly in the header property (inline, with the tag), they are working fine. However, this is not very practical while editing the styles.

Beste regards, Maxx

By the way, I’m using dhtmlxScheduler 4.3.1, with Firefox.

Hello.

You are trying to use custom_pdf.css. It seems like it stored on your server and export server doesn’t have in its root directory your custom_pdf.css.
If you want to use stylesheets from this file you should use full path like someserver/styles/custom_pdf.css

If you want to use just some rules you could put following into header:

<style>
.dhx_cal_event div{background-color: #FFFFAA !important;  color: black !important; }
</style>