Page 2 of 2

Re: Converted files are BLANK

Posted: Tue Jul 15, 2014 1:27 pm
by mrjacoby1
Just as an aside....

I cannot make this work in XnViewMP. Not even manually. 64-bit version of XnViewMP on Win 7 64-bit OS.

Re: Converted files are BLANK

Posted: Tue Jul 15, 2014 4:09 pm
by cday
mrjacoby1 wrote:Wow. It worked. Manually, anyway. DPI was at 72. I changed to 200 (Image > Set DPI) manually. Did it to both X and Y. Saving the CAL file as a PDF (FAX compression, 100% quality) generated a readable, reasonably-sized PDF file. Way to go!
That seems to prove the point that the original problem was that the PDF file ‘page size’ was too large to be displayed by Adobe Acrobat/Reader, and that saving the image with a higher DPI value reduces the page size without altering the image itself.
But .... I couldn't get those settings to "stick" with the "Tools>Options...." settings change. I changed that value to 200. Closed the software, relaunched, then opened the same CAL file. Checking its DPI, I found it was still at 72. I rechecked in "Tools>Options..." and it was at 200.
Well, I’m assuming CAL images are rasterised using Ghostscript when they’re opened in XnView because they are raster images and I can’t think how else they could be rasterised... I don’t have an answer immediately but may have found some example CAL images online to test later.

If the Tools > Options new DPI setting hadn't stuck I would have suggested that you try again with Admin rights as a quick test, but you say that it did stick?
I cannot make this work in XnViewMP. Not even manually. 64-bit version of XnViewMP on Win 7 64-bit OS.
If you wish to use XnViewMP x64 you need [subject to the above qualification] to install Ghostscript x64, if you haven’t already done so, and some menu items may be different, as I partly indicated before.

Re: Converted files are BLANK

Posted: Tue Jul 15, 2014 5:05 pm
by cday
Here is a link to general information on CAL files:

http://www.fileformat.info/format/cals/egff.htm

And here's a link to some downloadable sample CAL files:

http://www.fileformat.info/format/cals/sample/index.htm

I don't know how to download those files, but I'm sure someone who posts here will... :D

I haven't read the above in detail, but I'm wondering now if CAL files don't need to be rasterised when they are opened, which would explain why changing the Ghostscript DPI setting didn't seem to have an affect, although the very large page sizes remain unexplained.

In that case, the only option would likely be to [batch] increase the image DPI settings in XnView or XnViewMP, to reduce the image page sizes so that they become viewable.

Edit:

I think there may well be a bug or bugs in relation to DPI in XnViewMP using Image > Resize and Image > Canvas resize...

See my XnViewMP -- Bug Reports posts today.

Re: Converted files are BLANK

Posted: Tue Jul 15, 2014 5:30 pm
by XnTriq
Great job solving that 8 y/o puzzle, cday :D
mrjacoby1 wrote:But .... I couldn't get those settings to "stick" with the "Tools>Options...." settings change. I changed that value to 200. Closed the software, relaunched, then opened the same CAL file. Checking its DPI, I found it was still at 72. I rechecked in "Tools>Options..." and it was at 200.
Please give cday's suggestion a try and run XnView as administrator.
Here's an alternative approach in case that doesn't do the trick:
  1. Go to Info » About... to find the INI file location.
  2. Quit XnView.
  3. Open xnview.ini in a text editor. (Windows Notepad will do.)
  4. Go to the [Load] section and change the value of PostscriptDpi from 72 to 200.
  5. Save the changes.
  6. Restart XnView.

Re: Converted files are BLANK

Posted: Tue Jul 15, 2014 8:00 pm
by XnTriq
cday wrote:And here's a link to some downloadable sample CAL files:

http://www.fileformat.info/format/cals/sample/index.htm
Coincidentally, I did my own little experiments with CALSS1.RAS (8800×6800 px) & CALSS2.RAS (9400×6600 px) yesterday.
I don't have GhostScript installed on my system and converted these blueprints with XnView's internal PDF capabilities via Tools » Batch Processing... (Compression type: FAX).

Re: Converted files are BLANK

Posted: Tue Jul 15, 2014 9:13 pm
by cday
XnTriq wrote:Coincidentally, I did my own little experiments with CALSS1.RAS (8800×6800 px) & CALSS2.RAS (9400×6600 px) yesterday.
I don't have GhostScript installed on my system and converted these blueprints with XnView's internal PDF capabilities via Tools » Batch Processing... (Compression Type: FAX).
XnView can open a .RAS file?? -- the RAS file is only 2KB, so I'm obviously missing something...

The page sizes in your PDF files are small enough to open in Adobe Reader, so no issue there.

Re: Converted files are BLANK

Posted: Tue Jul 15, 2014 9:30 pm
by XnTriq
cday wrote:XnView can open a .RAS file?? -- the RAS file is only 2KB, so I'm obviously missing something...
There are two formats supported by XnView which (can) have a .RAS filename extension: “CALS Raster” (cal,cals,gp4,mil) and “Sun Rasterfile” (ras,rast,sun,sr,scr,rs).
  • CALSS1.RAS = 217856 bytes
  • CALSS2.RAS = 243200 bytes
