Forum Replies Created
-
AuthorPosts
-
in reply to: Content not flowing properly around images October 29, 2010 at 17:38#28290
For the time being there is no workaround.
HTML-to-PDF conversion process consists of 2 phases: Initially PD4ML renders HTML document layout for a “screen device”, whose height is unlimited. At this point page breaks are not taken into account. After that the rendered content is “printed” to PDF output device (or Image device, or RTF device etc) and depending on a particular output media nature and dimensions, page breaks (or “page-break-inside: avoid” directives) applied.
What you actually need is to reflow the text depending on an actual image position, and the actual image position depends on a page break position. So during the phase 1 we need a position info, which will be known only during the phase 2. That is a very big challenge to the current PD4ML architecture and we are even not ready to estimate needed efforts yet.
in reply to: General questions / FAQ November 2, 2010 at 15:09#26477Hello,
I am attempting to use the “fix_base_path” tag in order to add a domain name to selected html links. My current code is such:
<pd4ml:fix_base_path<br /> pattern="/css/"<br /> basePath="http://mydomain.com"<br /> addSessionID="false"<br /> >This only replaces links that start with “/css/”. However, I would also like to replace links that start with other directories, such as “/img/” or “/js/”. Is there a way to add multiple patterns to this directive, or to provide the pattern in such a way that it can match other directories?
Thank you for your assistance!
Best Regards,
– Claytonin reply to: fix_base_path: multiple patterns November 2, 2010 at 15:24#28292Try do define multiple nested tags with needed patterns.
<pd4ml:fix_base_path pattern="/css/" ... > <pd4ml:fix_base_path pattern="/img/" ... > <pd4ml:fix_base_path pattern="/js/" ... > Content to apply the tags to </pd4ml:fix_base_path> </pd4ml:fix_base_path> </pd4ml:fix_base_path>
On the other hand recent versions of PD4ML are able to resolve absolute web paths via ServletContext. I would recommend to add debug=”true” to
<pd4ml:transform>and ispect STDOUT what it tries to load and whether the URLs are correct.in reply to: fix_base_path: multiple patterns November 2, 2010 at 18:19#28293Thanks, that worked perfectly!
I was trying the “debug” option, but the referenced paths were still relative. Plus, I wanted to strip out the jsessionId from the resulting URL …
However, nesting the tags did the trick. Thank you for the quick reply!
Best,
– Claytonin reply to: General questions / FAQ November 4, 2010 at 23:04#26478Hi, I am trying to convert a HTML-styled String (for instance: “
<HTML><BODY>my text to show</body><html>) to a pdf using streams:StringReader isr2 = new StringReader(myhtmlstringl);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
pd4ml.render(isr2, baos);
if I use a fieoutputstream, the pdf is created but show a blank page.
and if I use the bytearrayoutputstream, what can I do for show the pdf-result in my webpage.in reply to: Adobe Reader Version Problem November 5, 2010 at 06:40#28067PDF format versions are backward compatible. PD4ML outputs PDFs compatible with Acroread 5 and newer. (Even if you use Acroread 4, it will ignore all features it does not “understand”)
Acroread 9.1 should introduce no problems at all, so no PD4ML update is necessary.
in reply to: installation / getting started November 5, 2010 at 06:50#28251Thank you that works fine!
in reply to: Optimalization of PDF for printing November 9, 2010 at 01:40#28252Unfortunately PDF standard provides not much control to optimize device-specific print jobs.
For example: if your PDF document has bulky images it depends on the printer supported features and the printer driver whether the image will be sent to print as an unpacked array of pixels or in its original compact format (JPEG, PNG).
in reply to: HTML-styled String to pdf using streams November 9, 2010 at 11:18#28294Among PD4ML examples https://pd4ml.com/examples.zip there is PD4MLBySslServlet.java class, which ilustrates how to use PD4ML in web scenarios (just ignore SSL stuff there).
At first glance your Java code seems to be correct. So I would suspect source HTML as a reason of blank PDFs. Do you really have opening tag at the end of your HTML code? Please try to remove it – it may confuse the HTML parser.
in reply to: HTML/CSS rendering issues November 9, 2010 at 11:45#26479I am unable display the Greek letters θ, ß in the generated PDF
I had tried with both Unicode, ASCII codesi in Java, but the same codes are getting displayed in the generated PDF.What is the solution to display the Greek letters in the generated PDF?
in reply to: How to display Greek letters θ, ß in generated PDF for Java November 9, 2010 at 15:56#28295You need to utilize TTF Embedding feature of PD4ML Pro
in reply to: General questions / FAQ November 11, 2010 at 07:21#26480Hello,
I have charts displayed on my page. I want to export them also in the pdf generated. Please help me regarding the matter. If sample code is provided would be a great help. I am using amCharts to display charts on my pages.Thanks & Regards
in reply to: Url graph not displayed November 13, 2010 at 01:29#27828I tried a variety of JDK versions, but was not able to provocate an with any of them URL-length problem.
Now I suspect encoded URL parts wrolly interpreted. For example “%25” is auto-replaced with 0x25 character there. Could it be a problem?
Try a long chart path without such %NN patterns. Does it work?
in reply to: how can i give powered by options November 13, 2010 at 23:45#28032With PD4ML Pro you may do that by inline footer definition:
<b>All rights reserved. Powered by PD4ML</b>
With PD4ML Std it could be done via API call. See more about footers/header:html-pdf-faq-f1/pdf-page-headers-footers-definition-options-t41.html
in reply to: How to create bookmarks in PDF? November 14, 2010 at 11:01#27664The API call is intended for that:
https://pd4ml.com/api/org/zefer/pd4ml/PD4ML.html#generateOutlines(boolean)
-
AuthorPosts
