Getting wrong page measurement in PDF output.
Hi,
I have set the below page margin value in CSS. But, I have not get the correct measurement in PDF output (please see the attached image file).
CSS
@page { size: 155mm 235mm;}
Thanks,
Bala
- Page_measurement.png 278.8 kB
This issue should be fixed in Prince
latest builds.
Thanks Now it's shows correctly.
One more thing. I have set margin top value 2.2cm for text area. But, the output PDF shows the 2.34 cm. Please check and let me know the reason.
CSS:
@page:first{margin: 2.2cm 1.9cm 2.44cm 1.9cm;}
Please find the attached image file.
Thanks,
Bala
- Sample1.png 298.7 kB
One more question.
Is there any possibilities to include the line numbers in the output PDF file through CSS file? Because, I need to set the abstract content 12 lines down from the top type area. It's too difficult to identify the lines.
Thanks,
Bala
How I can adjust the word spacing for 8th line in a paragraph?
Currently it is not possible to change the style of specific numbered lines with CSS, only some aspects of the ::first-line can be changed.
Hi Mike,
Could you please send reply for above queries.
thanks,
Bala
To measure the margin-top it will be easier if you add a background to the page area and the text, eg.
@page { background: blue }
h1 { background: red }]
This will show the areas more precisely.
Hi Mike,
One more thing. I have set margin top value 2.2cm for text area. But, the output PDF shows the 2.34 cm. Please check and let me know the reason.
CSS:
@page:first{margin: 2.2cm 1.9cm 2.44cm 1.9cm;}
Please find the attached image file.
Thanks,
Bala
- Sample1.png 298.7 kB
Can you try applying the @page and heading background as suggested? I am not sure how Acrobat is measuring these figures.
Hi Mike,
I would like to paginate the both numbered and unnumbered heading levels in the single chapter. I have manipulate the below CSS properties. But, the output PDF contains numbered headings style for all headings.
CSS:
Numbered Headings
Section1 { counter-increment: section-1; }
Section2 { counter-increment: section-2; }
Section3 { counter-increment: section-3; }
Section4 { counter-increment: section-4; }
Section5 { counter-increment: section-5; }
Section1 > Heading:before { content: counter(section-1);padding-right:11pt;}
Section2 > Heading:before { content: counter(section-1)"."counter(section-2);padding-right:11pt;}
Section3 > Heading:before { content: counter(section-1)"."counter(section-2)"."counter(section-3);padding-right:11pt;}
Section4 > Heading:before { content: counter(section-1)"."counter(section-2)"."counter(section-3)"."counter(section-4);padding-right:11pt;}
Section5 > Heading:before { content: counter(section-1)"."counter(section-2)"."counter(section-3)"."counter(section-4)"."counter(section-5);padding-right:11pt;}
Unnumbered Headings:
Section1#Sec1a > Heading:before {content: normal}
Section2#Sec1b > Heading:before {content: normal}
Section3#Sec1c > Heading:before {content: normal}
Thanks,
Bala
Do you want to disable counter-increment for the unnumbered headings?
You can add rules to say "counter-increment: none" for these elements.
I have tried, but it's not working.
Thanks Mike,
It's working fine using below method in CSS.
Section1[ID="Sec1a"] > Heading:before {content: normal;}
Section2[ID="Sec1b"] > Heading:before {content: normal;}
Section3[ID="Sec1c"] > Heading:before {content: normal;}