New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Temporary file name added in CSV -> PDF conversion #219
Comments
Hi there, Could you please first try to open the file WITHOUT jodconverter and try an "export as pdf" manually? Let me know if the result is the same or not. To resolve this, we need to know first if it is a jodconverter issue or a LibreOffice one. If it is an issue with LibreOffice, we need to know if LibreOffice support this, and which settings are required. |
Hi @sbraconnier Thanks for the quick response. I tried exporting original CSV file to PDF and it also displays file name on page header, so looks like LibreOffice issue. Regarding filename as header, possibly some tweaks in LibreOffice settings may require. |
Thanks!!! Could you please share your CSV so I could look into this using the same file as you (please remove all sensitive data first!)... Thanks! |
I have attached sample CSV file with following zip. Thanks! |
Strange, I didn't have the same problem as you, but the date column was different. Maybe you could take a look here and try to find the proper Filter Options for the CSV Filter that would work for you. The default one used by jodconverter is "44,34,0". The way I succeed to have a date column the same as you was by setting the column format to "TEXT", like this: converter
.convert(new File("C:\\temp\\sample_csv\\sample_csv.csv"))
.as(DocumentFormat.builder()
.from(DefaultDocumentFormatRegistry.CSV)
.loadProperty("FilterOptions", "44,34,0,1,1/2")
.build())
.to(new File("C:\\temp\\sample_csv\\out.pdf"))
.execute(); You may want to cache the created DocumentFormat instead of creating a new one for each conversion. |
Did you succeed ?? |
Closing this one since I didn't received any feedback. Feel free to re-open if required. |
I have same problem with convertation of csv file I tried to use your code:
|
Hi @sbraconnier, I am facing issue while converting any CSV file to PDF using jodconverter.
Original CSV File:
After PDF conversion: (Check temporary source file name added tempfile_166). Also date conversion on 1st column is not proper.
Here, temporary file name got added on each PDF page as shown in above image.
Using following versions:
Can you please take a look why such temporary file name added?
Thanks,
Nirav
The text was updated successfully, but these errors were encountered: