HTML to PDF / DOCX / RTF Java converter library Forums PD4ML v3 Archived Forums (Read Only) Troubleshooting Stylesheet definition results in emtpy pdf document

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • mil
      #26227

      Hello,

      we have a problem in conjunction with the definition of stylesheets. Currently we set the stylesheet file via call to PD4ML.addStyle(), e.g.

      [language=java:24wq1k8v]pdfCreator.addStyle(someUrl, true);[/language:24wq1k8v]

      We define the page header using the method PD4ML.setPageHeader(somePD4PageMark).

      We use PD4PageMark.setHTMLTemplate(someHTML) to set the HTML content.

      First of all: Does “someHTML” have to be valid HTML, that means does it have to contain tags like “” or ““?

      After that, we render the page using the method PD4ML.render(someURL, someStream);

      (Again: Does the HTML returned by “someURL” have to be valid HTML?)

      The problem concerning the stylesheet definition now is as follows:
      The stylesheet file contains the following style definition:

      body {
      background-color: white;
      font-family: Arial,Helvetica,Geneva,sans-serif;
      }

      The resulting pdf document only contains the header, but not the content retrieved by call to PD4ML.render(). (We found out that the content somehow gets painted over by the background-color.)
      After removing “background-color: white” out of this style definition, everthing works fine. As our customers can define their own styles for their printings, we cannot assure that a customers won’t create a stylesheet we ran in problems with. Could you please instruct us how to prevent that issue?

      Regards,
      Matthias

      #27387

      Hello again,

      could you please provide us with some information regarding the issue descripted above? We are really interested in buying your product as soon as we can exclude that our customers could ran into trouble with their self-defined stylings. It would be no problem for us if the issue above turned out to be a bug as long as it will be fixed in the near future.

      Regards,
      Matthias

      mil
        #27388

        Sorry for posting the message above as a guest and for the mistake: descripted -> described.

        Regards,
        Matthias

        #27389

        Sorry for the delay with the reply.

        @mil wrote:

        we have a problem in conjunction with the definition of stylesheets. Currently we set the stylesheet file via call to PD4ML.addStyle(), e.g.
        [language=java:2kj4szg5]pdfCreator.addStyle(someUrl, true);[/language:2kj4szg5]

        We define the page header using the method PD4ML.setPageHeader(somePD4PageMark).

        We use PD4PageMark.setHTMLTemplate(someHTML) to set the HTML content.

        addStyle() method impacts only the main document and headers/footers defined inline (with tag, for example)

        First of all: Does “someHTML” have to be valid HTML, that means does it have to contain tags like “” or ““?

        Yes, if you need to specify a style to a header or footer defined API- way, “someHTML” should contain all the , , tags and a style section or a reference to an external stylesheet. Unfortunately it cannot inherit style of the main document.

        After that, we render the page using the method PD4ML.render(someURL, someStream);

        The problem concerning the stylesheet definition now is as follows:
        The stylesheet file contains the following style definition:

        body {
        background-color: white;
        font-family: Arial,Helvetica,Geneva,sans-serif;
        }

        The resulting pdf document only contains the header, but not the content retrieved by call to PD4ML.render(). (We found out that the content somehow gets painted over by the background-color.)
        After removing “background-color: white” out of this style definition, everthing works fine. As our customers can define their own styles for their printings, we cannot assure that a customers won’t create a stylesheet we ran in problems with. Could you please instruct us how to prevent that issue?

        It seems to be a bug in our code. In the most recent betas of v351 we addressed a similar issue. By the way, which PD4ML version do you use? You may check that if you open a generated PDF in Acroread and inspect File->Properties->Application

        mil
          #27390

          We’re running the latest version of pd4ml (351b1).

          #27391

          We addressed the issue again in v351b8. Please give a try to it.

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

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