Hi,
I recently obtained a temporary 30 day license to try out the Total suite. I’m using the GroupDocs.Conversion API for Java to convert a docx document that has 3 tables and text embedded inside each table to a PDF document. I have noticed that the resulting PDF document only displays the first 5 to 6 rows of text from the original docx document and truncates the remaining text below. I have tried to convert the docx to an image and it returns the same results. The docx document is only 1 page in length.
I have tried to use the free online document converter found here: Online File Conversion | Free GroupDocs Apps and it returns all of the text found in the docx document.
I’m using groupdocs-conversion Java jar version 20.2.1.
Does anyone know the reason why i’m missing information in the converted PDF? Is it because I’m using a temporary license, so it only does the first x rows of text in tables? Would using a full license not have this issue?
Thanks!
1 Like
@vtam403,
Please share following details and we’ll investigate this issue:
- Problematic file
- Sample code you wrote for conversation process
Hi @atirtahir3,
I have attached the problematic file and sample code below.
-
File: Order1.docx.zip (31.8 KB)
-
Code:
ConversionConfig conversionConfig = new ConversionConfig();
conversionConfig.setStoragePath(wordFile.getAbsoluteFile().getPath());
conversionConfig.setOutputPath(pdfFile.getAbsoluteFile().getPath());
ConversionHandler conversionHandler = new ConversionHandler(conversionConfig);
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
String guid = wordFile.getAbsolutePath();
ConvertedDocument convertedDocument = conversionHandler.convert(guid, pdfSaveOptions);
convertedDocument.save(pdfFile.getAbsolutePath());
Thanks!
1 Like
@vtam403,
Please use following code to convert DOCX to PDF and let us know if you get right output:
Converter converter = new Converter(new FileInputStream("D:\\Order1.docx"));
PdfConvertOptions options = new PdfConvertOptions();
converter.convert("D:\\converted.pdf", options);
This is the output.pdf (53.2 KB) PDF document and it’s same as the source document.
Hi @atirtahir3,
I used the code as suggested, but I’m still encountering the same issue. I have attached the output I got.
Which version of GroupDocs.Conversion are you using? I’m using com.groupdocs:groupdocs-conversion:20.2.1 from the https://repository.groupdocs.com/repo respository. Also, I’m running it from a Mac.
Order1.pdf (37.4 KB)
1 Like
@vtam403,
Please share your complete development environment details with us (e.g. OS version, IDE and its version, JRE/JDK installed).
@vtam403,
Thanks for the details. We’re now investigating this issue. Your investigation ticket ID is CONVERSIONJAVA-947. As there’s any further update, you’ll be notified.