![]() |
【转帖】odamfcapp print and preview
odamfcapp print and preview
odamfcapp print and preview hi to print and preview its necessary that the view (zoom) is the same for print as view. this is not functioning in the 1.13 version. also i need to get the printername substituted with a function to retreive the default printer (in a valid way), and the it uses the printer setup with print setup. in my case it allways tells me: "this printer configuraion cannot be used. the default print device has been substituted."; any help will be received with a smile. laurs hi, try v1.13, i have fixed something in printing\preview. 99% of changes is in the odamfc sample in the onprint method. autocad drawing store printer info. for example i create file and my printer is hp4000, i send file to you ( your printer is hp9000). autocad will change page settings of hp4000 to settings of hp9000, but ddt cannot apply it correctly. the best for you is open my file in autocad and resave it with hp9000 settings. "this printer configuration cannot be used. the default print device has been substituted."; look at code in the mfcapp, it was called than your printer is not equal to drawing printer. the preview\printing in 1.12 does not support scaling, offsetting, border margins and plotstyle settings. i have fixed most of this in 1.13. please, use 1.13 for your task. last edited by sslezkin; 20th april 2005 at 04:40 amfff">. if you use 1.13, give me more information about problem. odamfcapp i use 1.13. when i debug into the application to onprint and onprintprepare, odamfc does not recognize the printer as somebody allready told me. therefore odamfc jumps out with no recalculation of the view / zoom. i print to a a4 or a3 standard canon copyer or a hp-laserjet with no difference. what i get out of the printer or print preview is what near to the real paper coordinates (i think). a lot og dwg and dxf files are generated in "suspicious" programs and will hold no printer. i could be nice if the odamfcapp could use the default printer in winxp to draw on. explanation: i use the odamfcapp as a fast way for our customers to view and print a dwg/dxf drawings, before import to our cad program. the advantage to other "free" viewers are: its small, easy to use and it can print (if we are lucky today). best regards please, attach sample file, i will check it on my pc. i dont understand, have you picture out of printer\preview paper or onprint draw nothing, or mfcapp skip all onprint code? i create new drawing in autocad with one circle, set printer of model space to none, load drawing to mfcapp, call preview, message " ... ", ok, circle appears in preview, call print - circle on the paper. is it work on your pc ? thanks. odamfcapp nothing in preview if i create a default drawing (circle + rectangle) in intellicad 2000 i do not need to set any "space". i can see the drawing in the odamfcapp but in preview and print the paper is white, nothing is seen. for other dwg/dxf files from customers we will sometime see all the drawing, and sometime nothing. i attach two files to you, one "ivf samples 2.dwg" is very small but i only see part of the drawing in preview, the other testcircle.dwg nothing is seen. thanks attached files (293.4 kb, 17 views) (21.4 kb, 10 views) thanks... files has uninitialized active layout settings. mfcapp is a sample with limited functionality. i think that user should initialize active layout if printer was changed in onprepareprinting. as a temporary problem solve you can add next strings in onprint : double dleftmargin = playout->getleftmargin(); // in mm double drightmargin = playout->getrightmargin(); // in mm double dtopmargin = playout->gettopmargin(); // in mm double dbottommargin = playout->getbottommargin();// in mm oddbplotsettings::plottype plottype = playout->plottype(); // added bscaledtofit = bcentered = true; // added plottype = oddbplotsettings::kextents; // added // set lineweight scale factor for model space if (bprintlw && m_pprinterdevice->iskindof(odgsmodellayouthelper::desc())) also replace all playout->plottype() to plottype in onprint. these changes enable centered and scaled flags and set plottype to extents. is it clear? it is not bug, it is limitation of mfcapp sample. you should update active layout settings when you change printer or paper size or something else. it is platform depended functionality and application should fix it. read documentation about oddbplotsettings for more information. possibly we will add it later, but it is not high priority task odamfcapp print and preview thanks i will try this over the week-end. i understand what you write and i know thats its a limitation and that odamfcapp is created for test purpose and not as a default dwg viewer, but.. best regards laurs also there is no link between drawing zooming\rotation in mfcapp and printing\preview due to drawing zooming\rotation doesn't change stored in database acvite viewport parameters. odamfcapp print and preview following your instructions i managed to make print and preview do a proper picture, so thanks for the help. i will save the information to the next update so that i do not ask again. if it is possible continue your work on odamfcapp, as it nice to have a data viewer (and...) with best regards laurs |
所有的时间均为北京时间。 现在的时间是 01:17 PM. |