EDIT: You might have to deactivate Recognize only by extension (Tools » Options... » File List » Misc.).

Re: Converted files are BLANK

Posted: Tue Jul 15, 2014 9:49 pm
by cday
Thanks, it was the .DCL file that was 2KB (don't know what that is...), the .RAS opens normally in XnView.

So we have test CAS files, but PDF files created from them at the orignal DPI open in Adobe Reader without the issue that was the subject of this thread?

[Edited]

Re: Converted files are BLANK

Posted: Tue Jul 15, 2014 10:00 pm
by XnTriq
cday wrote:I don't know how to download those files, but I'm sure someone who posts here will... :D
These samples are also available on the companion CD-ROM of O'Reilly's Encyclopedia of Graphics File Formats and can be downloaded from their servers:
cday wrote:Thanks, it was the .DCL file that was 2KB (don't know what that is...), the .RAS opens normally in XnView.
Confirmed. I have no clue about those DCLs either.
cday wrote:So we have test CAS files, but PDF files created from them at the orignal DPI open in Adobe Reader without the issue that was the subject of this thread?
The PDFs uploaded by me can be opened in the following programs without errors:
  • Adobe Acrobat Reader v6.0.6
  • PDF-XChange Viewer v2.5
  • CorelDRAW v11.633
  • Deneba Canvas v9.0.4
Is that what you're asking, cday?

Re: Converted files are BLANK

Posted: Wed Jul 16, 2014 7:17 am
by cday
XnTriq wrote:
cday wrote:So we have test CAS files, but PDF files created from them at the orignal DPI open in Adobe Reader without the issue that was the subject of this thread?
The PDFs uploaded by me can be opened in the following programs without errors:
  • Adobe Acrobat Reader v6.0.6
  • PDF-XChange Viewer v2.5
  • CorelDRAW v11.633
  • Deneba Canvas v9.0.4
Is that what you're asking, cday?
The original issue was that some CAL files opened in XnView and saved as PDF files could not be opened in Adobe Acrobat/Reader, so we don't have an example CAL file for that issue...

Re: Converted files are BLANK

Posted: Wed Jul 16, 2014 4:00 pm
by XnTriq
cday wrote:The original issue was that some CAL files opened in XnView and saved as PDF files could not be opened in Adobe Acrobat/Reader, so we don't have an example CAL file for that issue...
OK, but I don't have any samples for in- and output of those “wider” blueprints :-|

Let's see what Almighty Google can do for us!

Re: Converted files are BLANK

Posted: Wed Jul 16, 2014 4:13 pm
by cday
I think the problem is effectively solved, at least until someone posts a new problem with the CAL format, by the above insights:

A PDF file created from an image that has a page dimension greater than a certain (very large) value may not display correctly in some PDF viewer software;

The problem can be overcome by increasing the DPI value of the opened image to reduce the page dimensions before saving the image as a PDF file.

Edit:

The problem arises from the creation of the PDF file and is not specific to the CAL format, although that format is often used for images such as engineering drawings that have unusually large page sizes.

Re: Converted files are BLANK

Posted: Wed Jul 16, 2014 4:45 pm
by XnTriq
Acrobat User Community ([url=http://answers.acrobatusers.com/When-200-inch-page-limit-broken-q36927.aspx]When was the 200 inch page limit broken ?[/url]) wrote:200 x 200 inches is Distiller’s limit for PostScript. It’s based on the Windows printer driver limitation.

The maximum page size is 15 million inches (381 km), this is from the PDF Reference 1.6:

177. In PDF versions earlier than PDF 1.6, the size of the default user space unit is fixed at 172 inch. In Acrobat viewers earlier than version 4.0, the minimum allowed page size is 72 by 72 units in default user space (1 by 1 inch); the maximum is 3240 by 3240 units (45 by 45 inches). In Acrobat versions 5.0 and later, the minimum allowed page size is 3 by 3 units (approximately 0.04 by 0.04 inch); the maximum is 14,400 by 14,400 units (200 by 200 inches).

Beginning with PDF 1.6, the size of the default user space unit may be set with the UserUnit entry of the page dictionary. Acrobat 7.0 supports a maximum UserUnit value of 75,000, which gives a maximum page dimension of 15,000,000 inches (14,400 * 75,000 * 172). The minimum UserUnit value is 1.0 (the default).

Re: Converted files are BLANK

Posted: Wed Jul 16, 2014 5:17 pm
by cday
I've refined the summary in my previous post: good find XnTriq!

Re: Converted files are BLANK

Posted: Wed Jul 16, 2014 7:00 pm
by XnTriq
cday wrote:I've refined the summary in my previous post: good find XnTriq!
Thanks :-)

At the risk of flagellating a deceased equine, I converted SCAN0242.CAL (25765×16840 px) to PDF with XnView. When I open the result in Acrobat Reader, I'm presented with an empty page. Document properties:
  • Acrobat Reader: 200×200 in / 507.941×507.941 cm
  • PDF-XChange Viewer: 357.85×233.89 in / 908.93×594.08 cm
Case closed, as far as I'm concerned.