Page 1 of 1

Using a more recent PDF version for PDF production

Posted: Thu Feb 06, 2020 5:38 pm
by chrispitude
Currently, PDF Chemistry creates PDF version 1.4 files (May 2001).

PDF version 1.5 (April 2003) provides additional content compression features. PDF version 1.6 (January 2005) allows OpenType fonts to be directly embedded instead of converted to TrueType/Type 1.

Is there a way to configure PDF Chemistry to use a newer PDF version for PDF creation?

Re: Using a more recent PDF version for PDF production

Posted: Mon Feb 10, 2020 4:07 pm
by Costin
Hi Chris,

Our politics is to use the minimal PDF version, in order to avoid any compatibility issues.
Changing the version is not possible by default - that's not something that could be easily achieved through a dedicated parameter or something/

However, we will investigate internally to see if we implementing a newer PDF version would be viable and, if we will decide to implement something in this direction, we will let you know.

Kind Regards,
Costin

Re: Using a more recent PDF version for PDF production

Posted: Wed Feb 12, 2020 5:35 pm
by chrispitude
Thanks Costin! If it was a parameter that could be exposed to the user, it would have been nice. But if it's not a simple thing to provide, then I agree that a lower default version is best to ensure support with all devices (including e-readers and such with limited processing power).

I am looking into using Ghostscript to reencode the PDF files to v1.6 without loss. If I find the solution, I will post it here.

Thanks!

Re: Using a more recent PDF version for PDF production

Posted: Tue Oct 06, 2020 4:37 pm
by chrispitude
It's been a year and a half since I started this thread. Is there possibly a way to provide a transformation parameter to pass to Apache FOP to write PDF v1.5 files to gain the benefits of smaller PDF file size?

Re: Using a more recent PDF version for PDF production

Posted: Tue Oct 06, 2020 4:46 pm
by chrispitude
I forgot to mention, currently PDF Chemistry seems to create a PDF file with a v1.4 header, but that uses a v1.5 feature (xref streams). This causes some pickier readers to fail to open the file (older versions of evince on linux, and I think I found another one but I forget).

For details, see:

https://rt.cpan.org/Public/Bug/Display.html?id=133131

Re: Using a more recent PDF version for PDF production

Posted: Wed Oct 07, 2020 8:57 am
by Dan
We will look into this, thank you for letting us know.
Dan

Re: Using a more recent PDF version for PDF production

Posted: Thu Oct 22, 2020 3:53 pm
by chrispitude
Hi Dan,

My group is asking me to solve this "v1.4 header/v1.5 xref stream" issue. (Our company's software runs on linux only, and our customers use a wide variety of old and new linux readers.) Is there a place in the PDF Chemistry innards where I can configure the <version> field that is documented here?

https://xmlgraphics.apache.org/fop/2.1/ ... ation.html

(Personally, I think PDF v1.5 is a reasonable baseline default these days, plus it can reduce out-of-the-box PDF size significantly.)

Re: Using a more recent PDF version for PDF production

Posted: Fri Oct 23, 2020 10:56 am
by julien_lacour
Hello Chris,

Starting with version 23, the PDF version will be 1.5 instead of 1.4.
Also you will be able to change the PDF version directly from the transformation scenario in DITA transformations and in Oxygen PDF Chemistry (using a command line parameter).
As usual, you will find in our user guide all the details about these new parameters.

If you want a snapshot for test purpose, we may provide one. Just ask on support@oxygenxml.com.

Regards,
Julien

Re: Using a more recent PDF version for PDF production

Posted: Fri Oct 23, 2020 3:59 pm
by chrispitude
Thanks Julien! This problem is strange. Using the snapshot, many applications on linux still have problems:

Code: Select all

% pdfinfo cc_sae_user.pdf 
Error: PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table

% evince cc_sae_user.pdf 
** (evince:17314): WARNING **: Failed to create dbus proxy for org.gnome.SettingsDaemon: Could not get owner of name 'org.gnome.SettingsDaemon': no such name
Error: PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table
Error: PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table

% okular cc_sae_user.pdf 
Error: PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table
but another application could parse the version:

Code: Select all

chrispy@igcaes104:~ % file cc_sae_user.pdf 
cc_sae_user.pdf: PDF document, version 1.5
On Windows, Adobe Acrobat opens it, but only after repairing the file.

I wonder if this is something specific to our flow or formatting? Are you able to use any linux PDF viewers to read the v1.5 output files?

Re: Using a more recent PDF version for PDF production

Posted: Fri Oct 23, 2020 4:23 pm
by chrispitude
Our work linux boxes are running an older Centos version. I'll try the PDF on my home Ubuntu machine and see if I can find any contemporary readers that reproduce the failure.

Re: Using a more recent PDF version for PDF production

Posted: Fri Oct 23, 2020 4:31 pm
by julien_lacour
Hello Chris,

Thank you for the feedback, I also tried on my side and did not reproduced the problem.
I tried on an Ubuntu system up to date.
Could you also try the following:
  1. Do a clean install of Oxygen 22.1 and set the Publishing Engine as DITA-OT
  2. Do a transformation on one of our samples (I tried on flowers)
Regards,
Julien

Re: Using a more recent PDF version for PDF production

Posted: Fri Oct 23, 2020 5:10 pm
by chrispitude
Hi Julien,

I cannot find a single PDF viewer on my home Ubuntu 20.04 system that complains. And this is with the same file that has all the complaints above in Centos. And I found a newer linux box within our company (not common here) where the PDF opens without issues.

I don't know why the FrameMaker-produced PDF opens on these older machines but the PDF Chemistry PDF does not. For now, we will have to leave this unsolved; I can't ask you to spend resources on this.

And thank you for the PDF v1.5 support!

Re: Using a more recent PDF version for PDF production

Posted: Fri Oct 23, 2020 5:17 pm
by julien_lacour
Hello Chris,

I'm glad to ear that it works at least on newer Linux versions. Maybe this is not a direct Chemistry problem.
If anyway any other problem occur during your tests, feel free to send us your feedback as usual!

Regards,
Julien

Re: Using a more recent PDF version for PDF production

Posted: Fri Nov 20, 2020 3:40 pm
by julien_lacour
Hello Chris,

Starting with Oxygen 23.0 (already released), PDFs are now using version 1.5 as a default.
Also it is possible to change this version in Chemistry (using the -pdf-version parameter) as well as in DITA transformations (using the pdf.version parameter).

Regards,
Julien