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

Page size pblm when converting HTML to PDF

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
saibejugam
General User
General User


Joined: 21 Jan 2005
Posts: 7

PostPosted: Fri Jan 21, 2005 3:42 am    Post subject: Page size pblm when converting HTML to PDF Reply with quote

hi all,
firslty,sorry for posting this as a sticky previously... it was unknowingly done

my pblm:
i am able to convert an html page to pdf using filter "writer_web_pdf_export"
but the page size of the pdf is shrinked to the contents i mean if an html page has a paragraph with 3 lines n when i converted it into a pdf then the size of the page is literally 7.18 X 2.19in as shown in acrobat reader

following is my code snippet:

XModel xmodel = (XModel)UnoRuntime.queryInterface(com.sun.star.frame.XModel.class, xcomponent);
XFrame xframe = xmodel.getCurrentController().getFrame();
xframe.activate();
XStorable xstorable = (XStorable)UnoRuntime.queryInterface (com.sun.star.frame.XStorable.class, xcomponent);

PropertyValue[] filterProps = new PropertyValue[2];
filterProps[0] = new PropertyValue();
filterProps[0].Name = "CompressMode";
filterProps[0].Value = "1";
filterProps[1] = new PropertyValue();
filterProps[1].Name = "PageRange";
filterProps[1].Value = "1";
PropertyValue apropertyvalue[] = new PropertyValue[2];
apropertyvalue[0] = new PropertyValue();
apropertyvalue[0].Name = "FilterName";
apropertyvalue[0].Value ="writer_web_pdf_Export;
apropertyvalue[1] = new PropertyValue();
apropertyvalue[1].Name = "FilterData";
apropertyvalue[1].Value = filterProps;

xstorable.storeToURL(lStrFilePath, apropertyvalue);// here lStrFilePath is the pdf file path

please somebody help me out in this..
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Tue Jan 25, 2005 6:33 am    Post subject: Reply with quote

If you are not specifying an import filter, then HTML is being opened into Web.

Instead, you should specify an import filter to import HTML into Writer. Writer treats its content as distinct pages.

Your export will then have distinct pages. Also, Writer can export to many more formats than Web. So if you are trying to convert HTML into almost anything else, then Writer (not Web) is a better intermediate format.

Open HTML with Writer not Web in order to export
http://www.oooforum.org/forum/viewtopic.php?t=3973
http://www.oooforum.org/forum/viewtopic.php?p=44367#44367
How to convert HTML into OpenOffice File?
http://www.oooforum.org/forum/viewtopic.php?t=11580
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer 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