To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=105555





------- Additional comments from pawo...@openoffice.org Tue Jan 26 12:02:22 
+0000 2010 -------
>From the bug #108268 it seems that this issue is fixed with latest version. I
checked this with more details and unfortunately it is not. I gathered all
information, so once again...

Description:
I am using OpenOffice running in invisible mode as a service. I have a HTML file
with embedded .jpg image inside. I try to convert it to PDF with this running
OpenOffice using two equal methods:

Method 1. Reading HTML file as a regular file - see attachment
OpenOfficeDocumentFileConverter.java. 
Image in test HTML file has relative path set (attribute src in <img> tag).

Method 2. Reading HTML file using streams (input stream for reading, output
stream for writing) - see attachment OpenOfficeDocumentFileStreamConverter.java.
Image in test HTML file has absolute path set (attribute src in <img> tag).

Notes: 
As You see I assume that open office is running in the background (that's why I
pass XComponentLoader object into convert methods). Please pay no attention on
error handling and so on - code is simplified to be easy to understand.
Each convert method has property Hidden=true set by default (OpenOffice is
running in invisible mode and I don't want to see it during conversion). However


Problem, tests and results:
Problem is still the same: target PDF have images with improper size. The
oproblem is connected ONLY with images which have NO width and NO height
attributes set in their <img> tag in HTML source file.
I tested two conversion methods described above with many versions of
OpenOffice. Before each test OpenOffice process was killed and started again in
listetnig mode. Please note that for each test Hidden=true is set. Results:

OpenOffice 2.0.4
Method 1. reading HTML as normal file - works OK 
Method 2. reading HTML using streams file - works OK
 
OpenOffice 2.2.0
Method 1. reading HTML as normal file - NOT working 
Method 2. reading HTML using streams file - NOT working

OpenOffice 2.4.3
Method 1. reading HTML as normal file - NOT working 
Method 2. reading HTML using streams file - NOT working

OpenOffice 3.0.0
Method 1. reading HTML as normal file - NOT working 
Method 2. reading HTML using streams file - NOT working

OpenOffice 3.1.1
Method 1. reading HTML as normal file - NOT working 
Method 2. reading HTML using streams file - NOT working

OpenOffice 3.2.0 RC3
Method 1. reading HTML as normal file - NOT working 
Method 2. reading HTML using streams file - NOT working

So it works ONLY in Oo 2.0.4. What is intersting when I set property Hidden to
false value and during the test Oo was visible with loaded HTML, image is
displayed with correct size and has correct size in PDF. Please note that
Hidden=false sometimes is not enough to see loaded HTML document inside Oo (it
probably depends on machine speed) - I had to set breakpoint in convert method
sin order to see a loaded HTML document, instead of OpenOffice "blink" (fast
open and close). Without this breakpoint PDF image has also improper size. 
It seems that displaying opened HTML for a while somehow "refreshes" layout of a
document and forces OpenOffice to render images with their proper size. 

If You want to test it like me, I can attach whole complete Eclipse project with
mentioned HTML test documents.


---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@sw.openoffice.org
For additional commands, e-mail: issues-h...@sw.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to