PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: css @media parsing
   PostPosted: 16 Dec 2010, 15:58 
Hi

I am using the pd4ml 3.70., but having an an issue with the css, so i want to make some special exceptions in the css for my pdf.

@media pdf{ } is working fine, but it is still rendering what is inside @media screen{}
even though i have set the parameter pd4ml.media.type.print to be "override".

I know i can add a media="screen" to the stylesheet link tag in the html, that works.

But any way, i can get pd4ml to ignore what is inside @media screen{}?


  Subject: Re: css @media parsing
   PostPosted: 04 Jan 2011, 16:21 
We've just fixed the issue. An updated version will be available for download in about two weeks.


  Subject: Re: css @media parsing
   PostPosted: 15 Jul 2011, 12:51 
We have a similar problem where we have the following in our css


@media screen and (-webkit-min-device-pixel-ratio:0) { div.gridDefault .ASC, div.gridDefault .DESC{
display: -webkit-inline-box;
}
div.cellIn {
display: table-cell;
padding-top: 0px;
width: 20px;
}
}


But we are getting a org.w3c.css.sac.CSSException: Encountered "and" at line 1, column 34370.
> Was expecting one of:
> <S> ...
> "{" ...
> "," ...
>
> at com.steadystate.css.parser.SACParser.parseStyleSheet(Unknown Source)
> at org.zefer.html.doc.css.d.Ò00000(Unknown Source)
> at org.zefer.html.doc.css.c.super(Unknown Source)
> at org.zefer.html.doc.PD4MLHtmlParser.buildDocument(Unknown Source)
> at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)
> at org.zefer.pd4ml.PD4ML.render(Unknown Source)


Can you please let me know the solution to this issue?


  Subject: Re: css @media parsing
   PostPosted: 20 Jul 2011, 16:15 
It is CSS3 syntax, CSS Parser project library (ss_css2.jar) does not support.

Currently we do some estimations if it can be fixed with moderate efforts.


  Subject: Re: css @media parsing
   PostPosted: 27 Sep 2011, 17:19 
Hi all,

have you got any idea if this issue will be fixed?

Regards,


  Subject: Re: css @media parsing
   PostPosted: 07 Sep 2012, 10:24 
This is still an issue (PD4ML Pro 3.8.0fx6), and it seems that the CSS parser doesn't like to find "(" as part of an @media declaration; i.e.

Code:
@media (max-width: 899px) {


This produces the error:

Code:
org.w3c.css.sac.CSSException: Encountered "(" at line 882, column 8.
Was expecting one of:
    <S> ...
    "not" ...
    "only" ...
    <IDENT> ...
   
   at com.steadystate.css.parser.SACParser.parseStyleSheet(SACParser.java:60)
   at org.zefer.html.doc.css.d.Ò00000(Unknown Source)
   at org.zefer.html.doc.css.c.o00000(Unknown Source)
   at org.zefer.html.doc.PD4MLHtmlParser.buildDocument(Unknown Source)
   at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)
   at org.zefer.pd4ml.PD4ML.render(Unknown Source)
   at org.zefer.pd4ml.PD4ML.render(Unknown Source)


I understand if the parser won't include media queries, but it'd be nice if it could just ignore them, rather than throwing the exception and failing. As it is, you can't use a CSS if it has media queries at all.


  Subject: Re: css @media parsing
   PostPosted: 07 Sep 2012, 12:46 
Here you faced with a CSS feature, not supported by the open source CSS Parser Project, PD4ML relies on.

From time to time we patch it and implement new features, but as a rule it is not that trivial. If you have JavaCC skills, you may fix the issue by yourself - the most recent patched sources are available in PD4ML download area.



[Reply]     [ 7 posts ] 

Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share