Using a more recent PDF version for PDF production

chrispitude
Posts: 256
Joined: Thu May 02, 2019 2:32 pm

Using a more recent PDF version for PDF production

Post by chrispitude » Thu Feb 06, 2020 5:38 pm

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?

Costin
Posts: 711
Joined: Mon Dec 05, 2011 6:04 pm

Re: Using a more recent PDF version for PDF production

Post by Costin » Mon Feb 10, 2020 4:07 pm

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
Costin Sandoi
oXygen XML Editor and Author Support

chrispitude
Posts: 256
Joined: Thu May 02, 2019 2:32 pm

Re: Using a more recent PDF version for PDF production

Post by chrispitude » Wed Feb 12, 2020 5:35 pm

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!

chrispitude
Posts: 256
Joined: Thu May 02, 2019 2:32 pm

Re: Using a more recent PDF version for PDF production

Post by chrispitude » Tue Oct 06, 2020 4:37 pm

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?

chrispitude
Posts: 256
Joined: Thu May 02, 2019 2:32 pm

Re: Using a more recent PDF version for PDF production

Post by chrispitude » Tue Oct 06, 2020 4:46 pm

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

Dan
Posts: 466
Joined: Mon Feb 03, 2003 10:56 am

Re: Using a more recent PDF version for PDF production

Post by Dan » Wed Oct 07, 2020 8:57 am

We will look into this, thank you for letting us know.
Dan

chrispitude
Posts: 256
Joined: Thu May 02, 2019 2:32 pm

Re: Using a more recent PDF version for PDF production

Post by chrispitude » Thu Oct 22, 2020 3:53 pm

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.)

julien_lacour
Posts: 125
Joined: Wed Oct 16, 2019 3:47 pm

Re: Using a more recent PDF version for PDF production

Post by julien_lacour » Fri Oct 23, 2020 10:56 am

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

chrispitude
Posts: 256
Joined: Thu May 02, 2019 2:32 pm

Re: Using a more recent PDF version for PDF production

Post by chrispitude » Fri Oct 23, 2020 3:59 pm

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?

chrispitude
Posts: 256
Joined: Thu May 02, 2019 2:32 pm

Re: Using a more recent PDF version for PDF production

Post by chrispitude » Fri Oct 23, 2020 4:23 pm

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.

julien_lacour
Posts: 125
Joined: Wed Oct 16, 2019 3:47 pm

Re: Using a more recent PDF version for PDF production

Post by julien_lacour » Fri Oct 23, 2020 4:31 pm

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

chrispitude
Posts: 256
Joined: Thu May 02, 2019 2:32 pm

Re: Using a more recent PDF version for PDF production

Post by chrispitude » Fri Oct 23, 2020 5:10 pm

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!

julien_lacour
Posts: 125
Joined: Wed Oct 16, 2019 3:47 pm

Re: Using a more recent PDF version for PDF production

Post by julien_lacour » Fri Oct 23, 2020 5:17 pm

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

Post Reply