Forum Replies Created
-
AuthorPosts
-
in reply to: HTML/CSS rendering issues November 6, 2017 at 15:10#27172
We are using following html
- Rely(TM) 60″ x 32″ single-threshold
- Round shower drain
- Oblo(R) wall-mount non-diverter
we are seeing awkwardly bigger bullet points in the generated pdf.. can you help us in controlling size of bullet points?
in reply to: Bigger bullet points for unordered list items November 7, 2017 at 15:50in reply to: Bigger bullet points for unordered list items November 8, 2017 at 13:48#30108Hello PD4ML Team,
Please help us with the syntax to get bullet points with less size.
-Ganesh M.
in reply to: HTML/CSS rendering issues November 9, 2017 at 20:30#27173Hi,
it is a little bit hard. I only want generate A4 paper PDF.I have a
<h1>and a div with a lot of lorem ipsum. On the left is all fine, on the right side the text is cut! Only a few chars or maybe only one.I want exact positioning on the pdf. For example I want put a box with an exact size of 33 mm. For this I set the setHtmlWidth to 2.83*210
2.83 because 1mm = 2.83ptAlso I added margins with setPageInsetsMM results in a cut right side 🙁
setPageSizeMM is with 210 and 297. Also I added to html style body {width:210mm;height:297mm;}All this have no effect of cutting the right side.
What can I do?in reply to: Text on right side is cut away November 9, 2017 at 20:46#30117If you define HTML/CSS dimensions in physical units, try
pd4ml.protectPhysicalUnitDimensions() API call.in reply to: Text on right side is cut away November 9, 2017 at 21:34#30118Okay. I think that this helped.
3.78*210 for htmlWidth is correct?
And a complete other question. I am using the ice pdf viewer and this viewer shows me always the wrong margins on the right side. Do you have a suggestion for an goog pdfviewer?
Thank youin reply to: Text on right side is cut away November 9, 2017 at 21:55#30119The way PD4ML scales HTML layout to “paper” media is explained by the link:
https://pd4ml.com/cookbook/pdf_page_formatting.htmPD4ML uses 72dpi to translate screen pixels to physical units, but after the physical dimensions are translated to screen pixels, the entire layout is translated back to physical units (scaled to fit the target media width). The scale factor depends on htmlWidth, target paper format and paper margins.
protectPhysicalUnitDimensions() protect elements, whose sizes given i.e. in mm, from being scaled at the phase.
FYI constants used by PD4ML:
A4 is 595 x 842pt
MM_PER_INCH = 25.4;
POINTS_PER_MM = 2.835;
POINTS_PER_INCH = 72;
PIXELS_PER_POINT = 1.35;
PIXELS_PER_PICA = 12 * PIXELS_PER_POINT;Regarding a viewer: I’ve got no good tool to recommend, but we definitely have to test PD4ML output with ICE PDF to check what is wrong there.
in reply to: PDF page headers/footers definition options November 29, 2017 at 03:38#27294Hai everyone, how to implement this java code below into cfscript?
PD4PageMark footer = new PD4PageMark() {
public String getHtmlTemplate(int pageNumber) {
if ( pageNumber % 2 == 0 ) {
return “<html><body>some left aligned stuff..."; } else { return "<html><body>some right aligned stuff…”;
}
}
};
pd4ml.setPageFooter(footer);in reply to: Text on right side is cut away November 30, 2017 at 14:45#30110Hi
I tried a lot to display correct with icePDF. I attached an picture. Could you find anything out?in reply to: PDF page headers/footers definition options November 30, 2017 at 18:20#27295Try to define a footer inline with
<pd4ml:page.footer scope="even"> and <pd4ml:page.footer scope="odd"> tags. See https://pd4ml.com/cookbook/pdf_header_footer_generation.htm If your environment is sensitive namespace declarations, use an alternative tag naming: <pd4ml-page-footer>
in reply to: Text on right side is cut away November 30, 2017 at 18:33#30111Is the issue only with icePDF? Does the doc layout appear in Acroread as expected?
in reply to: Text on right side is cut away November 30, 2017 at 20:04#30112Sorry first thing I have to correct right is the margin 1 cm
In Adobe it looks correct. Also in other viewers.
Here is the file attached.
The issue is not only in icePDF. Also their is a similar issue with open OpenViewerFX.
OpenViewerFX cuts also the header and footer. The first line of the header is gone also the pagenumber in footer.
And the same issue at the right side.in reply to: Text on right side is cut away December 1, 2017 at 12:24#30113If you open the document in Acroread its content is rendered correctly using Times font.
IcePDF for some reason uses Arial instead (however in doc font info it still refers to Times).As for me it is a bug of IcePDF, or its free version restriction (which does not include a font engine, according to the download page).
I would recommend to generate PDF with TTFs embedded, not relying to built-in viewer fonts.
in reply to: Text on right side is cut away December 1, 2017 at 12:33#30114Hmm… On my workstation it always uses Arial instead of any (even embedded) font.
in reply to: Text on right side is cut away December 1, 2017 at 19:42#30115It looks like the complete restriction of icePDF.
I added to the html code<meta http-equiv="Content-Type" content="text/html; charset=utf-8">downloaded your 32MB big fonts.jar and added pd4ml.useTTF(“java:fonts”, true)
I think this should embbed the required fonts? -
AuthorPosts
