The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,528 other followers

Archive for April 11th, 2019

including enumerations and JPEG compression examples for wPDF 4 Manual: Compression related properties

Posted by jpluimers on 2019/04/11

Since I was tracking down an issue having to to with generating DIB in a compressed PDF: [Archive.is] wPDF 4 Manual: Compression related properties

Property CompressStreamMethod

By modifying this property you can let the PDF engine compress (deflate) text. By using compression the file will be reasonable smaller. On the other had compression will create binary data rather than ASCII data. While “deflate” produces the smallest files, “run-length” compression is compatible even to very old PDF reader programs.

Property JPEGQuality

wPDF can compress bitmaps using JPEG. This will work only for true color bitmaps (24 bits/pixel) and if you have set the desired quality in this property.

Property EncodeStreamMethod

If data in the PDF file is binary it can be encoded to be ASCII again. Binary data can be either compressed text or graphics. You can select HEX encoding or ASCII95 which is more effective then HEX.

Property ConvertJPEGData

Note: Only applies to TWPDFExport.

If this property is true JPEG data found in the TWPRichText editor will not be embedded as JPEG data. Instead the bitmap will be compressed using deflate or run length compression. It is necessary to set this property to TRUE if the PDF files must be compatible to older PDF reader programs which are incapable to read JPEG data.

Note that EncodeStreamMethod does not do compression, but it does belong here because the encodings result in different PDF sizes.

The settings are not documented in more detail, so here are the enumerations explaining them in a bit more depth:

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

Delphi Code Monkey: Cool Advanced Troubleshooting Technique – WinDbg

Posted by jpluimers on 2019/04/11

This so much reminds me of a struggle in the Toshiba Tecra 750CDT era: [WayBackDelphi Code Monkey: Cool Advanced Troubleshooting Technique – WinDbg.

First about Warren’s issue:

His laptop froze only in Windows 10, but not Windows 7, after doing some debugging work. Display is on, but non-responsive. He ruled out a lot of things, thought it was a video issue, looked for pointers how to research it ending to force memory dumps by keyboard then running WinDbg to further pinpoint the cause.

He solved the issue by removing the Lenovo supplied Intel graphics driver and forcing the Intel HD Graphics 520 OEM drivers onto the system and posted a few interesting links:

Then some history:

Back in the 750CDT days, the problem was the combination of Toshiba using OEM S3 Virge/MX video drivers, Windows GDI and TImageList with a lot of images in them (basically: the component palette).

Result: interrupt freeze of the laptop, so not even mouse or keyword would work.

Solutions:

  • use Windows NT, not Windows 95
  • disable all S3 hardware acceleration
  • use the Toshiba 780 series video drivers

From then on, I’ve never developed on Windows 9x based systems any more, but Windows NT based systems (even though it was much harder to get drivers for all hardware components), this despite the fact that with Windows NT 4, Microsoft video drivers from ring 3 to ring 0 (they were at ring 3 until and including Windows NT 3.51 [Archive.is]). On the one hand the move to ring 0 caused more blue screens, on the other hand made it a lot harder to directly access hardware from user software running at ring 3.

 

–jeroen

Posted in Development, Power User, Software Development, Windows, Windows 10 | Leave a Comment »

Some links and notes as I want to learn about JavaScript in bookmarklets

Posted by jpluimers on 2019/04/11

I wrote about bookmarklets before, but more from a usage perspective, not from a programmers one.

From what I understand now is that:

  • bookmarklets are basically a special form of URI
  • you can use javascript in them, but must make sure you do not interfere with existing javascript on the page
    • javascript:(function(){ window.open(‘https://wiert.me/’); })();
  • the URI has limits so,
    • browsers can have length restrictions (some around 500 characters) forcing you to put the actual script on-line as externalised bookmarklet (which won’t work on body-less pages)
    • you will have to encode special characters (and URI decode them before beautifying existing JavaScript bookmarklets)

My first tries will likely be:

  1. a modification of the existing WordPress “Press This” to work with GitHub and keep # fragments
  2. a modification of the existing WordPress “Press This” bookmarklets to open pages in a new tab.
  3. opening the current page as new tabs in both WayBack and Acrhive.is to see which one archives them best
  4. generating a URL with title prepended by the current WayBack or/and Archive.is links

Here are some links I will need  to read in order to get a better understanding:

WordPress sources:

My prior posts: from the usage side:

–jeroen

Read the rest of this entry »

Posted in Development, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers | Leave a Comment »

 
%d bloggers like this: