Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #26498

    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{}?

    #28338

    We’ve just fixed the issue. An updated version will be available for download in about two weeks.

    #28339

    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:
    >
    > “{” …
    > “,” …
    >
    > 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?

    #28340

    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.

    #28341

    Hi all,

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

    Regards,

    #28342

    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.

    @media (max-width: 899px) {

    This produces the error:

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

    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.

    #28343

    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.

    #28344

    Hello All,

    I want to include external css files in jsp which is to be transform to pdf.

    How do i fix this below issue :

    org.w3c.css.sac.CSSException: Encountered ” “screen “” at line 59, column 13.

    12:49:42,111 ERROR [stderr] (default task-60) Was expecting one of:

    12:49:42,111 ERROR [stderr] (default task-60)

    12:49:42,111 ERROR [stderr] (default task-60) “{” …

    12:49:42,111 ERROR [stderr] (default task-60) “,” …

    12:49:42,111 ERROR [stderr] (default task-60)

    12:49:42,112 ERROR [stderr] (default task-60) at com.steadystate.css.parser.SACParser.parseStyleSheet(SACParser.java:60)

    12:49:42,112 ERROR [stderr] (default task-60) at org.zefer.html.doc.css.d.Ò00000(Unknown Source)

    12:49:42,112 ERROR [stderr] (default task-60) at org.zefer.html.doc.css.c.super(Unknown Source)

    12:49:42,112 ERROR [stderr] (default task-60) at org.zefer.html.doc.PD4MLHtmlParser.buildDocument(Unknown Source)

    12:49:42,112 ERROR [stderr] (default task-60) at org.zefer.pd4ml.PD4ML.super(Unknown Source)

    12:49:42,112 ERROR [stderr] (default task-60) at org.zefer.pd4ml.PD4ML.render(Unknown Source)

    12:49:42,112 ERROR [stderr] (default task-60) at org.zefer.pd4ml.PD4ML.render(Unknown Source)

    12:49:42,112 ERROR [stderr] (default task-60) at org.zefer.pd4ml.PD4ML.render(Unknown Source)

    12:49:42,112 ERROR [stderr] (default task-60) at org.zefer.pd4ml.taglib.PD4MLTransformerTag.render(Unknown Source)

    12:49:42,113 ERROR [stderr] (default task-60) at org.zefer.pd4ml.taglib.PD4MLTransformerTag.doEndTag(Unknown Source)

    12:49:42,113 ERROR [stderr] (default task-60) at org.apache.jsp.WEB_002dINF.Jsp.itembank.SummaryPDF_jsp._jspService(SummaryPDF_jsp.java:494)

    12:49:42,113 ERROR [stderr] (default task-60) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:69)

    12:49:42,113 ERROR [stderr] (default task-60) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

    12:49:42,113 ERROR [stderr] (default task-60) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:365)

    12:49:42,113 ERROR [stderr] (default task-60) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321)

    12:49:42,113 ERROR [stderr] (default task-60) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:254)

    12:49:42,113 ERROR [stderr] (default task-60) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

    12:49:42,114 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:87)

    12:49:42,114 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)

    12:49:42,114 ERROR [stderr] (default task-60) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)

    12:49:42,114 ERROR [stderr] (default task-60) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)

    12:49:42,114 ERROR [stderr] (default task-60) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)

    12:49:42,114 ERROR [stderr] (default task-60) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)

    12:49:42,114 ERROR [stderr] (default task-60) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56)

    12:49:42,114 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)

    12:49:42,115 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)

    12:49:42,115 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:57)

    12:49:42,115 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)

    12:49:42,115 ERROR [stderr] (default task-60) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)

    12:49:42,115 ERROR [stderr] (default task-60) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)

    12:49:42,115 ERROR [stderr] (default task-60) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)

    12:49:42,115 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:207)

    12:49:42,116 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:150)

    12:49:42,116 ERROR [stderr] (default task-60) at io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:157)

    12:49:42,116 ERROR [stderr] (default task-60) at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)

    12:49:42,116 ERROR [stderr] (default task-60) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:263)

    12:49:42,116 ERROR [stderr] (default task-60) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208)

    12:49:42,116 ERROR [stderr] (default task-60) at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992)

    12:49:42,116 ERROR [stderr] (default task-60) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939)

    12:49:42,117 ERROR [stderr] (default task-60) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)

    12:49:42,117 ERROR [stderr] (default task-60) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)

    12:49:42,117 ERROR [stderr] (default task-60) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)

    12:49:42,117 ERROR [stderr] (default task-60) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)

    12:49:42,117 ERROR [stderr] (default task-60) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)

    12:49:42,117 ERROR [stderr] (default task-60) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

    12:49:42,117 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:87)

    12:49:42,117 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)

    12:49:42,118 ERROR [stderr] (default task-60) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)

    12:49:42,118 ERROR [stderr] (default task-60) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)

    12:49:42,118 ERROR [stderr] (default task-60) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)

    12:49:42,118 ERROR [stderr] (default task-60) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)

    12:49:42,118 ERROR [stderr] (default task-60) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56)

    12:49:42,118 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)

    12:49:42,119 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)

    12:49:42,119 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:59)

    12:49:42,119 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)

    12:49:42,119 ERROR [stderr] (default task-60) at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:81)

    12:49:42,119 ERROR [stderr] (default task-60) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)

    12:49:42,119 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113)

    12:49:42,119 ERROR [stderr] (default task-60) at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52)

    12:49:42,119 ERROR [stderr] (default task-60) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)

    12:49:42,120 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:65)

    12:49:42,120 ERROR [stderr] (default task-60) at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:70)

    12:49:42,120 ERROR [stderr] (default task-60) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)

    12:49:42,120 ERROR [stderr] (default task-60) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)

    12:49:42,120 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:218)

    12:49:42,120 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:205)

    12:49:42,120 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:69)

    12:49:42,120 ERROR [stderr] (default task-60) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:134)

    12:49:42,121 ERROR [stderr] (default task-60) at io.undertow.server.HttpHandlers.executeRootHandler(HttpHandlers.java:36)

    12:49:42,121 ERROR [stderr] (default task-60) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:619)

    12:49:42,121 ERROR [stderr] (default task-60) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

    12:49:42,121 ERROR [stderr] (default task-60) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

    12:49:42,121 ERROR [stderr] (default task-60) at java.lang.Thread.run(Thread.java:744)

    12:49:42,747 INFO [stdout] (default task-60) done in 1648ms.

    my Jsp contains:

    <%@page import="com.schoolcity.stars.controller.itembank.ItemBankController"%>
    <%@ page import="java.util.Map"%><%@ page import="java.util.List"%><%@ page import="java.util.ArrayList"%><%@ page import="java.util.HashMap"%><%@ page import="com.schoolcity.stars.dto.itembank.ItemSummary"%><%@ page import="com.schoolcity.stars.entity.assessment.Assessment"%><%@ page import="com.schoolcity.stars.entity.assessment.AssessmentForm"%><%@ page import="com.schoolcity.stars.entity.common.InstanceSubject"%><%@ page import="com.schoolcity.stars.entity.itembank.ItemChoice"%><%@ page import="com.schoolcity.stars.entity.itembank.Item"%>
    <% Map mpItemSummary = (Map ) request.getAttribute(“SUMMARY_PDF”);
    Map mpItemDetail = (Map) request.getAttribute(“ITEM_SELECTED_DETAILS”);
    List lstDifficultyCode = (List) request.getAttribute(“DIFFICULTY_CODE”);
    List
    lstBloomsCode = (List) request.getAttribute(“BLOOMS_CODE”);
    Assessment objAssessmentData = (Assessment) request.getAttribute(“ASSESSMENT_DATA”);
    Map mpTotalPoints = (Map) request.getAttribute(“TOTAL_POINTS”);

    String strContextPath = request.getContextPath();
    System.out.println(“>>>>>>>>>>>>>>>


    >>>>>>>>>>>>>>>>>>>>” + strContextPath);
    System.out.println(“I m in summary PDF”);
    %>
    <%@ taglib uri="/WEB-INF/tlds/pd4ml.tld" prefix="pd4ml"%><%@ page contentType="text/html; charset=ISO8859_1"%> PD4ML pd4ml = new PD4ML();
    pd4ml.enableDebugInfo();

    Assessment Name:


    Year:
    Subject:

    <% int index = 1; for(Map.Entry mpeItemSummary : mpItemSummary.entrySet()) {
    %>

    <% } %>

    Item # Standard Item ID Correct Answer Points Passage Name Difficulty Level DOK
    <%=index++%> <%=mpeItemSummary.getValue().getFullNumber()%> <%=mpeItemSummary.getValue().getPublisherExtId()%> <%=mpeItemSummary.getValue().getCorrectAnswer()%> <%=mpeItemSummary.getValue().getPoints()%> <%=mpeItemSummary.getValue().getPassageTitle()%> <%=mpeItemSummary.getValue().getDifficultyCode()%> <%=mpeItemSummary.getValue().getDepthOfKnowledgeCode()%>
    <% for(String strDC : lstDifficultyCode){ %>

    <% } %>
    <% for(String strBC : lstBloomsCode){ %>

    <% } %>

    <% int iDLC = 0, iDMC = 0, iDHC = 0, iDNC = 0, iBCr = 0, iBEv = 0, iBAn = 0, iBAp = 0, iBUn = 0, iBRe = 0, iBNa = 0; for(Map.Entry mpeItemSummary : mpItemSummary.entrySet()) {
    %>

    <% for(String strDC : lstDifficultyCode){ %>
    <% if(strDC.equals(mpeItemSummary.getValue().getDifficultyCode())) { if(mpeItemSummary.getValue().getDifficultyCode().equals("Low")) iDLC++; if(mpeItemSummary.getValue().getDifficultyCode().equals("Medium")) iDMC++; if(mpeItemSummary.getValue().getDifficultyCode().equals("High")) iDHC++; if(mpeItemSummary.getValue().getDifficultyCode().equals("N/A")) iDNC++; %>

    <% } else { %>

    <% } %>
    <% } %>
    <% for(String strBC : lstBloomsCode){ %>
    <% if(strBC.equals("N/A") && mpeItemSummary.getValue().getBloomsCode().equals("-")) { iBNa++; %>

    <% } else { if(mpeItemSummary.getValue().getBloomsCode().equals("Create")) iBCr++; if(mpeItemSummary.getValue().getBloomsCode().equals("Evaluate")) iBEv++; if(mpeItemSummary.getValue().getBloomsCode().equals("Analyze")) iBAn++; if(mpeItemSummary.getValue().getBloomsCode().equals("Apply")) iBAp++; if(mpeItemSummary.getValue().getBloomsCode().equals("Understand")) iBUn++; if(mpeItemSummary.getValue().getBloomsCode().equals("Remember")) iBRe++; %>

    <% } %>
    <% } %>

    <% } %>

    STANDARD DIFFICULTY LEVEL BLOOM’S TAXONOMY Total
    <%=strDC%> <%=strBC%>
    <%=mpeItemSummary.getValue().getFullNumber()%> 1 N/A <%=mpeItemSummary.getValue().getBloomsCode()%>
    Total: <%=iDLC%> <%=iDMC%> <%=iDHC%> <%=iDNC%> <%=iBCr%> <%=iBEv%> <%=iBAn%> <%=iBAp%> <%=iBUn%> <%=iBRe%> <%=iBNa%>
    <% int count = 1; %>
    <% for(Map.Entry mpeItems : mpItemDetail.entrySet()) {
    %>

    <% List lstItemChoice= mpeItems.getValue().getItemChoices();
    %>

    <% String st[] = new String[mpeItems.getValue().getStandards().size()]; StringBuilder sbfullname = null; StringBuilder sbdesc = null; for(Map.Entry mpeStandard : mpeItems.getValue().getStandards().entrySet()){
    sbfullname = new StringBuilder();
    sbdesc = new StringBuilder();
    st = mpeStandard.getValue().split(“~”);
    sbfullname.append(st[0]);
    sbdesc.append(st[1]);
    %>

    Question #<%=count++%> (<%=mpeItems.getValue().getName()%>)
    <%=mpeItems.getValue().getStem()%>

    <% for(int i = 0 ; i < lstItemChoice.size() ; i++){ %>

    <% } %>

    (<%=lstItemChoice.get(i).getChoice()%>). <%=lstItemChoice.get(i).getBody()%>
    <%=sbfullname.toString()%> <% } and i am using bellow jars: pd4ml_demo.jar , pd4ml_tl_demo.jar , ss_css2.jar and w3c.jar files in lib of web-inf folder and have included the respective tlds.

#28345

Just-released v390 addresses the issue.

Please give it a try.

Viewing 9 posts - 1 through 9 (of 9 total)

The forum ‘Troubleshooting’ is closed to new topics and replies.