Martin Osieka

Members
  • Content Count

    136
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by Martin Osieka

  1. Sorry. On Win7. Open the control panel from the Start menu of Windows. Enter "Environment" into the Search control on the top. Select: Edit environment variables for your account. Select: New user variable Enter for the variable name: ImPDFArguments Enter for the variable value: Test Close the dialog Restart Paint.NET
  2. Please set the environment variable "ImPDFArguments" to something like "Test" and restart Paint.NET. I guess I missed to catch an exception.
  3. Update v1.1: Adds some layout and viewer options. See first message of the thread.
  4. Color management is always an issue if you are working with images. But I guess you know there is no simple conversion between RGB and CMYK. At the end what you need to work on a professional level is a PDF which conforms to the PDF/X-1 ISO standard. In the moment I'm on the road to implement PDF/A-1b. This is already a big step in the right direction. Because this is the standard for long-term archiving of documents and forces you to embed an output intend which maps DeviceRGB to a device independent color space. What you also have to know is that if you are working on the ISO standard level you have to pay for specifications and licenses. Everything would be easier if Paint.NET would support color management. But I understand why there is just a little chance that this will happen.
  5. I guess this was a more general remark to "Just one thing I like about PDF Print, it doesn't ask to flatten". I'm just not sure about a future version which will generate layered PDFs. Because for this the plugin needs the layer bitmaps and not the composite image. This is only possible if the PDF is encrypted. Because w/o encryption the PDF specification tells the PDF viewers to disallow assembly. For encryption you have to provide an owner password. I implemented 128-bit encryption in ImPDF.Command.exe but there is no ui in the moment.
  6. Thanks for the positive feedback. Always good to read that software made for the community may be useful. >>- Set the page size and margins (in centimetres and in inches). Offer different standard sizes as preset (e.g. A4, Letter, Legal etc) >>- Limit the image size within the page and margins >>- Position the image within the page (centre, top, bottom, left, right) This is on the list, there is only the UI part missing. >>- Use other image file or document template or pdf or doc as background (very useful for stationery, lettereads, watermarks) The problem there is the user interface. I'm using xml templates to describe PDFs but you have to edit these xml files with a text or xml editor I guess the only ui element (inside of Paint.NET) may be a selector for one of these templates.
  7. 'Portable Document Format' FileType Plugin (.PDF) Summary Set of two FileType plugins which allow the digital image editor 'Paint.NET' to open and save PDFs (Portable Document format). Open means to render the PDF via Ghostsctipt to bitmap layers in Paint.NET Save means to embed the bitmap layers into a PDF container. It is important to understand that you can not edit vector graphics embedded in PDFs inside of Paint.NET using these plugins to open and save PDFs. Paint.NET is a bitmap editor. Author Martin Osieka Download Find the latest version of the plugins here: ImPDF.Open.FileType v1.0 (15.3.2014) ImPDF.Save.FileType v1.4 (15.3.2014)) Installation Follow the instructions carefully Installation of ImPDF.Open.FileType Install Ghostscript (http://www.ghostscript.com/download/). The plugin has been tested with Ghostscript 9.10. If Paint.NET is running as an 64bit application then you have to install "Ghostscript for Windows (64 bit)" else the 32bit version. The plugin identifies the installed ghostscript version via the registry. If you are using the plugin w/o Ghostscript a messagebox will popup telling you that Ghostscript is required. Copy the two files OptionBasedLibrary vX.X.dll/.dlc to the Paint.NET\ folder (NOT to Paint.NET\FileTypes\ !!!) Copy the two files 'ImPDF.Open.FileType.dll/dlc' to the Paint.NET\FileTypes\ folder Remove old ImPDF version from Paint.NET\FileTypes\ folder. If you need the save functionality then update to ImPDF.Save.FileType. Do not remove older versions of the OptionBasedLibrary if they are required from other plugins. Installation of ImPDF.Save.FileType Unzip "ImPDF.Save.FileType vX.X.zip" and copy the two files "ImPDF.Save.FileType.dll" and "ImPDF.Command.exe" into the "FileTypes" folder of your Paint.NET installation. A typical location is "C:\Program Files\Paint.NET\FileTypes". WARNING: Don't forget to remove older version of the ImPDF plugin (ImPDF.FileType.dll)! Compatibility Paint.NET 3.5.11 and 4.0.5 Supported languages The language used in the plugin depends on the language setting of Paint.NET and the support of this language by the plugin. The fallback is the first supported language of the plugin. Languages are defined in the .dlc files. ImPDF.Open.FileType supports the following languages in the moment: English Deutsch ImPDF.Save.FileType supports the following languages in the moment: English Dialog options ImPDF.Open.FileType tbd ImPDF.Save.FileType There are many options which control the features supported by this application. The following section tries to describe the options and features together with their dependencies. Document Settings Set the general options of the PDF. Content Defines how many pages will be generated in the PDF. Flat (Composite Only): 1 page Separated Layers: (number of layers) pages Flat + Separated: 1 + (number of layers) pages The 'only visible' option (which is checked by default) controls if all or just the visible layers will be added. The order of converting the layers to pages is bottom to up. Conformity PDF Basic: Allows all supported features and minimizes the storage size. PDF/A-1B: ISO standard for long-term archiving of documents Some organizations require that you are delivering PDFs in PDF/A format. This standard is more strict about the structure and elements of the PDF. The goal of the standard is to view the content of the PDF in the future on new devices as today on the current ones. To use this option you have to provide an RGB color profile (best would be the one of your display). See http://www.color.org for the idea of color profiles. By default the plugin looks for the profile "ImPDF.Default.icc" in the Filetypes folder of Paint.NET. So you may place a copy of a profile there using the default name. Hint: PDF/A does not allow encryption. Encoding Defines the compression method used to compress the images in the PDF. None: Uncompressed Zip (lossless): Compressed JPEG (... quality) Compressed with quality loss Info Settings Allows to set some info in the PDF: title, author, subjects, keywords. The application sets the creator and producer entries of the pdf. Layout Settings These settings define the size of the generated pages and the size and position of the images on the pages. Remember a pdf is a vector file format which is able to embed pixel images. So if you are talking about the size of a pdf then you are talking about a real world size using a unit. The 'Final Size' depends on the layout settings. Page Size set to '(Based on image)' The application calculates the page size from the pixel size of the image and the dpi value stored with the image. In Paint.NET you may set the dpi value in the 'Resize...' dialog. If the 'Borders' checkbox is checked then the size increase by the values for the top, left, right, and bottom border. Page Size set to '(User-defined)' Set the W x H values to define the 'Final Size'. If the 'Borders' checkbox is checked then the size available for the image is the user-defined size minus the border values.Use the 'Image' position and the 'Scaling' option to place the image on the page. Page Size set to a fixed format like 'A4' or 'Letter' If you select a given format then the 'Final Size' depends on the format and the 'Orientation' option. If the 'Borders' checkbox is checked then the size available for the image is the format size minus the border values.Use the 'Image' position and the 'Scaling' option to place the image on the page. Viewer Settings The viewer settings are providing hints how a pdf viewer application should show the pdf to the user. The viewer may use the hints or ignore them. Rotation This option tells the viewer to rotate all pages in the pdf by 0, 90, 180, or 270 degrees. In some cases it is better to keep landscope orientated pages in portrait mode and let the viewer do the rotation. This make printing more simple. Open PDF in 'Window View' This is the default used by PDFs. The viewer application opens a window on the display and shows the PDF inside of this window. You may provide additional hints to the viewer. 'Don't set' in a popup or an indeterminate state of a checkbox means that you do not like to provide this hint to the viewer. Panels Beside the PDF pages the viewer may view a panel showing additional info about the PDF. You may set this option to the following values: Don't set, No panels, Bookmarks panel, Pages panel, Layers panel. Pages Here you can define how many pages are visible in the window at the same time and how these pages are presented: Don't set, Single page, Single page continous, Two-up, Two-up continous, Coverpage + Two-Up, Coverpage + Two-Up continous. Zoom This setting describes the size of a page in the window: Don't set, Fit page, Fit page width, Fit page height, Fit visible, Fit visible width, Fit visible height, Actual size, Zoom to. Zoom to also uses the 'factor' option (a percentage value). If you do not select 'Don't set' the you should also provide a start page index. Window flags Fit: Adapts the window size to the page size Center: Centers the window on the display Show Title: Shows the Info.Title entry above in the window title Hide flags Menu: Hides the menubar of the viewer Tools: Hides the toolbar of the viewer Controls: Hides the controls of the viewer (you may not be able to scroll, ...) Open PDF in 'Fullscreen View' Ask the viewer to open the pdf in fullscreen mode of the viewer. The viewer may ask the user if he accepts this. There are no additional options. Open PDF as 'Presentation' A presentation is a kind of slide show. The viewer will show one page after the other in fullscreen mode. You are able to define transition effects between the pages and timings. Hint: Not all pdf viewers are supporting the presentation mode. Security Settings Setting the 'Encryption' option to Low (40 bit) or High (128 bit) allows you to protect the content of the PDF. The owner password is needed if there is the need to modify the PDF later. If the user password is set then the viewer application will ask for this password to open and decrypt the PDF. The 'Allow' flags define what the user is allowed to do with the PDF. Known issues ImPDF.Save.FileType v1.1: You have to set the user environment variable ImPDFArguments (v1.1 only) the "Defaults" button may cover other dialog controls => resize the dialog a bit Rick will check if this is a plugin or an application issue. Final Page Size' may show 'Unknown' => change any dialog setting forth and back This is because the dialog has no idea about the document size temporary. "OK" button is not diabled if the set of settings are not in a good state Only the application is able to disable the "OK" button. "Cancel" just cancels the operation but not any changed setting. I guess this an application issue. The preview does not show a preview of the page or the degeneration caused by JPEG encoding. The application generates the preview using the standard load method of the filetype plugin. But this plugin does not provide load because it is not able to load all variants of PDFs (just the ones the plugin generates). Maybe the application could add an OnSavePreview method in the future. Examples None History History of ImPDF.Open.FileType ImPDF.Open.FileType 1.0 (15.3.2014) - Removed one conflict with the PDF-Export pugin ImPDF. - Individual filter entry for each file extensions in OpenFileSelector dialog - Derived from the general ImPS.Open.FileType plugin. History of ImPDF.Save.FileType ImPDF.Save.FileType 1.4 (15.3.2014) - Renamed dll from ImPDF.FileType.dll to ImPDF.Save.FileType.dll - Changes to avoid conflicts with ImPDF.Open.FileType ImPDF.FileType v1.3 (22.7.2012): - Added Content option which allows to store the composite (flat) image or the layers or both - Added Viewer settings for open pdf in window mode. This allows to define things like the visible panel, the layout of the pages in the window, the view size of the image, the zoom value, the start page and more - Added Viewer setting to open pdf in presentation mode (slide show). Here you can define transition effects, transition time, view duration, looping, and background color. This feature embeds JavaScript into the pdf. So be prepared to check your viewer settings. - Added Security Settings: This allows you to encrypt the PDF using 40bit and 128bit password protection. You may define a password required to open the pdf and restrict the access to the pdf. Encryption is not possible if you like create PDF/A documents ImPDF.FileType v1.2: - Added conformance to PDF/A-1B ISO standard for long-term archiving of documents. Select this feature via the "Conformity" combo box in the "Save configuration" dialog. In additon you have to select an RGB color profile (best would be the one of your display). See www.color.org for the idea of color profiles. By default the plugin looks for the profile "ImPDF.Default.icc" in the Filetypes folder of Paint.NET. So you may place a copy of a profile there. ImPDF.FileType v1.1: - Adds some layout and viewer options. - Select the page size from some presets or choose a user-defined size or the image size. - Borders may be added to restrict the part of the page used for displaying the image. - The image can be scaled and positioned relative to the page. - Viewer options allow you to view the page rotated or in full screen view at the time when you are opening the PDF. v1.0: The first version is quite simple. It just allows to create a one page PDF in the size of the original image showing the composite image. The encoding and some PDF description entries can be set. Future version may generate layered PDFs.
  8. Thanks Steve for all the inspiration I got over the years. Started my professional life by creating software for the Newton device long time ago. Let's do devices for the people and not for the engineers. Less is quite often more.
  9. OK, but if this is true then it's the same for Paint.NET. Hint: The color table of the image just contains 256 red values (no black)...
  10. I created a 8-bit .bmp file which shows 257 (=2^8+1) colors in Windows Picture Viewer. The image shows a black frame with 256 different red colors inside. You may load it with Paint.Net and count the colors. ;-) You can get the image here 8-bit bitmap showing 257 colors.bmp Explanation of the magic follows...
  11. This is a proof of concept to show 1) that it is possible to deserialize the data in a .pdn file w/o the usage of a .NET framework. 2) that we are able to do the composition of layers w/o Paint.NET 3) that blending modes, opacity and alpha channels are working correctly This software is in beta state. Because of this we added some white horizontal lines. The software will be used in plugins for some image viewers/editors. Zip file in attachment. Have fun and report bugs ;-) Martin >pdn2bmp /help pdn2bmp v0.1 (beta) Creates a composite image from the layers stored in a .pdn file. Files with the extension .pdn are used by the digital photo editing application Paint.NET. © 2011 by Martin Osieka, ComSquare AG, Switzerland Usage: pdn2bmp {options} <infile>.pdn Options: /help Show this help text /pause Pause after execution /argb Write 32-bit ARGB bitmap (default: 24-bit RGB) /outfile=<filename> Write bitmap to <filename> (default: <infile>.bmp) /background=0xRRGGBB Sets background color (default: white 0xFFFFFF) /checkerboard[=0xRRGGBB] Sets second background color to show checkerboard (default: 0xBFBFBF) download link removed