OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Margin problems with writer_pdf_Export

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> Setup and Troubleshooting
View previous topic :: View next topic  
Author Message
craiger316
General User
General User


Joined: 17 Jan 2005
Posts: 9

PostPosted: Wed Aug 03, 2005 6:56 am    Post subject: Margin problems with writer_pdf_Export Reply with quote

Hi there, we use the following code to dump MS word docs to PDF format:

Code:
private void exportAsPDF(XComponent xDoc, String storeUrl) throws java.lang.Exception {

   XStorable xStorable = (XStroable)UnoRuntime.queryInterface(XStorable.class, xDoc);
   
   PropertyValue[] storeProps = new PropertyValue[1];
   storeProps[0] = new PropertyValue();
   storeProps[0].Name = "FilterName";
   storeProps[0].Value = "write_pdf_Export";

   xStorable.storeToUrl(storeUrl, storeProps);
}


The only problem is, if the word doc has margins which are really wide, exporting as a PDF programmatically seems to obey the default margins instead of the ones set in the dcoument. If I export the document to PDF right in OO, it works perfectly. This causes grief because now a document which should be one page, ends up on two.

Here is an image of the document in OO and then the resulting PDF generated from the above code (sorry I had to obfuscate it, it contains actual data from our system):

Original in OO: http://www.tataryn.net/~craiger/oo-orig.jpg
Converted to PDF from above code: http://www.tataryn.net/~craiger/post-conf-pdf.jpg

If you are using IE, make sure the image is zoomed to 100% so you can see the margin outlines in the first image.

Notice the addres/phone number info in the top of the document is all wrapped at the margins (causing the text in the entire document to be pushed down).

Anyone else have this problem? Or could suggest a solution?

Thanks,

Craig.
Back to top
View user's profile Send private message
craiger316
General User
General User


Joined: 17 Jan 2005
Posts: 9

PostPosted: Tue Aug 09, 2005 11:07 am    Post subject: Reply with quote

*bump* any suggestions?
Back to top
View user's profile Send private message
patil18
General User
General User


Joined: 31 Dec 2007
Posts: 5

PostPosted: Wed Jan 02, 2008 2:45 am    Post subject: Same Problem Here Reply with quote

Hi,

Even i am facing the same problem. If you have got any solution pls reply me as it is very very urgent.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> Setup and Troubleshooting All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group