Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

a5_image_transform - a bug perhaps

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    a5_image_transform - a bug perhaps

    My client needs to send their suppliers purchase orders (via email as PDF attachments) with images of each item ordered included. The images are held as jpegs as downloaded from their digital camera and are usually 1600x1200 and about 340kb in size.

    If they use these images a one line purchase order creates a pdf some 4mb in size - not very helpful as they can often have 10 lines per order. So my first question is - Can these pdfs be slimmed down. I know that Adobe V7 has a file size reduction option which works very well but clearly I don't want my client to have to buy Acrobat and then do extra work on each pdf that is created.

    I have looked at all the settings available in the various "printers and devices" that A5 installs and there is nothing showing that might help.

    I then had the idea of letting the client easily shrink the image from within Alpha using Image_transform, so I placed a button with the following bit of code on one of the forms as a trial.

    dim tbl as p
    dim b1 as b
    dim b2 as b
    dim b3 as c
    dim b4 as c

    tbl = table.current()
    b3 = trim(tbl.image1)
    b4 = "C:\gemcosting\reduced\redimage01.jpg"

    b1 = file.to_blob(b3)
    b2 = a5_image_transform(b1)

    file.from_blob(b4, b2)


    Using the above and setting the file reduction to 25% of original size resulted in a new file being saved which shows its dimensions being reduced to 400x300 but the file is still 226kb and worse than that the resulting jpeg was unreadable by both Alpha and Paintshop Pro so clearly something is going wrong in the transformation process.

    This sort of requirement is only going toi increase as e-commerce expands so any input would be very useful for all the Alpha community.

    Many thanks

    Bob Whitaker
    UK
    Bob Whitaker


    #2
    Re: a5_image_transform - a bug perhaps

    Bob,

    It works with a bitmap, so could be something to do with the compression on a jpg

    Comment


      #3
      Re: a5_image_transform - a bug perhaps

      you could try <FILE>.WRITEB() for a jpg

      Comment


        #4
        Re: a5_image_transform - a bug perhaps

        Originally posted by Bob Whitaker View Post
        My client needs to send their suppliers purchase orders (via email as PDF attachments) with images of each item ordered included. The images are held as jpegs as downloaded from their digital camera and are usually 1600x1200 and about 340kb in size.

        If they use these images a one line purchase order creates a pdf some 4mb in size - not very helpful as they can often have 10 lines per order. So my first question is - Can these pdfs be slimmed down. I know that Adobe V7 has a file size reduction option which works very well but clearly I don't want my client to have to buy Acrobat and then do extra work on each pdf that is created.

        I have looked at all the settings available in the various "printers and devices" that A5 installs and there is nothing showing that might help.

        I then had the idea of letting the client easily shrink the image from within Alpha using Image_transform, so I placed a button with the following bit of code on one of the forms as a trial.

        dim tbl as p
        dim b1 as b
        dim b2 as b
        dim b3 as c
        dim b4 as c

        tbl = table.current()
        b3 = trim(tbl.image1)
        b4 = "C:\gemcosting\reduced\redimage01.jpg"

        b1 = file.to_blob(b3)
        b2 = a5_image_transform(b1)

        file.from_blob(b4, b2)


        Using the above and setting the file reduction to 25% of original size resulted in a new file being saved which shows its dimensions being reduced to 400x300 but the file is still 226kb and worse than that the resulting jpeg was unreadable by both Alpha and Paintshop Pro so clearly something is going wrong in the transformation process.

        This sort of requirement is only going toi increase as e-commerce expands so any input would be very useful for all the Alpha community.

        Many thanks

        Bob Whitaker
        UK
        Bob, if you google PDF COMPRESSOR you will find different approaches to the size issue (some free). I had a client that wanted to post extensive research material in PDF format but the uncompressed sizes would have been a drain on server resources. I came across CVISIONTECH.com and checked out their offerings and found that they had a desktop version that can accomodate file sizes up to 100 pages. This suited my client's needs, however due to the volumes we were dealing with I wanted to automate the process - essentially created macros that could effectively batch process multiple files. It worked great.
        CVISION software can convert PDF,TIFF and JPEG files into compressed,web optimized and text-searchable PDF files.
        Another site to look at is Luratech.com,I haven't priced/researched this site of late since the CVISION product coupled with some macros did the job.

        FYI the file size reduction you will achieve can easily be assessed using trial versions.

        SOFTIZER.com has a free product available PDF COMPRESSOR 1.12 - the demo screen looks like it can only accomodate source files in PDF format.

        Ken

        Comment


          #5
          Re: a5_image_transform - a bug perhaps

          Bob,

          Set the resolution to 150dpi (75dpi if you can take loss of sharpness). Lower the jpag compression number to lower numbers (3 is good) and reduce the image's resolution that is used in the output. These will reduce the file sizes. If you use standard fonts, don't embedd the fonts either. Where possible, use png formats for vector images.
          Regards,

          Ira J. Perlow
          Computer Systems Design


          CSDA A5 Products
          New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
          CSDA Barcode Functions

          CSDA Code Utility
          CSDA Screen Capture


          Comment


            #6
            Re: a5_image_transform - a bug perhaps

            Thanks all for your input. I was on the road yesterday but have been trying some stuff and here are my conclusions.

            1) The image transformation works when using a bitmap but does not work with a jpeg - as previously stated the resulting jpeg is unreadable - this is a bug.

            2) I ran a test creating two pdf documents one with the the image being a bitmap of 5mb or so and this created a PDF of 2.70mb whereas with a jpeg of some 349kb in size resulted in a larger PDF at 2.77mb.

            3) I converted and reduced the jpeg to a bitmap at 25% of the original size which resulted in a file size of 231kb and a consequent PDF of 230kb.

            I have Acrobat 7 installed on my machine so opened the 2.77mb PDF created by Alpha and clicked the reduce file size option and it resulted in a perfectly legible PDF of just 20kb !!!!!

            I took Ken Doucet's advice and looked at a couple of products to reduce the PDF size without resorting to buying a full copy of Acrobat and the results were.

            The free programme from www.nicepdf.com simply did not work - it produced a file of aout the same size i.e. 20kb but my version of Acrobat reader would not open the file - so not a lot of use then.
            The other software from CVISIONTECH worked perfectly but for some bizarre reason is sold at more or less the full price of Acrobat - so no point going there either.

            What we need is to be able to have more control over the PDF driver and be able to specify if the PDF's produced by Alpha are to be compressed.

            I tool Ira's advice and looked at the settings for the driver(the only place I could find where one might be able to change things) and reduced the resolution to 75dpi - this was the only setting I could alter - and it made no difference whatsoever.

            Bob Whitaker
            UK
            Bob Whitaker

            Comment


              #7
              Re: a5_image_transform - a bug perhaps

              Bob,

              There are many other PDF writers (created via printing to a PDF printer), some of which are free as GNU open software, e.g. They each have various options and compatabilities, but may be a bit more cost effective. Just search the internet for pdf writer
              Regards,

              Ira J. Perlow
              Computer Systems Design


              CSDA A5 Products
              New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
              CSDA Barcode Functions

              CSDA Code Utility
              CSDA Screen Capture


              Comment


                #8
                Re: a5_image_transform - a bug perhaps

                Originally posted by Bob Whitaker View Post
                Thanks all for your input. I was on the road yesterday but have been trying some stuff and here are my conclusions.

                1) The image transformation works when using a bitmap but does not work with a jpeg - as previously stated the resulting jpeg is unreadable - this is a bug.

                2) I ran a test creating two pdf documents one with the the image being a bitmap of 5mb or so and this created a PDF of 2.70mb whereas with a jpeg of some 349kb in size resulted in a larger PDF at 2.77mb.

                3) I converted and reduced the jpeg to a bitmap at 25% of the original size which resulted in a file size of 231kb and a consequent PDF of 230kb.

                I have Acrobat 7 installed on my machine so opened the 2.77mb PDF created by Alpha and clicked the reduce file size option and it resulted in a perfectly legible PDF of just 20kb !!!!!

                I took Ken Doucet's advice and looked at a couple of products to reduce the PDF size without resorting to buying a full copy of Acrobat and the results were.

                The free programme from www.nicepdf.com simply did not work - it produced a file of aout the same size i.e. 20kb but my version of Acrobat reader would not open the file - so not a lot of use then.
                The other software from CVISIONTECH worked perfectly but for some bizarre reason is sold at more or less the full price of Acrobat - so no point going there either.

                What we need is to be able to have more control over the PDF driver and be able to specify if the PDF's produced by Alpha are to be compressed.

                I tool Ira's advice and looked at the settings for the driver(the only place I could find where one might be able to change things) and reduced the resolution to 75dpi - this was the only setting I could alter - and it made no difference whatsoever.

                Bob Whitaker
                UK
                Bob, keep in mind that the desktop version of CVISION's product allows for unlimited PDF creation whereas if you go to their next level the costs start shifting dramatically. They are basically licensing in blocks of 25,000 pages. The desktop version may be your most cost effective solution to addressing the size issues you are dealing with.
                I used it to compress a research library of PDFs consisting of 18,000 files (with page content from 1-70) and then deliver the compressed PDF's to their server thereby dramatically reducing storage / access times for the files in the library. Who wants to access a 40 mb pdf when you can get same thing in less than 300kb? Not me (nor my clients :))

                Essentially, the ability to have file sizes dramatically reduced i.e. 25mb to a couple of hundred k is worth something when you get into volume situations. I would encourage you to look at this further.
                3.6 mb jpeg convert to 43k. Similarly, 43mb pdf's compress to approx 43k as well.

                If you are interested in another approach take a look at DJVU compression technology. It's compression approach is based on AT&T research labs research and is now under Lizardtech.com purview. It's compressed files require a free plug-in (very small) so the CVISION approach may be a bit more straightfoward unless you are dealing with a web server hosting large number of PDF documents/catalogues etc. There is also planetdjvu.com which has some good examples of sites using the technology.

                Ken

                Comment


                  #9
                  Re: a5_image_transform - a bug perhaps

                  Thanks Ira - thanks Ken

                  I appreciate that other PDF creators can be used via a printer driver but that kind of defeats the nice simple approach of alpha's email as a pdf function does it not. Using alternative writers would mean producing the pdf and then creating an email and attaching it. I just thought it would be nice if a compression option could be incorporated in what is otherwise a useful and excellent part of Alpha.

                  Bob
                  Bob Whitaker

                  Comment


                    #10
                    Re: a5_image_transform - a bug perhaps

                    Bob,

                    One last program you might have a look at is PDFfactory. It is not only a great stand alone pdf creator but it also allows you to programatically control it. It can combine reports into one pdf and then it has all the muscle to send the email for you as well. The pro version can also allow you to create individual drivers with the options preset so that it makes it extremely easy for our users to create specific output. Many other features.

                    Although I have not tested its ability of compression, there is a comment that it is able to compress most pdf's better than Acrobat 7.

                    www.pdffactory.com

                    HTH
                    Doug

                    PS. I have no affiliation with the above product.

                    Comment

                    Working...
                    X