Jump to content

JPG Output from FusionPro Server


Recommended Posts

Hi all,

 

A recently added feature to FusionPro Server is the ability to generate JPEG output from a composition. For those FP Server customers looking to utilize this capability (for example, to make a JPG preview for a custom Web to Print system), here's the documentation on how this can be accomplished.

 

At the end of the composition, a JPEG image of any page in the output PDF document can be created without having to invoke a separate conversion process. This feature is only available in batch FP Server compositions using the PDF output format.

 

Note
: In addition to this JPG output feature, FusionPro Server also ships with the PDF2IMG utility. PDF2IMG can be used to programatically create image file formats in BMP, EPS, GIF, JPG, PNG, or TIF. Unlike the native JPG output capability of FusionPro Server, PDF2IMG is called as a separate process after FusionPro Server has fully created a PDF output file. FusionPro Server customers can find the PDF2IMG utility in the PDF2IMG sub-folder in the FusionPro installation location (default is C:\Program Files\Printable\FusionPro\PDF2Image). Full documentation on PDF2IMG is also located in this location.

 

There is a series of new CFG (job) file settings to enable native JPEG output from FP Server:

 

  • JPEG_Output_Enabled=[true/false]. Enables JPEG output for the job (it must be using PDF output). Defaults to false. This must be set to true for any of the other settings to be interpreted. All other settings are optional.

 

  • JPEG_Output_StartPage=[one-based page number]. Specifies the starting page of the output PDF to be output as JPEG. Defaults to 1 (one). (A value of 0 [zero] will also use page 1, but otherwise page numbers are one-based.)

 

  • JPEG_Output_NumberOfPages=[number]. Specifies the total number of pages, starting at JPEG_Output_StartPage, to be output as JPEG. Defaults to 0 (zero), which specifies a single page with the specified file name (see JPEG_Output_BaseFileName). Any other non-zero value will cause output JPEG file names to include the page number. A positive number specifies the total number of pages, starting with JPEG_Output_StartPage, to be output as JPEG. A value of -1 (less than zero) will cause all pages in the output PDF, starting with JPEG_Output_StartPage, to be output as JPEG.

 

  • JPEG_Output_Quality=[number]. Specifies the JPEG quality (compression) level to use, as a percentage. Valid range is 1 to 100. Defaults to 100 (percent).

 

  • JPEG_Output_Resolution=[number]. Specifies the resolution of the JPEG, in DPI. Valid range is 36 to 1200. Defaults to 72.

 

  • JPEG_Output_Scaling=[number]. Specifies the scaling factor to use when converting the PDF page(s) to JPEG, as a percentage. Valid range is 10 to 1600. Defaults to 100 (percent). May be superseded by JPEG_Output_MaxWidth or JPEG_Output_MaxHeight.

 

  • JPEG_Output_MaxWidth=[number]. Specifies the maximum width of the output JPEG, in pixels. Defaults to 0 (zero) to use the original width of the PDF page.

 

  • JPEG_Output_MaxHeight =[number]. Specified the maximum height (depth) of the output JPEG, in pixels. Defaults to 0 (zero) to use the original height of the PDF page.

 

  • JPEG_Output_PDFBoundingBox=[string]. Specifies the PDF bounding box of the page(s) to be converted to JPEG. Valid values are "ArtBox", "BleedBox", "CropBox", "MediaBox", and "TrimBox". Defaults to "CropBox".

 

  • JPEG_Output_BaseFileName=[string]. Specifies the base file name of the JPEG file to output. A fully-qualified path is recommended. If empty or not specified, the path and file name of the PDF output file with the extension changed to ".jpg" will be used. See JPEG_Output_NumberOfPages about page numbers being inserted into the file names for multiple JPEG files.

 

Note on width and height specifications: If neither JPEG_Output_MaxWidth nor JPEG_Output_MaxHeight are specified, then the original PDF page size will be used, subject to the JPEG_Output_Resolution and JPEG_Output_Scaling factors. If both JPEG_Output_MaxWidth and JPEG_Output_MaxHeight are specified, the image will sized as "best fit" for the specified dimensions (sized to fit within both dimensions). If only one of the two is specified, then the output size is adjusted to match it. In all cases, the aspect ratio of the original PDF page is maintained.

 

 

The simplest usage of this feature is to turn it on with this CFG file entry:

 

