spadged / alivepdf

Automatically exported from code.google.com/p/alivepdf
0 stars 0 forks source link

Line spacing; Text Area Output to PDF (extra white space) #211

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Multi-line user input to Flex Text Area
2. Write text area input value to pdf
3. Pdf contains accurate text but odd spacing (double at least)

What is the expected output? What do you see instead?
Expected output:
Lorem ipsum dolor sit amet consectetur 
adipisicing elit sed do eiusmod tempor
incididunt ut labore

Actual output:
Lorem ipsum dolor sit amet consectetur

adipisicing elit sed do eiusmod tempor

incididunt ut labore

What version of the product are you using? On what operating system?
Alive PDF 0.1.5 RC on FlexBuilder 3 with Flex SDK 3.2
Windows XP OS

Please provide any additional information below.
Flex Text area code:
<mx:TextArea x="7.65" y="10" width="410" height="74" id="myNotes"
wordWrap="true" fontSize="10"/>

AlivePDF code:
var str_notes:String = ("Notes: " + myNotes.text);
myPDF.writeText(12,str_notes);

Summary Question:
When I write the PDF, I see that the user notes added to the text area do
not show up as single-spaced lines. I have read that in parsing text, you
can add \n to force line breaks but I can't have users do that when they
add notes to the text area. This app requires user input for notes and then
saves the pdf locally to their pc. Is there a line-spacing control somehow
available? myPDF.linespacing(1)?

Related issue?
Issue 154:       Flex ouput not understood by pdf generator
"The issues that we are encountering are related to the output that the
flex editor is generating specifically for line spacing between lines of
text..."        

Original issue reported on code.google.com by adam.san...@gmail.com on 20 Mar 2010 at 5:33

GoogleCodeExporter commented 9 years ago
Maybe you set the line height too high? Try lowering it from 12 to 6?

Original comment by dro...@gmail.com on 12 May 2010 at 1:51

GoogleCodeExporter commented 9 years ago
Hi, I used this function and got a similar issue, I tweaked the line height 
until it worked for one font but then I found that line height wasn't the same 
for all fonts and as I'm using different embedded fonts dynamically I need to 
try and work out how write a formula for the line spacing variable. Any ideas?

Original comment by joe.prit...@gmail.com on 27 Aug 2011 at 3:25