Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Thu Jun 01, 2023 12:10 pm

I have a strange problem, in the live demo of the site it works, but when I implement it in the code it doesn't.

The problem is the following, when I place a text box in a rotation of 270 degrees, the error appears (error01.png), if I change it to 269 or 271 degrees it works perfectly

Attached original file as well

Code: Select all
   public byte[] convert(byte[] file, String filename) throws IOException {
      
      Locale.setDefault(locale.getLocale());
      
       license.loadLicense();
      
      
      logger.info("Converting " + filename);

      logger.debug("create Workbook " + filename);

      Workbook workbook = new Workbook();

      ByteArrayOutputStream documentConverted;
      
      try {
         logger.debug("Loading from Stream " + filename);
         
         workbook.loadFromStream(new ByteArrayInputStream(file));
         
         workbook.getConverterSetting().setSheetFitToPage(false);
         
         logger.debug("save the Workbook to a PDF file. " + filename);

         documentConverted = new ByteArrayOutputStream();
         workbook.saveToStream(documentConverted, FileFormat.PDF);
      }finally {
            workbook.dispose();
        }

        logger.info("Converted " + filename);
       
        return documentConverted.toByteArray();     
   }
Attachments
TAB-QUA-134.zip
(1.35 MiB) Downloaded 397 times
error02.png
error02.png (203.05 KiB) Viewed 2687 times
error01.png
error01.png (69.21 KiB) Viewed 2687 times

meneghette
 
Posts: 42
Joined: Tue Mar 08, 2022 12:10 pm

Fri Jun 02, 2023 8:12 am

Hello,

Thanks for your inquiry!
I tested your file with our latest Spire.Office for JAVA Version:8.5.6, but I did not reproduce your issue. If you were using an old version, please upgrade to the latest version and try again. If your issue still exists, please provide us with the following information for further investigation. Thank you in advance.
1) Your test environment, such as operating system information (e.g. Windows 10, 64-bit) and locale Settings. (e.g. China, Chinese)
2) The jdk version you are using. (e.g. jdk 1.8.0_271)

Sincerely,
Swain
E-iceblue support team
User avatar

Swain.Wang
 
Posts: 34
Joined: Thu Jun 01, 2023 3:55 am

Fri Jun 02, 2023 11:25 am

Yes I'm using the last version 8.5.6

My Operation System Windows 11 Pro 22H2, compilation 22621.1702 Windows Feature Experience Pack 1000.22641.1000.0, my local setting is POrtuguese Brasil

The Jdk used was org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.1.v20211116-1657

DId you tested using my code and it Worked?

meneghette
 
Posts: 42
Joined: Tue Mar 08, 2022 12:10 pm

Mon Jun 05, 2023 7:28 am

Hello,

Sorry for the late reply due to the weekend.
After changing my local setting to Portuguese (Brazil), I did reproduce the issue you mentioned. And I have logged this issue into our tracking system with the ticket SPIREXLS-4737. Our development team will investigate and fix it. Once it is resolved, I will inform you in time. Sorry for the inconvenience caused.

Best Regards,
Swain
E-iceblue support team
User avatar

Swain.Wang
 
Posts: 34
Joined: Thu Jun 01, 2023 3:55 am

Thu Aug 31, 2023 8:42 am

Hello,

Thanks for your patience.
Glad to inform you that we just released Spire.Office for Java Version:8.8.3, which has fixed your issue SPIREXLS-4737, welcome to download it form the following website and to test.
Website:https://www.e-iceblue.com/Download/office-for-java.html

Best Regards,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Return to Spire.XLS