* With HPDF_TALIGN_JUSTIFY, last lines of paragraphs were justified
whereas the last line of the text was not. This is now fixed so that
last lines in paragraphs are left aligned.
* Trim text lines so that trailing white space and line break characters
are not written out, resulting in smaller PDF files.
* For HPDF_TALIGN_RIGHT and HPDF_TALIGN_CENTER, an extra, unnecessary
"Td" operator was written after each line acting as a "carriage return".
This is now spared and calculated into the the "Td" offsets of the
following line, resulting in smaller PDF output.
* In the same context, added a new static TextPos_AbsToRel() function to
calculate coordinates for HPDF_Page_MoveTextPos(). Also used this to
replace extended code in HPDF_Page_TextOut().
* For all alignment types, do not output two leading "Td" operators
where a combined single one can do the job just as well.
The patch is against the current GIT head. A simple demo application
attached as well.
Ralf
Franco
2010/1/29 Ralf Junker <ralfj...@gmx.de>:
> --
> ---
> libHaru.org development mailing list
> To unsubscribe, send email to libharu-u...@googlegroups.com
--
Wbr,
Antony Dovgal
---
http://pinba.org - realtime statistics for PHP
Is a problem, any idea?
Best regards
Franco
2010/2/1 Antony Dovgal <to...@daylessday.org>:
> This morning I downloaded the git version of the library and I applied
> the patch.
> Now I realized that the strings printed with HPDF_Page_TextRect () are
> not displayed by Adobe Acrobat Reader version 9.2.0, even if they are
> printed correctly and are visible in the preview system utility.
Does your problem show with the example application I attached next to
the patch to my original message? Or does it happen with your custom
code? For the latter, can you provide C code to reproduce the problem?
Could it be related to my posting "Patch: Fix missing parentheses from
empty string object" from 2010-01-04?
Ralf
> Could it be related to my posting "Patch: Fix missing parentheses from empty
> string object" from 2010-01-04?
Yes, I had the problem after apply your patch to git version this morning.
I honestly do not know if the problem is in the patch or version of the library.
Earlier works with version 2.10 without this problem.
Franco
2010/2/1 Ralf Junker <ralfj...@gmx.de>:
Ciao
Franco
2010/2/1 Franco Marchesini <franco.m...@gmail.com>:
>> Could it be related to my posting "Patch: Fix missing parentheses
>> from empty string object" from 2010-01-04?
>
> Yes, I had the problem after apply your patch to git version this
> morning. I honestly do not know if the problem is in the patch or
> version of the library. Earlier works with version 2.10 without this
> problem.
I can confirm that your _test.pdf file does not display with Adobe
Reader 8.1.3 either.
However, a closer look shows that it was generated without my patch from
2010-01-04 which fixes the missing parenthesis problem for empty strings.
Below is copy of my original message and the patch. It merely comments
out these two lines in hpdf_streams.c, HPDF_Stream_WriteEscapeText2():
if (!len)
return HPDF_OK;
I believe that it should be pushed to GIT for the reasons given as well
as the example you presented.
Ralf
------------------
Copy of message from 2010-01-04:
libharu does not output parenthesis for empty string objects. Without,
WinXP Adobe Reader 8.1.3 fails to open the Properties dialog if the
PDF producer is set to an empty string with
HPDF_SetInfoAttr (pdf, HPDF_INFO_PRODUCER, "");
See PDF Specification, "7.3.4.2 Literal Strings" for details. The empty
string WITH parenthesis is explicitly mentioned as an example.
--- hpdf_streams.c Thu Jan 15 10:14:12 1970
+++ hpdf_streams.c Thu Jan 15 10:14:12 1970
@@ -421,8 +421,13 @@
HPDF_PTRACE((" HPDF_Stream_WriteEscapeText2\n"));
+ /* The following block is commented out because it violates "PDF Spec
+ 7.3.4.2 Literal Strings". It states that the two matching
parentheses
+ must still be present to represent an empty string of zero
length. */
+ /*
if (!len)
return HPDF_OK;
+ */
buf[idx++] = '(';
Thanks
Franco
2010/2/2 Ralf Junker <ralfj...@gmx.de>:
Oops! Missed that patch in the list.
Committed, thanks a lot.