HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › General questions / FAQ › Different Result (there’s gap between line)
- This topic has 6 replies, 2 voices, and was last updated May 21, 2013
11:15:52 byary.yuniarti.
-
AuthorPosts
-
May 16, 2013 at 12:40#26841
I used the same html resources to convert to pdf
I use coldfusion for generate the pdf using cfdocument and pd4ml
but the result is different : see the attachmentplease advice
thank you
May 16, 2013 at 12:59#29328First, please take a look to the general info, regarding content scaling in PD4ML: https://pd4ml.com/cookbook/pdf_page_formatting.htm
So to scale the content down, you would need to slightly increase htmlWidth conversion parameter value.
If gaps between lines are higher than expected, use CSS property “line-height” to adjust.
May 16, 2013 at 14:05#29329thank you,
right now we’re still using the free pd4ml pro version,
i found from the forum that we can use setpagesize, sethtmlwidth, etc but it is in the paid versionMay 16, 2013 at 14:10#29330Actually there is no free version of PD4ML. There are fully functional evaluation versions: they watermark generated PDFs, but the rest of the functionality is identical to commercial versions of PD4ML.
May 16, 2013 at 14:22#29331yes… sorry… i mean the demo version
but when i want to use the function setpagesize it wont workMay 16, 2013 at 15:32#29332Why do you think it does not work?
Generate PDFs with different pageSize parameters and compare the PDF document properties.May 21, 2013 at 11:15#29333<pd4ml:transform screenWidth="#s_screenWidth#" pageFormat="A4" pageOrientation="#Orientation#" pageInsets="0,0,0,0,mm" enableImageSplit="FALSE" inline="true" fileName="#s_fileName#" encoding="ISO8859_1" interpolateImages="FALSE" > <body style="padding-top: 0; margin-top: 0"> <pd4ml:usettf from="java:fonts"/> <pd4ml:header areaHeight="-1" pagesToSkip="0"> <cfoutput> #pdfHeader# </cfoutput> </pd4ml:header> <pd4ml:footer areaHeight="-1" pagesToSkip="0"> <cfoutput> #pdfFooter# </cfoutput> </pd4ml:footer> <cfif len(trim(s_filedir))> <pd4ml:savefile dir="#s_filedir#" name="#s_fileName#" redirect="DISABLED" debug="false" /> </cfif> <cfoutput> #pdfBody# </cfoutput> </body> </pd4ml:transform>
SCREENWIDTH i adjust based on the orientation :
Portrait :<cfset s_screenWidth = "700"> Landscape : <cfset s_screenWidth = "1000">
margin i set in each part of the document (header, footer and body)
because when i set the margin in pageInsets, the header and footer is also affect with the margin settingand still the result is different from the pdf render from cfdocument
-
AuthorPosts
The forum ‘General questions / FAQ’ is closed to new topics and replies.
