Forum Replies Created
-
AuthorPosts
-
in reply to: General questions / FAQ October 6, 2015 at 13:10#26898
Hi,
Could you please tell us is there any way to avoid the blank pages in between in PD4ML. When we generate a PDF, we were getting blank pages in between with just header and footer and no text content in this. we are using div & tables which are having margin bottom also. But is there any way in PD4ML where we can remove the pages with blank text
Regards
Sarinin reply to: Issue with Blank pages October 6, 2015 at 13:18#29470PD4ML automatically removes blank trailing pages only. In your case it would make sense to determine the problem reason.
First try to temporarily define DIV and TABLE borders to see if invisible parts of them (content padding etc) are wrapped to next pages.
DIV, TABLE { border: 1 solid tomato }in reply to: Issue with Blank pages October 7, 2015 at 04:04#29465Yes, a very very small part of the div(say, 2px) which is caused by margin bottom comes to the next page. Please let us know how we can avoid it, thanks in advance
in reply to: Issue with Blank pages October 7, 2015 at 14:13#29466Try to increase htmlWidth conversion parameters in small amounts, until a page content fits a page space.
in reply to: Issue with Blank pages October 7, 2015 at 16:01#29467But in our case, the contents are dynamic, so we can’t do it for one page, whether any solutions to avoid this
in reply to: Issue with Blank pages October 7, 2015 at 16:22#29468In your case a possible reason of an appearance of a blank page, is a page content exceeds given page height and followed by a page break directive (most probably “page-break-before: always” CSS property; possibly
<pd4ml:page.break>tag).So alternatively you may suppress/override page-break-before style (with pd4ml.addStyle() API call, for example)
But if the issue is the same with a variety of your documents (page content does not fit only few pixels), obviously the page layout has been developed for a smaller content scale. You can scale down the content by an increasing of htmlWidth parameter.
in reply to: Issue with Blank pages October 8, 2015 at 11:10#29469Thank you for your help
Could you please tell us whether it it possible to know the remaining space available in page
In page break, we are using ifSpaceBelowlessThan condition.
Likewise, whether there is any option whether we can write a div/span in JSP/FTL based on the available space in pdf
in reply to: HTML/CSS rendering issues October 9, 2015 at 09:45#26921Inside my Web-App i’ve inserted a square containing basically an earth map similar to google Map, in which the user can move around the earth, can zoom in and zoom out and so on…
But, when i try to generate the PDF, all the text fields are exported as expected, but this is not the same for the square containing the map, that simply isn’t printed
Is there a way to implement what i need without converting the map into a static image?in reply to: Issue with Blank pages October 9, 2015 at 11:05#29464Or whether can you please tell us whether it is possible to find out the page height , page header height, page footer height in jsp/ftl
we are using inline header/footer. So whether it is possible to find out the heights using PD4ML
thank you
in reply to: Is it possible to print a dynamic MAP? October 9, 2015 at 12:09#29533Small addition: if inside the browser i right-click on the image i’m able to save as image. Inspecting the html source code i see that the square containing the map is located inside a
<canvas>tag.I’ve searched around and seen that probably pd4ml support printing canvas by using this instruction:
pd4ml.enable.canvas.interpreter
Well, i hope to be on the correct direction, but still i don’t know how to use this instruction and where should be located 🙂
in reply to: Is it possible to print a dynamic MAP? October 9, 2015 at 12:30#29532Unfortunately for the time being PD4ML does not support image maps and canvas.
We can add image maps support (by request), but with canvas it is not that easy. It would require to implement DOM-compatible document representation, add JavaScript support etc – in other words a total refactoring of the library and adding new complexity levels.
“pd4ml.enable.canvas.interpreter” allows to connect an external functionally limited JavaScript/canvas rendering engine. The feature is untrivial to configure/utilize and because of different reasons we do not develop it further.
PD4ML Web is based on an alternative HTML rendering engine, it supports JavaScript and canvas, but has its own drawback: it does not output interactive (hyperlinked) PDFs.
in reply to: Issue with Blank pages October 9, 2015 at 12:47#29462Page width and height (paper format) is given as a conversion parameter. By default it is A4.
HTML is rendered using htmlWidth parameter (an equivalent of web browser frame width).
By a conversion, htmlWidth is mapped to given paper width (minus horizontal margins).
A height of page (from HTML perspective) can be computed from the above info.
See https://pd4ml.com/cookbook/pdf_page_formatting.htm for more details.
But I would think you are trying to go a wrong way. Probably it would make more sense to enclose logical parts of document to
<div style="bage-break-inside: avoid"> ... </div>sections and let PD4ML break the content to pages.in reply to: Issue with Blank pages October 10, 2015 at 05:54#29463
thank you for your reply
But in our case, we have a table in which we have article details. there is margin of 5 px from top & bottom. we have already given a page break inside as avoid.
In one scenario, the article length is more and it split into two pages. In that scneario, the text comes to the very last line above the footer. As we have a margin & padding, the padding only comes to the next page. As there is no content, everyone seems it as blank. If we removed the margin & span, then there is no blank page. But in our case, we can’t remove the margin as the other sections/styles are depend on this. Also, we cant reduce the htmlwidth as the prototyope is already aligned. is there any solution without changing the htmlwidth. Could you please tell us the best way to solve this
thank you
in reply to: Issue with Blank pages October 10, 2015 at 05:56in reply to: General questions / FAQ October 12, 2015 at 11:47#26983Hi,
does PD4ML allows numeric signature of PDF ?
do you have some plans to include this feature ?Thanks
-
AuthorPosts
