Document pdfDocument = new Document(pdfPath);
Resolution resolution = new Resolution(160);
PngDevice pngDevice = new PngDevice(resolution);
for (int i = 0; i < pdfDocument.getPages().size(); i++) {
java.io.OutputStream outputBinImageFile = new java.io.FileOutputStream(tmpPng);
pngDevice.process(pdfDocument.getPages().get_Item(i + 1), outputBinImageFile);
outputBinImageFile.close();
}
pdfDocument.close();
VISIO转png的代码:
Diagram dgrm = new Diagram(oriFilePath);
for (int i = 0; i < dgrm.getPages().getCount(); i++) {
ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.PNG);
options.setPageIndex(i);
dgrm.save(pagename, options);
}
The issues you have found earlier (filed as DIAGRAMJAVA-51143) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou
The issues you have found earlier (filed as DIAGRAMJAVA-51139,DIAGRAMJAVA-51141) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou
The issues you have found earlier (filed as DIAGRAMJAVA-51172) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.