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

Free Support Forum - aspose.com

Raster Image not printed when having rotation


The raster image is not printed to pdf when the raster image has rotation other than 0.
Please find attached dxf and output of the same
System.out.println(“start time:” + new Date());
// The path to the resource directory.
String filename = “ABOVE GA Image with Rotation”;
String dataDir = Utils.getDataDir(ExportDXFDrawingToPDF3.class) + “DXFDrawings/”;

		// ExStart:ExportDXFDrawingToPDF
		String srcFile = dataDir + filename + ".dxf";

		Image image = Image.load(srcFile);

		// Create an instance of CadRasterizationOptions and set its various properties
		CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();
		// rasterizationOptions.setExportAllLayoutContent(true);
		rasterizationOptions.setLayouts(new String[] { "Model" });

		CadImage cadImage = (CadImage) image;

		// Create an instance of PdfOptions
		PdfOptions pdfOptions = new PdfOptions();
		// Set the VectorRasterizationOptions property

		// Export the DXF to PDF
		image.save(dataDir + filename + ".pdf", pdfOptions);
		// ExEnd:ExportDXFDrawingToPDF
		System.out.println("end time:" + new Date());

In attached example the dxf with name “ABOVE GA Image without rotation.dxf” prints properly to “ABOVE GA Image without rotation Output.pdf” the image is visible

But the dxf “ABOVE GA Image with Rotation.dxf” output to “ABOVE GA Image with Rotation Output.pdf” doesnt print the image. Here the rasterimage has a rotation of 270

Pranav C LunavatImage rotation issue.zip (945.5 KB)


After observe the shared PDF files, I have created an issue with ID CADJAVA-879 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.