The HOPAGetPrint4Object function prepares printout image in separate window. The image is presented in 100% scale, but is prepared in full printer resolution.

Parameters of the HOPAGetPrint4Object function allows you control:

                                 ...
                                 
                                 <script Language="JScript">
                                 
                                 function printMyImage()
                                 
                                 {
                                 
                                 window.open (“HOPAGetPrint4Object.asp?
                                            PrintTemplate=PRINT3-A4& Orientation=L&
                                            Define_CompanyName=Web2Web%20Inc& ObjClass1=Rooms&
                                            ID1=Room002& Scale1=100& MaskMode1=2&
                                            SpotMarginPercent1=120& ObjClass2=Rooms& ID2=Room002&
                                            UseView2=0& Scale2=1000& ObjClass3=Floors& ID3=Floor001&
                                            ScaleMode3=1& SpotMarginPercent3=120”);
                                 
                                 }
                                 
                                 </script>
                                 
                                 ...
                                 
                                 <button onclick="printMyImage()">Print</button>
                                 
                                 ...
                      

This advanced example shows how to print using multiple viewports. Printing will be performed using “PRINT3-A4” template that contains three viewports. This template contains macro with dynamic text “!CompanyName” that will be expanded to text “Web2Web Inc”. (Other macros are internally resolved to room name, floor name and building name). Parameters specific for individual viewports are indexed with “1”, “2” and “3”, respectively.

In first viewport, described with text “Consultants room”, object “Room002” from class “Rooms” is displayed in scale 1:100 with view defined for spot linked to that room and with spot margin percent 20% using masking derived from spot shape (“MaskMode1=2”).

In second viewport, the same document is displayed but with full view (“UseView2=0”) and with scale 1:1000, giving overall view on the whole floor with room under interest displayed in yellow color.

In third viewport, document for spot linked to the object “Floor001” is displayed with spot margin percent 20% and scale calculated to fit spot view in viewport (“ScaleMode3=1”).

Show live print page

loading table of contents...