JPEG_Output_Enabled=true

 

This will output the Crop Box of the first page of the output PDF as a JPEG graphic, at 72 DPI, 100 percent scaling, and full quality. The JPEG file will be in the same location and have the same name as the output PDF, except that the file name extension will be changed to ".jpg".

 

To output all pages of the PDF as JPEG, this line can be added:

 

JPEG_Output_NumberOfPages=-1

 

This will append the page number to each JPEG output file, before the extension. For instance, if the PDF output file name is "report.pdf", then the JPEG files will be named "report-1.jpg", "report-2.jpg", etc.

 

The JPEG output file names can be customized like so:

 

JPEG_Output_BaseFileName=\\sharename\foldername\preview.jpg

 

Note that a fully-qualified path is recommended. If JPEG_Output_NumberOfPages is not specified, this will be the exact path and file name of the JPEG file. If JPEG_Output_NumberOfPages is specified, then the page number will be appended to each JPEG file name, before the extension. In this example, the JPEG files will be named "\\sharename\foldername\preview-1.jpg", "\\sharename\foldername\preview.jpg-2", etc.

 

Other options work in a similar fashion as in the Img2Img.exe utility.

Edited by mhilger
Link to comment
Share on other sites

I see the commands here for the JPEG output. I can make this work but some of the pages send an error message to the msg file:

JPEG Output: Error converting page 1 to bitmap.

JPEG Output: Cannot convert page 1 to image.

 

I would like to try some of the other output formats to see if it makes a difference. I am currently using a 3rd party PDF2IMG program to post to the web. The DataLogics PDF2IMG that installs with FP seems to do a better overall job of the image conversion except some of the pages created in FP fail to convert to JPEG.

 

So my question is can you post the config commands for the other formats?

Link to comment
Share on other sites

I see the commands here for the JPEG output. I can make this work but some of the pages send an error message to the msg file:

JPEG Output: Error converting page 1 to bitmap.

JPEG Output: Cannot convert page 1 to image.

Sorry about that, but there's no way to analyze the problem here in the forum without the job. I recommend sending the job to Support for analysis. If you can specify exactly which version of FusionPro Server you're using, that would be helpful as well.

So my question is can you post the config commands for the other formats?

This feature only works with PDF output.

Link to comment
Share on other sites

I'm not really looking for you to find out why the JPG is not working for some of the pages. I really only wanted the config commands to try and output the files in something other than JPEG. The post says you can output in BMP, EPS, GIF, JPG, PNG, or TIF.

 

For example to out put JPEG the command is JPEG_Output_Enabled=true

 

How do I output PNG or GIF?

Link to comment
Share on other sites

I'm not really looking for you to find out why the JPG is not working for some of the pages. I really only wanted the config commands to try and output the files in something other than JPEG.

Sorry, the only image format you can output directly from FusionPro Server is JPEG.

The post says you can output in BMP, EPS, GIF, JPG, PNG, or TIF.

No, what the original post says is that the PDF2IMG utility can output those other formats. It doesn't say that FP Server can.

Note: In addition to this JPG output feature, FusionPro Server also ships with the PDF2IMG utility. PDF2IMG can be used to programatically create image file formats in BMP, EPS, GIF, JPG, PNG, or TIF. Unlike the native JPG output capability of FusionPro Server, PDF2IMG is called as a separate process after FusionPro Server has fully created a PDF output file. FusionPro Server customers can find the PDF2IMG utility in the PDF2IMG sub-folder in the FusionPro installation location (default is C:\Program Files\Printable\FusionPro\PDF2Image). Full documentation on PDF2IMG is also located in this location.

Link to comment
Share on other sites

Thank you. That answered my question. Will this capability be added in the future?

I don't think we have any specific plans to add the ability to output directly to other graphic formats besides JPEG. But never say never; we will give consideration to all feature and enhancement requests.

 

The main purpose for adding this functionality, as Mark noted, is to enable online Web-to-Print systems (such as FusionPro Web) to be able to offer previews in web pages. As far as I know, there's no reason why any other graphic format would work better than JPEG for that purpose. Is there a specific reason why you need to be able to output to other formats?

 

Again, if you have a job where this feature is not working, we definitely would like to take a look at it so that we can analyze the problem and fix it. If you could send it to Support, I would appreciate it. You can note that I asked you to send it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...