Hello,
How should I be including an external stylesheet so that it's as if it's being included last in the document?
I'm interested in buying a server license and was trying to get this code working before I committed. I was wondering if you could help. I think I'm doing something wrong.
Everything's working fine except I can't get the css properties to override the ones in the page being curled. I can specify new properties that haven't been defined yet with the same selectors and they work. But whenever I try to override properties, it seems to be using the other style sheets, regardless of the selector type.
This is my code
If needed, I can supply the entire source for this.
Thanks a bunch,
Steve
How should I be including an external stylesheet so that it's as if it's being included last in the document?
I'm interested in buying a server license and was trying to get this code working before I committed. I was wondering if you could help. I think I'm doing something wrong.
Everything's working fine except I can't get the css properties to override the ones in the page being curled. I can specify new properties that haven't been defined yet with the same selectors and they work. But whenever I try to override properties, it seems to be using the other style sheets, regardless of the selector type.
This is my code
<?php
require_once( 'Prince.class.php' );
header('Content-Type: application/pdf');
header('Content-Disposition: inline; filename="myfile.pdf"');
$prince = new Prince( '/usr/bin/prince' );
$base_url = 'BASEURL OF SERVER';
$url = $base_url . '/view.php';
$prince->setBaseURL( $base_url );
$prince->addStyleSheet( $base_url . '/css/listing_feature_sheet_pdf.css' );
ob_start();
$ch = curl_init( $url );
curl_exec($ch);
curl_close($ch);
$prince->convert_string_to_passthru( ob_get_clean() );
If needed, I can supply the entire source for this.
Thanks a bunch,
Steve