The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Exporting to pdf
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

LukasBurgi

Switzerland
Posts

Posted - 04/22/2005 :  01:56:31 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System: XP

I try to export pages to pdf files using the following lines

LayoutPage oLayoutPage = Project.Pages("...");
string strFileName = "D:\Test.pdf";
export_page_to_image(oLayoutPage, strFileName,"pdf", FALSE);

This works fine for simple pages, however, for more complex pages like a layout page containing several graphs with several layers each, some layers get lost during the export process. Oddly enough, when the Origin window is minimized during program execution (calling the routine from the Code Builder) the export works ok even in the case of complex pages. The problem only occurs when the Origin window is on the screen during execution.

Any advice is highly apprecitated.
Lukas

Mike Buess

USA
3037 Posts

Posted - 04/25/2005 :  12:58:21 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I don't know why that happens but this might work...

LayoutPage oLayoutPage = Project.Pages("...");
HWND hwnd = GetWindow(OGW_MAIN);
Window oWin(hwnd);
oWin.ShowWindow(SW_MINIMIZE); // minimize the program window
string strFileName = "D:\Test.pdf";
export_page_to_image(oLayoutPage, strFileName,"pdf", FALSE);
oWin.ShowWindow(SW_NORMAL); // restore program window

Mike Buess
Origin WebRing Member
Go to Top of Page

LukasBurgi

Switzerland
Posts

Posted - 04/26/2005 :  01:58:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Mike. This works fine and omits the problem.
Lukas
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000