We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

About CADJAVA-703 converting a Specific areas to pdf ,can give an example

About CADJAVA-703 how to converting a Specific areas to pdf


for now the most convenient way is to change viewport:

            com.aspose.cad.Point topLeft = new com.aspose.cad.Point(1281, 2735);
            double width = 1367;
            double height = 858;

            CadVportTableObject newView = new CadVportTableObject();

            // note: exactly such table name is required for active view
            newView.getCenterPoint().setX(topLeft.getX() + width / 2f);
            newView.getCenterPoint().setY(topLeft.getY() - height / 2f);
            newView.setViewAspectRatio(width / height);

            // search for active viewport and replace it
            for (int i = 0; i < cadImage.getViewPorts().size(); i++) {
                CadVportTableObject currentView = (CadVportTableObject) (cadImage.getViewPorts().get_Item(i));
                if ((currentView.getName() == null && cadImage.getViewPorts().size() == 1) ||
                        StringExtensions.equals(StringExtensions.toLowerInvariant(currentView.getName()), "*active")) {
                    cadImage.getViewPorts().set_Item(i, newView);

We have also planned to improve the usability using separate API methods to export part of the image in future.